How to restrict the default selection of first row in ALV in Webdynpro
Hi Experts,
In webdynpro i used ALV to display the bulk amount of datas under a view container. While running it ll cme by default selection on first row. how to restrict that.....
Hi Vimal,
Whenever we create nodes then by default the Initialization lead selection property of node is always checked. That why in the alv by default the first row is selected.
To restrict this default selection just unchecked the Initialization lead selection property of your node.
Regard
Manoj Kumar
Similar Messages
-
How to set the default selection to "Select All" in a Multi valued parameter in SSRS 2008?
Hello Everyone,
How to set the default selection to "Select All" in a Multi valued parameter in SSRS 2008?
Regards
Gautam S
RegardsYou need to specify "Default Values" in the report parameter property. Choose similar option used in the "Available Values" option, this will allow the parameter to check "Select All".
Regards, RSingh -
How to get the default selection color from JTable
Hi, there,
I have a question for how to get the default selection color from JTable. I am currently implementing the customized table cell renderer, but I do want to set the selection color in the table exactly the same of default table cell renderer. The JTable.getSelectionBackgroup() did not works for me, it returned dark blue which made the text in the table unreadable. Anyone know how to get the window's default selection color?
Thanks,
-JennyThe windows default selection color is dark blue. Try selecting any text on this page. The difference is that the text gets changed to a white font so you can actually see the text.
If you don't like the default colors that Java uses then use the UIManager to change the defaults. The following program shows all the properties controlled by the UIManager:
http://www.discoverteenergy.com/files/ShowUIDefaults.java
Any of the properties can be changed for the entire application by using:
UIManager.put( "propertyName", value ); -
How to set the default selected option as NO_OPTION in a JoptionPane
This is just an example program to create the same scenario in the project.When clicked on OK button, it will pop up a JOptionPane confirm dialog with YES-NO buttons.I want to set the default selected button as NO button. In the below program, the keyboard focus is set on NO button, but in the look and feel the selection is still YES button. Can anyone suggest a solution to make both the focus on NO button?
public class Test extends JPanel implements ActionListener{
Test() {
JButton btn = new JButton("OK");
this.add(btn);
btn.addActionListener(this);
public void actionPerformed(ActionEvent e) {
Object[] o = {"Yes", "No"};
JOptionPane p = new JOptionPane("Are u sure?",JOptionPane.QUESTION_MESSAGE,JOptionPane.YES_OPTION,null,o,null);
//p.setWantsInput(false);
p.setInitialSelectionValue(o[1]);
try {
UIManager.setLookAndFeel(new MetalLookAndFeel());
} catch (UnsupportedLookAndFeelException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
//p.setFocusCycleRoot(false);
p.setInitialValue(o[1]);
//p.getRootPane().getDefaultButton().requestFocusInWindow();
UIManager.put("Button.defaultButtonFollowsFocus", Boolean.FALSE);
p.createDialog(this, "").setVisible(true);
if(p.getValue() == o[0]) {
System.out.println("yes");
}else if(p.getValue() == o[1]) {
System.out.println("no");
//p.setWantsInput(true);
//p.showConfirmDialog(this, "Are u sure?");
//p.setInitialSelectionValue(new Integer(JOptionPane.NO_OPTION));
public static void main(String[] args) {
Test t = new Test();
JFrame f = new JFrame();
f.getContentPane().add(t);
f.pack();
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.setSize(500, 500);
f.setVisible(true);
}not sure what you're trying to do, but try this
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
class Test extends JPanel implements ActionListener
Test()
JButton btn = new JButton("OK");
this.add(btn);
btn.addActionListener(this);
public void actionPerformed(ActionEvent e)
Object[] o = {"Yes", "No"};
int value = JOptionPane.showOptionDialog(null,"Are u sure?","",-1,-1,null,o,o[1]);
if(value == 0) System.out.println("yes");
else if(value == 1) System.out.println("no");
public static void main(String[] args)
UIManager.put("Button.defaultButtonFollowsFocus", Boolean.TRUE);
Test t = new Test();
JFrame f = new JFrame();
f.getContentPane().add(t);
f.pack();
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.setSize(500, 500);
f.setVisible(true);
} -
Urgent!How to set the default selected date for an OAMessageDateFieldBean
Hi,
There is messagetextinput on the page.the dataType is Date.
if I do not input anything on this messagetextinput ,when I click on the date icon,the default selected date is today.
But I want to set the default selected date base on another messagechoice.
Is that possible?
binghao.Sumit/Binghao,
When u set deafult date in the OAMessageDateFieldBean, the OAInlineDatePickerBean (which are referring as datepicker popup windows), takes the default value from OAMessageDateFieldBean.
If you explore OAMessageDateFieldBean in framework, u will find its nothing but a onClick js event is called on the imageicon attached with messagetextinput bean(in case the type is Date) and OAInlineDatePickerBean is opened in a modal js window.
So, here is code for setting default value both in both in OAMessageDateFieldBean and OAInlineDatePickerBean :
OAMessageDateFieldBean dateField = (OAMessageDateFieldBean)webBean.findIndexedChildRecursive(<item id>);
dateField.setValue(pageContext,new Date(100, 06, 04)/* 4th July 2000*/);
One more important thing, here Date class is java.sql.Date.I hope i am clear.
--Mukul -
How to set the default selection in a WAD dropdown
Hi All
We are on BW 3.5 I have the following dropdown box in a WAD template. Our users want by default when the query starts only to display Plant = 7700.
Please can you kindly share ideas how I can do this.
<object>
<param name="OWNER" value="SAP_BW"/>
<param name="CMD" value="GET_ITEM"/>
<param name="NAME" value="DROPDOWNBOX_2"/>
<param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_FILTER_DDOWN"/>
<param name="DATA_PROVIDER" value="DP_1"/>
<param name="BORDER_STYLE" value="BORDER"/>
<param name="WIDTH" value="200"/>
<param name="CAPTION" value="Plant"/>
<param name="IOBJNM" value="0PLANT"/>
<param name="BOOKED_VALUES" value="Q"/>
<param name="SHOW_LABEL" value=""/>
ITEM: DROPDOWNBOX_2
</object>
Thanks
KarenHi Karen,
What is the type of data you are feeding to the drop down ? Is it a standard fixed list of items or a query ? From what i see you would be using a query as the dataprovider for the dropdown. In such a case, in your query, restrict Plant with value 7700 in the default values section of the query. This should do the trick that when you run the template, the dropdown would show 7700 by default.
Hope this helps.
Regards
Snehith. -
How to set the default selection in treetable
Hi,
Now I'm using jdeveloper 10.1.3.3, and using af:treeTable and af:tableSelectOne to represent a treetable and let the user select specific row by clicking the radio button in front of each row. I want to programmatically set a specified row to be selected by default when the page is loaded, I didn't find a way to implement this function.
Anyone has ideas?
Thanks in advance.Hi Karen,
What is the type of data you are feeding to the drop down ? Is it a standard fixed list of items or a query ? From what i see you would be using a query as the dataprovider for the dropdown. In such a case, in your query, restrict Plant with value 7700 in the default values section of the query. This should do the trick that when you run the template, the dropdown would show 7700 by default.
Hope this helps.
Regards
Snehith. -
How to restrict the cell selection in JTable based on cell contents...
Hi all,
I have some problem related to table cell selection.
I have a table that represets the calendar of some month and year.
I have the restriction that at one time only one cell could be selected.
Now i want the cell seletion like this,
I want only those dates to be selected if that date is after 'today'.
that is I want to restrict the selection of previous dates.
how can i do this.
I have overridden the table methods like this, still no use.
table = new JTable(model) {
setOpaque(false);
setSurrendersFocusOnKeystroke(false);
setRowHeight(20);
JTableHeader header = getTableHeader();
header.setOpaque(false);
getTableHeader().setReorderingAllowed(false);
setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
getTableHeader().setResizingAllowed(false);
setCellSelectionEnabled(true);
setFocusable(true);
setBackground(new Color(247, 251, 255));
setFont(newFont);
public boolean isCellEditable(int row, int col) {
return false;
public boolean isCellSelected(int row, int col) {
int r = getSelectedRow();
int c = getSelectedColumn();
String val = (String)getValueAt(r,c);
Calendar cal = Calendar.getInstance();
cal.set(currentYear+1900, month,Integer.parseInt(val));
Date d = cal.getTime();
Date currentDate = new Date();
if (d.before(currentDate)) {
return false;
} else {
return true;
Someone please help...
-SoniTry overriding the changeSelection(....) method of JTable.
public void changeSelection(int row, int column, boolean toggle, boolean extend)
if (d.after(currentDate)
super.changeSelection(row, column, toggle, extend);
} -
How to set the default selection screen
I modified screen using screen-input = 0.
then how to set the screen-input = 1.
that is how to make that field input enable.
if use the statement screen-input = 1 directly it is giving 2 fields to enter valueIn the PBO / AT SELECTION-SCREEN OUPUT
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-name = <your FIELD>. " Fields by name
* IF SCREEN-GROUP1 = <your group of fields>. " Fields with MODIF ID
IF <test>.
screen-input = 1. " For input enable
ELSE.
screen-input = 0. " For input disable
ENDIF.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
Regards -
How to get the current selected column and row
Hi,
A difficult one, how do i know which column (and row would also be nice) of a JTable is selected?
e.g.
I have a JButton which is called "Edit" when i select a cell in the JTable and click the button "Edit" a new window must be visible as a form where the user can edit the a part of a row.
Then the column which was selected in the JTable must be given (so i need to know current column) and then i want the TextField (the one needed to be edited) be active with requestFocus(). So it would be
pricetextfield.requestFocus();
Problem now is that i have to click every time in the window the JTextField which was selected in the JTable. I have chosen for this way of editing because my application is multi-user and it would be too difficult for me when everybody did editing directly (catch signals, reload data, etc.).
My question is how do I know the current column and the current row in a JTable?I'm not sure what your mean by the "current" row or column, but the following utility methods return
which row and column have focus within the JTable.
public static int getFocusRow(JTable table) {
return table.getSelectionModel().getLeadSelectionIndex();
public static int getFocusColumn(JTable table) {
return table.getColumnModel().getSelectionModel().getLeadSelectionIndex();
} -
How to restrict the record selection for PLPO table .
Hi,
Am selecting 'plnnr' and 'vornr' from PLPO table . For one Plnnr their are multiple Vornr including 0001 & 9999.
I want to select only those entries which have only Vornr 0001 & 9999.
Ex : 1) Plnnr - 5689
Vornr - 0001,2536,8989,9999
2) Plnnr - 8787
vornr - 0001
3) Plnnr - 5936
vornr - 9999
4) Plnnr - 2345
vornr - 0001,9999
Here for this example i want to select only the entry with Plnnr = 2345 as it only contains 0001 & 9999.
Can any one let me know how to get this in a select query.
Your help is much appreciated.
Thanks in advance.
Ravi Kasnale.Hi
Try with below code
RANGES:r_vornr FOR plpo-vornr.
TYPES:BEGIN OF ty_plpo,
plnnr TYPE plpo-plnnr,
vornr TYPE plpo-vornr,
END OF ty_plpo.
DATA:it_plpo_temp TYPE STANDARD TABLE OF ty_plpo.
DATA:it_plpo TYPE STANDARD TABLE OF ty_plpo.
DATA:it_plpo_temp1 TYPE STANDARD TABLE OF ty_plpo.
DATA:wa_plpo_temp1 TYPE ty_plpo.
DATA:v_line TYPE sy-tabix.
START-OF-SELECTION.
r_vornr-sign = 'I'.
r_vornr-option = 'EQ'.
r_vornr-low = '0000'.
CLEAR:r_vornr-high.
APPEND r_vornr.
r_vornr-sign = 'I'.
r_vornr-option = 'EQ'.
r_vornr-low = '9999'.
CLEAR:r_vornr-high.
APPEND r_vornr.
SELECT plnnr vornr FROM plpo INTO TABLE it_plpo_temp1 WHERE vornr IN r_vornr.
CLEAR:it_plpo[].
LOOP AT it_plpo_temp1 INTO wa_plpo_temp1.
CLEAR:it_plpo_temp[].
it_plpo_temp[] = it_plpo_temp1[].
DELETE it_plpo_temp WHERE plnnr <> wa_plpo_temp1-plnnr.
DESCRIBE TABLE it_plpo_temp LINES v_line.
IF v_line EQ '2'.
APPEND LINES OF it_plpo_temp TO it_plpo.
ENDIF.
ENDLOOP.
SORT it_plpo BY plnnr.
DELETE ADJACENT DUPLICATES FROM it_plpo COMPARING plnnr.
Regards
Srilaxmi -
How to Restrict the values of Field TASKTYPE on a ALV Grid.?
Hi;
Let me explain my problem. I have report written by another abap developer who has gone now.
On the ALV Grid there is a field called "Activity Process". By F1 F9 I can read that field depends on table TCATX_TASKTYPES and field TASKTYPE . From se11 I can see that there is no search help related with the field.
When the user press F4 all the data in the table is listed . The user want to filter some of the listed data according to same logic .
When I debug the code after F4 on the field I found that the system finds Search Help: TCATX_TASKTYPES of type 'CT'. But unfortunately SE11 says that there in no search help such as TCATX_TASKTYPES.
The previous abap developer used BADI NETW_USER_FIELDS_F4 AT_F4 with class ZCL_IM_NETW_USER_FIELDS_F4 and interface IF_EX_NETW_USER_FIELDS_F4 for the transaction cj20n to filter the same field but this is not triggered by the F4 on the ALV Grid.
What can I do ?
Would you please help me ?I know i can do this using ADF Business Components as the business service but the problem is that the initial value for that attribute will be changed depending on the screen ... ill give u a simple example : lets say that I have employee table ( which include dept column) and under that table I have a table called "Emp_dept_movements" now in the main ADF page "employee entry" I have two blocks Employee data ( master view) employee dept data ( detail view ) now when the user press the create-insert button on the employee dept view the system should copy the dept no from the employee view to the dept no on the emp_dept_movements view... and the "Emp_dept_movements" will be used in another screen called " employee departement movements" without any initial value for the DeptNo
I dont want to create more than one view and cant set the initial value for that attribute in the view , Can this be done through the UI by adding set action listener on that button and specifying from ( binding master_view.dept ) - to (binding of detail_view.dept) ..
hope that am clear this time,
Edited by: Delta on Jul 5, 2010 11:21 PM -
How can I pre-define the default selection in a SelectOneChoice?
How can I pre-define the default selection in a SelectOneChoice?
(1) Here's my JSF-code:
<af:selectOneChoice label="#{res['usercreate.input.sex']}"
value="#{bindings.Sex.inputValue}"
binding="#{SelectListBean.sexlist}"
readOnly="false" autoSubmit="false">
<af:selectItem label="#{res['data.sex.women']}" value="1"/>
<af:selectItem label="#{res['data.sex.man']}" value="2"/>
</af:selectOneChoice>
(2): manged bean: to set the default value to be the first in the list, my managed bean as follows:
import oracle.adf.view.faces.component.core.input.CoreSelectOneChoice;
public class MBSListBean {
private CoreSelectOneChoice sexlist;
public MBSListBean() {
public void setSexlist(CoreSelectOneChoice sexlist) {
this.sexlist = sexlist;
this.sexlist.setValue(1);
public CoreSelectOneChoice getSexlist() {
return sexlist;
(3) when i launch the page, it often gives me such warnings:
WARNUNG: Could not find selected item matching value "1" in CoreSelectOneChoice[UIXEditableFacesBeanImpl, id=_id7]
how to solve the problem ?
Thanks,
wzzdxYou could also set the default on your entity or viewobject, in the properties of your attribute.
-
How to change the default color of the selected row
hi all,
I need to know how to change the default color(yellow) of the selected row in a table component.whether i need to change anything in the stylesheet.If so, where should i make the changes in the stylesheet.
thanks and regards,
rpkThe chart colors are being referred to *'palette.cxml'* file in these directories
BI_HOME\web\app\res\s_oracle10\chartsupport
BI_HOME\oc4j_bi\j2ee\home\applications\analytics\analytics\res\s_oracle10\chartsupport
you can change to your custom colors.
Restart OC4J and PS to make the new ones work..
Regards,
Raghu -
How to set the Default values for Info Objects in Data Selection of InfoPac
Hi All,
Flat file Extracion:
How to set the Default values for Info Objects in Data Selection Tab for Info Package
ex: Fiscal Year Variant Info Object having values 'K4' 'Y2' etc in Flat file
Initially default value(not constant) for this info Object value should be 'K4' in Info Package
If I set data selection value for this info object K4 it will retreive records with this selection only? how to handle
Rgds,
CVHi,
suppose as your ex. if you are having fiscalyear variant in the dataselection tab then specify K4 in the from column, again the ficalyearvariant row and click on insert duplicate row at the bottom . you will get another row . In that enter Y2 in the from column. now you can extract K4, y2 values .
haritha
Maybe you are looking for
-
Help We lost power and everything on the computer. I have recovered itunes and the 483 purchased songs But I have 1895 songs on my iphone. How can I get my iphone library back on my computer library?
-
Can I daisy chain airport extremes, Can I daisy chain airport extremes
Can I daisy chain 2 airport extremes?
-
Aperture crashes after a minute or so every time opened
The last time I tried uploading photos from a memory card, it got halfway through, then stopped with a n error message saying it couldn't upload anymore due to an error (I can't recall the exact wording of the message) Since then, if I try to open Ap
-
ADJUSTMENT APPROVE실행시 에러 발생 FRM-40735
제품 : FIN_AR 작성날짜 : 2005-11-28 ADJUSTMENT APPROVE실행시 에러 발생 FRM-40735 ===================================== PURPOSE ADJUSTMENT APPROVE실행시 에러 발생 FRM-40735에러가 나고 조정을 승인또는 취소할수도 없는 상태로 됨 Problem Description 조정 처리에 대한 Session이 Lock이 걸려서 처리를 하고 있지 못함 Workar
-
I have posted earlier that It did not work, But after Hours of trying, it finally Work. I wanted to be able to use Logic Plugins PLUS all TDM plugins. If you want to use the Logic Plugins, Create a DTDM track, Output it to ESB 1-8, Then to conect it