Regarding layout
Hi friends
is it possible to use more than one layout in a single class?
For example i want to use BorderLayout and GridBagLayout in a single frame..first i gave borderlayout and it is working fine.next i add gridbaglayout and add button to it but button is using borderlayout to display
my code is
package com.main;
import java.awt.BorderLayout;
import java.awt.Button;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.GridLayout;
import java.awt.Label;
import java.awt.TextField;
import java.awt.image.BufferedImage;
import java.io.IOException;
import javax.imageio.ImageIO;
import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JProgressBar;
public class mainWidow extends JFrame {
public static void main(String[] args) {
final JProgressBar aJProgressBar = new JProgressBar(0, 50);
aJProgressBar.setStringPainted(true);
mainWidow md = new mainWidow();
md.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
md.setSize(new Dimension(300, 200));
md.setTitle("Printing Demo");
int windowWidth = 700; // Window width in pixels
int windowHeight = 450; // Window height in pixels
md.setBounds(180, 130, // Set position
windowWidth, windowHeight); // and size
BufferedImage image = null;
try {
image = ImageIO.read(md.getClass().getResource("logo.jpg"));
} catch (IOException e) {
e.printStackTrace();
md.setIconImage(image);
String labelText = "<html><h1><FONT COLOR=BLUE>DO PRINT UTILITY</FONT></h1> </html>";
JLabel coloredLabel = new JLabel(labelText, JLabel.CENTER);
coloredLabel.setBorder(BorderFactory.createTitledBorder(""));
coloredLabel.setFont(new Font("Serif", Font.PLAIN, 36));
md.add(coloredLabel, BorderLayout.NORTH);
JLabel testLabel = new JLabel("progress bar", JLabel.CENTER);
md.add(aJProgressBar, BorderLayout.PAGE_END);
GridBagLayout gridbag = new GridBagLayout();
GridBagConstraints constraints = new GridBagConstraints();
constraints.fill = GridBagConstraints.HORIZONTAL;
JButton button = new JButton("Button 2");
md.add(button);
md.setVisible(true);
public void createFrame() {
}Regards
Wait Wait, I said that i did using NetBeans. In netbeans, if the is a option for Creating a JFrameForm ( I think it is a fram with one Default Panel to which we can set Layouts).
I did one program using netbeans. I used one BorderLaout,GridLayout and then one Absolute Layout. See it, then tell me if i mis-understand with the Layouts.
* NewJFrame.java
* Created on August 1, 2008, 12:47 AM
* @author ChandraSekar
public class NewJFrame extends javax.swing.JFrame {
/** Creates new form NewJFrame */
public NewJFrame() {
initComponents();
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jPanel1 = new javax.swing.JPanel();
jButton1 = new javax.swing.JButton();
jButton2 = new javax.swing.JButton();
jButton3 = new javax.swing.JButton();
jButton4 = new javax.swing.JButton();
jButton5 = new javax.swing.JButton();
jPanel2 = new javax.swing.JPanel();
jButton7 = new javax.swing.JButton();
jButton8 = new javax.swing.JButton();
jButton9 = new javax.swing.JButton();
jButton6 = new javax.swing.JButton();
jPanel3 = new javax.swing.JPanel();
jButton10 = new javax.swing.JButton();
jButton11 = new javax.swing.JButton();
jButton12 = new javax.swing.JButton();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
jPanel1.setLayout(new java.awt.BorderLayout());
jButton1.setText("jButton1");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
jPanel1.add(jButton1, java.awt.BorderLayout.CENTER);
jButton2.setText("jButton2");
jPanel1.add(jButton2, java.awt.BorderLayout.PAGE_END);
jButton3.setText("jButton3");
jPanel1.add(jButton3, java.awt.BorderLayout.PAGE_START);
jButton4.setText("jButton4");
jPanel1.add(jButton4, java.awt.BorderLayout.LINE_START);
jButton5.setText("jButton5");
jPanel1.add(jButton5, java.awt.BorderLayout.LINE_END);
jPanel2.setLayout(new java.awt.GridLayout());
jButton7.setText("jButton7");
jPanel2.add(jButton7);
jButton8.setText("jButton8");
jPanel2.add(jButton8);
jButton9.setText("jButton9");
jPanel2.add(jButton9);
jButton6.setText("jButton6");
jPanel2.add(jButton6);
jButton10.setText("jButton10");
jButton11.setText("jButton11");
jButton12.setText("jButton12");
javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
jPanel3.setLayout(jPanel3Layout);
jPanel3Layout.setHorizontalGroup(
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layout.createSequentialGroup()
.addGap(24, 24, 24)
.addComponent(jButton10)
.addGap(79, 79, 79)
.addComponent(jButton11)
.addGap(64, 64, 64)
.addComponent(jButton12)
.addContainerGap(135, Short.MAX_VALUE))
jPanel3Layout.setVerticalGroup(
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layout.createSequentialGroup()
.addGap(29, 29, 29)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jButton10)
.addComponent(jButton11)
.addComponent(jButton12))
.addContainerGap(48, Short.MAX_VALUE))
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addComponent(jPanel2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jPanel1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
.addGroup(layout.createSequentialGroup()
.addGap(37, 37, 37)
.addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap(19, Short.MAX_VALUE))
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(52, 52, 52)
.addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(28, 28, 28)
.addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(29, Short.MAX_VALUE))
pack();
}// </editor-fold>//GEN-END:initComponents
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_jButton1ActionPerformed
* @param args the command line arguments
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new NewJFrame().setVisible(true);
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton jButton1;
private javax.swing.JButton jButton10;
private javax.swing.JButton jButton11;
private javax.swing.JButton jButton12;
private javax.swing.JButton jButton2;
private javax.swing.JButton jButton3;
private javax.swing.JButton jButton4;
private javax.swing.JButton jButton5;
private javax.swing.JButton jButton6;
private javax.swing.JButton jButton7;
private javax.swing.JButton jButton8;
private javax.swing.JButton jButton9;
private javax.swing.JPanel jPanel1;
private javax.swing.JPanel jPanel2;
private javax.swing.JPanel jPanel3;
// End of variables declaration//GEN-END:variables
}
Similar Messages
-
Regarding Layout saving in ALV
Hi,
In my requirement,i want to save layout of the ALV Report with data in it.So that i can use this variant and get the same data again.I tried with the code below,but its saving only layout,but not the data.
CALL METHOD grid1->set_table_for_first_display
EXPORTING i_structure_name = 'ty_fields_final'
i_save = 'A'
is_variant = g_variant
is_layout = gt_layout
it_toolbar_excluding = lt_exclude
I_DEFAULT = PDEFAULT
CHANGING it_fieldcatalog = gt_fieldcat_lvc[]
it_outtab = i_fields_final.
And also tried it with function module 'LVC_VARIANT_SAVE'.
Can any one help me in this.
Regards
Shibinhi,
Try this.
data: gwa_variant1 LIKE disvariant,
gwa_variant LIKE disvariant,
gf_repid LIKE sy-repid,
gf_exit(1) TYPE c,
gf_save(1) TYPE c.
INITIALIZATION.
gf_repid = sy-repid.
gf_save = 'A'.
CLEAR gwa_variant.
gwa_variant-report = gf_repid.
gwa_variant1 = gwa_variant.
CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
EXPORTING
i_save = gf_save
CHANGING
cs_variant = gwa_variant1
EXCEPTIONS
not_found = 2.
IF sy-subrc = 0.
p_vari = gwa_variant1-variant.
ENDIF.
AT SELECTION-SCREEN.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_vari.
CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
EXPORTING
is_variant = gwa_variant
i_save = gf_save
IMPORTING
e_exit = gf_exit
es_variant = gwa_variant1
EXCEPTIONS
not_found = 2.
IF sy-subrc = 2.
MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
IF gf_exit = space.
p_vari = gwa_variant1-variant.
ENDIF.
ENDIF.
IF NOT p_vari IS INITIAL.
MOVE gwa_variant TO gwa_variant1.
MOVE p_vari TO gwa_variant1-variant.
CALL FUNCTION 'REUSE_ALV_VARIANT_EXISTENCE'
EXPORTING
i_save = gf_save
CHANGING
cs_variant = gwa_variant1.
gwa_variant = gwa_variant1.
ELSE.
CLEAR gwa_variant.
gwa_variant-report = gf_repid.
ENDIF.
end-of-selection.
gf_repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = gf_repid
it_fieldcat = gt_catalog
it_sort = gt_sort
it_events = gt_events
i_save = gf_save
is_variant = gwa_variant
TABLES
t_outtab = gt_output
EXCEPTIONS
program_error = 1
OTHERS = 2.
Hope this helps.
Regards,
Ramya -
Challenging one Regarding layouts in Report
Dear all,
I am developing a report using function modules.Here in my report i want a feature of VA05.In VA05 if we goto <b>SETTINGS->LAYOUT->CHOOSE</b>.It will allow us to select a layout. If we select <b>header level</b> layout it will display all records without duplicates.Again if we select<b> item level</b> layout it will display records with duplicates.Can anybody tell me how can i implement this logic in my report.
Regards,
vineelyou can pass the parameter I_SAVE = 'A' when u call your FM, to display the report output. (REUSE_ALV_GRId or LIST or SET_TABLE_FOR .... whichever it is ).
also, you have to pass the VARIANT structure.
data: LS_VARI TYPE DISVARIANT.
ls_vari-report = sy-repid. -
Need suggestion regarding Layout Manager using Swing in Java
I have developed a swing application where i am having problem with selecting the right layout manager.
I am attaching the file where it contains the method for addingComponents to the Content Pane. But, the code that i have written
contains lot of spaces between first panel and second panel and so forth.
Please suggest.
<<Code>>
public void addComponentsToPane(Container contentPane) {
this.contentPane = contentPane;
// File Panel
JPanel jfile1panel = new JPanel(new FlowLayout(FlowLayout.CENTER));
JPanel jfile2panel = new JPanel(new FlowLayout(FlowLayout.CENTER));
JPanel jfile3panel = new JPanel(new FlowLayout(FlowLayout.CENTER));
JLabel jfile1 = new JLabel("Select File:");
jtfile1 = new JTextField(50);
jbfile1 = new JButton("Button1");
jfile1panel.add(jfile1);
jfile1panel.add(jtfile1);
jfile1panel.add(jbfile1);
jbfile1.addActionListener(this);
JLabel jfile2 = new JLabel("Select File:");
jtfile2 = new JTextField(50);
jbfile2 = new JButton("Button2");
jfile2panel.add(jfile2);
jfile2panel.add(jtfile2);
jfile2panel.add(jbfile2);
jbfile2.addActionListener(this);
JLabel jfile3 = new JLabel("Select File:");
jtfile3 = new JTextField(50);
jbfile3 = new JButton("Button3");
jfile3panel.add(jfile3);
jfile3panel.add(jtfile3);
jfile3panel.add(jbfile3);
jbfile3.addActionListener(this);
//Button Panel
JPanel jbuttonpanel = new JPanel();
jbuttonpanel.setLayout(new FlowLayout(FlowLayout.CENTER));
JButton jbcmd1 = new JButton("Submit");
JButton jbcmd2 = new JButton("Cancel");
jbuttonpanel.add(jbcmd1);
jbuttonpanel.add(jbcmd2);
jbcmd1.addActionListener(this);
jbcmd2.addActionListener(this);
//Content Pane
contentPane.setLayout(new BoxLayout(contentPane, BoxLayout.Y_AXIS));
contentPane.add(jfile1panel);
contentPane.add(jfile2panel);
contentPane.add(jfile3panel);
contentPane.add(jbuttonpanel);
}But, the code that i have written contains lot of spaces between first panel and second panel and so forth.use pack(), see if it makes a difference
as you're using FlowLayout, make the frame not resizable -
Regarding layout issue.
I believe that Weblogic supports the CSS based layout. When we create the custom layout, it automatically make use of the framework provided layouts (like borderlayout.jsp, gridlayout.jsp, flowlayout.jsp). The framework provided layout is table based and hence when the Portlet is rendered the table based layout shows up.
This is a big issue for us. The table based layout is not acceptable. We need the CSS based layout. Please help us.Hi,
I agree with Deepak. In our project we have used custom layouts for all screens. And we have not inherted from any of the existing layouts. You just have to create the .layout file and the JSP (which has your CSS based layout)
Please revert if you still have any doubts on the same.
Thanks -
Regarding layout in the alv grid report
hi gurus,
i have created a ALV report in which the output is coming allrt having 13 fields.now i have saved my layout depending upon some columns in the output name "AVI layout" containg 3 fileds.
when ever i execute the report the layout having 13 fields is coming what i want that whenever i execute the report the layout which i saved means "AVI layout" will come automatically.
please help me................Hi,
You use in your fieldcatlog NO_OUT option for all fields except those 3 fields which u want display when the report executes...
fieldcatlog-no_out = 'X'.
In out put when ever they want to see other fields they can select in output itself and display them.... -
Question regarding layout of my site
Hi,
I'm quite new to Dreamweaver so please bare with me.
Basically I created a homepage for my website, and I have the
layout that I want for my entire site. My question is: is there a
way to build each page off of this layout, and whenever I need to
change the layout is there a way that by just changing it once it
can automatically make these changes to each page of the site
automatically?
I tried something with templates but I'm not exactly sure
what I was doing and whatever it was I don't think it was working.
Thanks so much for your help, I appreciate it!If you save it the way you suggest, it *will* have the
standard editable
regions.
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com
- Template Triage!
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
==================
"Malcolm N_" <[email protected]> wrote in message
news:[email protected]..
> On Thu, 22 Feb 2007 01:29:53 +0000 (UTC), "shroadster"
> <[email protected]> wrote:
>
>>Hi,
>>
>> I'm quite new to Dreamweaver so please bare with me.
Basically I created
>> a
>>homepage for my website, and I have the layout that I
want for my entire
>>site.
>>My question is: is there a way to build each page off
of this layout, and
>>whenever I need to change the layout is there a way
that by just changing
>>it
>>once it can automatically make these changes to each
page of the site
>>automatically?
>>
>> I tried something with templates but I'm not exactly
sure what I was
>> doing and
>>whatever it was I don't think it was working.
>>
>> Thanks so much for your help, I appreciate it!
>
> save it as a template like this:
>
> File / Save as Template
>
> It might say there are no editable regions, but you can
still save it
> and put in editable regions afterwards.
>
>
> --
>
> ~Malcolm N....
> ~ -
Regarding Layout of rtf report
hi experts,
line:---
level
line :--
l1 l2 l3l l4
line: ---
here in my layout i have a single cell which is divided into 2 rows:
in 1 row i want to be print "LEVEL" as heading
in 2 row i want its different level come .
Please do needful for the same.
Amit GargHI
If u r modifying Ztable no probelm because we will be having small amount of data .
IF u r updating standard table Do like below .
First collect all the records which you want to update to table into one internal table .
Then update the table with that internal table ..
IT will be better when you are updating standard table .
I think this will help you ..
If u r not understood copy paste ur code i can solve ur probelm ... -
Regarding layout of abap query
hi all,
i have an issue in the output of abap query. in output i have many columns with values, nw i have to insert two additional colums in between of the existing output.how to do that???Thanks everyone,
i have found out how to add checkbox on selection screen of abap query.
These are the steps:
1.goto tcode sq02 (infoset)
2.put it in change mode.
3.Then click on 'extras' button on application toolbar.
4.Then select 'code' tab and write your code there. -
Hello,
This is regarding Layout variant.
In my program I have called the function module for layout variant . Its working correctly.
When the user click the change-layout from toolbar. -> then change_layout screen will come. Up to this it is ok.
My problem is -
<b>But there I am not getting the save buttom inside the change_layout screen.
I need the save button there.</b>
I am using object oriented method .
Please help me.
Thanks in advance.
LIJO JOHN.Solved myself.
-
Ive just update to Tiger and Final cut studio, and while they both are great, Ive notice the layout file that come in the video folder when a dvd is made by DVD Studio Pro, does not open! Ive tried taking it out of the folder but still not opening.
When I put it on my other computer that did not have Tiger or FC S (ie DVD SP 2), it opened fine again. Is it a Tiger issue or FCS issue or both?
I like the layoout file because it is easy to make many copies quickly from it.
thanks
Paul
PS One other quiery, should burning the video and audio folders (made from encoding a dvd) onto a dvd disc work, my computer soes not seem to recognise it when I doHi Hal, I'm following this post (referred from my OWN post regarding *.layout) and I'm very new to editing and DVDSP4.
Would you mind reviewing the method of making a disc image from DVDSP? Could I take the "Build" folder I created and make a disk image directly from that?, Then burn? I've just not had the need for disk image (until now, it seems)
Also, my system (dvdsp4) does not bring up the inspector when you double click layout, like it "alledgely" did in SP3. Is this a change in SP4?
I have TOAST,and with TOAST I've also found that making self contained movies and using those as assets produces artifacts in the final vid. I made ONE DVD using FCP edit footage that was compressed via Compressor 2.1, HUGE differences!!!
But mostly, I'm just trying to figure out why my DVDSP locks up when I double click the *.layout file in the Build folder.
OH one other thing, I went to try and open the project again, and there are a lot of aspect in the finished BUILD folder that are no longer in the project....like button highlights, transitions, etc....I was going to try and Build and burn and format off my RAID, but now have to rebuild a lot of the project...is this "normal"?
Thanks
Mark -
Change Layout in Selection Screen for OO ALV-Grid
Hello everyone,
I got a problem regarding layouts for objectoriented ALV Grid. I want to make it possible that user can take the layout for ALV he wants to on the selection screen. So far thats no problem and it works. But there are some little problems which I do not know how to fix them. But first the facts:
(1) I got my parameter for layout
PARAMETER: p_vari TYPE disvariant-variant.
(2) I fill my global layout structure in initialization
INITIALIZATION.
* Variante vorbelegen
gs_variant-username = sy-uname.
gs_variant-report = sy-repid.
* Layout holen
CALL FUNCTION 'LVC_VARIANT_DEFAULT_GET'
EXPORTING
i_save = 'A'
CHANGING
cs_variant = gs_variant
EXCEPTIONS
wrong_input = 1
not_found = 2
program_error = 3
OTHERS = 4.
IF sy-subrc = 0.
p_vari = gs_variant-variant.
ENDIF.
(3) I got my handling for F4-value help on variant parameter
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_vari.
CALL FUNCTION 'LVC_VARIANT_F4'
EXPORTING
is_variant = gs_variant
i_save = 'A'
IMPORTING
es_variant = gs_variant
EXCEPTIONS
not_found = 1
program_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE text-m01 TYPE 'S'.
ELSE.
p_vari = gs_variant-variant.
ENDIF.
(4) I give back my parameters content into the variant structure at start of selection
START-OF-SELECTION.
gs_variant-username = sy-uname.
gs_variant-report = sy-repid.
gs_variant-variant = p_vari.
This works all fine but I got some problems when using default variants/layouts. For example I got a default variant only for me. When starting the selection screen it works fine that the default layout was written. It is displayed automatically in the variant parameter. But I want that if i I empty the content (blank it out) from my variant parameter, that report should start with "normal" layout how it was written in the report and NOT with default layout.
When I clear the gs_variant it works like I want it, but then the alv layout button looks like (without functions for layout), because I do not have the reference to my report.
So what to do? :-)
Regards
MichaelWow that was fast, works great, thanks :-)
I did not use this parameter in set table method but now I fill it dynamically.
Ok next problem, one step harder ;-)
Now I have one selection screen for one ALV-Grid, but four radio buttons which control with which data the ALV gets filled (four different fieldcats, data tables and so on). Each Grid got an own HANDLE so that the layouts can be separated in four categories.
Now I want that by changing the radio button the individual standard layout for the chosen alv grid is getting filled.
This works fine when using it in selection screen output.
AT SELECTION-SCREEN OUTPUT.
CLEAR gs_variant.
* Layout-Handles individuell für Klausel-Radiobuttons setzen
IF p_py IS NOT INITIAL.
gs_variant-username = sy-uname.
gs_variant-report = sy-repid.
gs_variant-handle = 'KLPY'.
ELSEIF p_rh IS NOT INITIAL.
gs_variant-username = sy-uname.
gs_variant-report = sy-repid.
gs_variant-handle = 'KLRH'.
ELSEIF p_aj IS NOT INITIAL.
gs_variant-username = sy-uname.
gs_variant-report = sy-repid.
gs_variant-handle = 'KLAJ'.
ELSEIF p_sr IS NOT INITIAL.
gs_variant-username = sy-uname.
gs_variant-report = sy-repid.
gs_variant-handle = 'KLSR'.
ENDIF.
* Layout holen
CALL FUNCTION 'LVC_VARIANT_DEFAULT_GET'
EXPORTING
i_save = 'A'
CHANGING
cs_variant = gs_variant
EXCEPTIONS
wrong_input = 1
not_found = 2
program_error = 3
OTHERS = 4.
IF sy-subrc = 0.
p_vari = gs_variant-variant.
ELSE.
CLEAR p_vari.
ENDIF.
But unfortunately selection screen output is getting passed by EACH changing in the selection screen. This means when I try to clear the default layout in my parameter field, it gets refilled automatically with default layout. If I do a condition around the filling (only if not initial) the default value filling does not work fine in every case, e.g. when clearing the parameters field and then change the radiobutton -> then it does not get filled automatically. -
Rendering ResourceList with layout set
Hi,
in a custom program I get a list of resources, which i want to display to the user.
At the moment I display the list with hard coded HTMLB elements, which is not really flexible regarding layout issues and also not very comfortable.
So I want to render my list with a layout set, as the KM Navigation iView does.
Does anyone know how i can pass a ResourceList to a layout set, so that the km framework renders my list with it??
Any ideas?
Many thanks
Regards
AlexHi,
I can think of two options then:
1. If you're using Trex, then perhaps you can use the Basic KM search iView and manipulate the search option set and search component set it uses for getting the right results. Similar to the 10 Last Documents scenario.
[https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/45bcc1c0-0d01-0010-1094-fe7993416ea6]
2. If 1 doesn't work for you could try to implement a namespace filter. the idea is the same as a resource list filter but it works on a repository level. the good thing about it is that you can maintain properties for it. the bad thing is that it will run every time the repository is accessed so you need to find a way to limit it to your needs.
[https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/2556]
Option No.1 seems much better to me (if it's possible).
Best regards,
Avishai Zamir -
Hi,
one question regarding layouts. When you create a new layout you have to assign it to the roles, for which the new layout should be visible. And I have seen for parametric roles you have to/can choose the parametric value as well. But I would like to assign it to a complete parametric role, not just some values of it. Is there an easier way than just assign it to all values? Especially since the values for my parametric role will change quite frequently, it would be a little bit annoying.
Regards
MatthiasHi,
one question regarding layouts. When you create a new layout you have to assign it to the roles, for which the new layout should be visible. And I have seen for parametric roles you have to/can choose the parametric value as well. But I would like to assign it to a complete parametric role, not just some values of it. Is there an easier way than just assign it to all values? Especially since the values for my parametric role will change quite frequently, it would be a little bit annoying.
Regards
Matthias -
Poll about Ui elements and layout designing
In the next few months I will be rewriting an existing tutorial about UI elements and layout designing. The tutorial describes how an application developer should
create an attractive and user-friendly UI with Web Dynpro Foundation.
Therefore, I need your input on topics which you, as developers, would like to read about regarding layouting and UI design.
So please write anything that occurs to you on this topic.
Thank you in advance!Hi Alvert,
one thing I have noticed in the existing tutorials, that is some tips on the layout containers. Introduction on different type of layout, how to match spacing of two layout container in the same view, meaning of different properties of diff layouts. I have seen normally if I add two containers, the spacing between one's element is different from the other. It causes problem for the total view lookup.
Will let you know again, whenever something comes into mind.
Regards,
Shubhadip
Maybe you are looking for
-
I think the question is obvious.
-
Advance Search not working in Document Management Task Flow
Hi, We are using Document management task flow to manage UCM content. The simple search works for us but the Advance search does not work. Does anyone know of any possible reason why this could happen. Any hint would be really appreciated. Thanks Sal
-
Case sensitive file extensions on mime.types?
Hello, I'm facing a weird problem at customers's site. There is an iAS 10.1.3.3 installation on a Windows 2000 server. There is an OC4J container called "OC4J_FR" where their application is depoyed. The trouble we're facing is the following: on the %
-
I have installed Itunes on my PC. When I connect my Iphone 4s to my PC itunes does not recognize my Iphone. I just want to transfer music to my Phone from my pC. Made a play list. but no recognation from my PC. any idea??
-
Custom object classes and access rights
Hi, I have added a few object classes to the NDS schema; objects belonging to one of them should be able to authenticate against the directory and retrieve some attributes. I managed the login part having the class inherit from ndsLoginAttributes, bu