Enable Buttons after selection of row in a table
Hi All
Could any one give me help in this. I have a table, in table tool bar some buttons are there. at first time buttons are in disable mode, when user select any row in the table the buttons should be in enable mode. how to do this? help me
Thanks,
kris.
hi,
for table you have lead select action. you can write the code in this ction method to enable and disable the buutons based on the lead selection.
or you ca alsoput your code in modify view and check if the instance of element is bound then enable else disable,
lo_element = lo_node->get_element(). Lo_element will be bound only if there is a lead selection in the table.
if lo_element is bound.
enable the buttons.
else.
disable the buttons.
endif.
Regards,
Madhu
Similar Messages
-
If I add artwork by dragging a jpg to the artwork area after selecting several rows, in some instances a single icon is created in the flipper; in others one is created for each song. Why? How can I get one image per album every time?
If I add artwork by dragging a jpg to the artwork area after selecting several rows, in some instances a single icon is created in the flipper; in others one is created for each song. Why? How can I get one image per album every time?
-
Two radio buttons in a single row of a table
Hi All,
Can we have two radio buttons in a single row of ADF TABLE.
My requirement is that i have a list of submitted records. The user can approve or reject the records.
All the records are displayed in the table. there will be two columns in the table(Approve , Reject) The user can approve the first record and reject the second record and so on....
using table selectOne we can select only one row. Using radio buttons how to select the multiple records, at the same time grouping is done between the two columns(radio buttons) in the tableHi,
I don't think that you can do this with radio buttons. The usecase is more for chackboxes. It would have been a usecase for radio buttons if there was a single column with 3 possible options
- pending
- approved
- rejected
Frank -
Dynamic Select of Row in a table in webdynpro Abap
Hi,
I have an requirement, I have an table and a button, I need to select a row in a table based on button action.
For example : in a table i have 3 rows. I am submiting a value in a button, I want to see that row highlighted for the value I am sending through button.
Please let us know the code how to implement this.
ThanksHi,
First you have to go to table and set its property "SELECTION MODE" to single or multi lead depending on ur need.
Then in the ACTION of the button you can use the following code to get the values in the selected row.
DATA:
node to get table node for finding no. of rows
lo_nd_one TYPE REF TO if_wd_context_node,
Get selected row for finding no. of rows
it_table TYPE wdr_context_element_set,
workarea to get selected row
wa_table LIKE LINE OF it_table,
To get the Selected line item into an internal table
CALL METHOD lo_nd_one->get_selected_elements
RECEIVING
set = it_table. " data in internal format
IF it_table[] IS NOT INITIAL.
type conversion for work area
READ TABLE it_table INTO wa_table INDEX 1.
if a row is present
IF sy-subrc IS INITIAL.
Get the values of each attribute
CALL METHOD wa_table->get_static_attributes
IMPORTING
static_attributes = wa_final. "<Selected data in work area.> ---> this will have your data
ENDIF.
Here wa_final is the work area which is of your table fields type.
This wa_final will have the selected row. -
Select all rows in af:table
Hi,
I need to select all rows in af:table, not only on current page.
I have following code on custom select all action:
getTable2().getSelectionState().addAll()and on button that needs to perform some action on selected rows I have this code
Set selectedRowSet = getTable2().getSelectionState().getKeySet();
if (!selectedRowSet.isEmpty()) {
Iterator it = selectedRowSet.iterator();
while(it.hasNext()) {
Key key = (Key)it.next();
}selectedRowSet.iterator() method throws java.lang.ClassCastException: oracle.jbo.Key.
When I select rows with af:tableSelectMany, which is inside selection facet and selects only rows on current page, this works fine.
Any ideas?
ThanksHi,
you can only access those data that is queried and part of the CollectionModel to the time you select all
RichTable _table = employeesBackingBean.getEmployeeTable1();
RowKeySet rks = new RowKeySetImpl();
CollectionModel model = (CollectionModel)_table.getValue();
int rowCount = model.getRowCount();
for (int i = 0; i < rowCount; i++) {
model.setRowIndex(i);
//note that in the simple POJO case, the row key is the same
//as the index. However, it would be wrong to just rely on this
//because other models or custom table models my return a more
//comples key. Therefore we iterate over the available rows to
//obtain the keys.
Object key = model.getRowKey();
//add the row keys to the RowKeySet to mark selected
rks.add(key);
_table.setSelectedRowKeys(rks);
AdfFacesContext.getCurrentInstance().addPartialTarget(_table);Frank
Frank -
Select a row from a table and throw an url
Hi experts,
I'm trying to select a row from a table in Visual Composer. What I need to do it's to click over this row and throw an Url. At the moment, I've added a column with a Pushbutton with the formula to show the link; it works fine. But I need to do it without buttons just selecting the row.
Is there anyboby who knows about that?
Thanks a lot.
BelenHi
To do this you will have to use a data store and a guard condition on the line which is triggered by the select action. You need to store a value in the data store each time a select action is performed. The guard condition should check for this and only perform the action when the value in the data store is greater than 0.
Jarrod Williams -
Selecting multiple rows in a table
Hi All,
I have one problem with selecting multiple rows in a table.I tried with setting table property-selectionMode as Multi, but i dinn't get the solution.
please provide me solution for this.
Thanks & Regards,
Sreelakshmi.HI
Int leadSelection = wdcontext.nodemodelnode.getLeadSelection();
for(int i=0;i<wdcontext.nodeModelNode.size;i++)
if(wdcontext.nodeModelNode.isMultiselected(i) || leadSelection ==i)
String name = wdcontext.nodemodelnode.getnameelementatindex(i).getName();
String address = wdcontext.nodemodelnode.getaddresselementatindex(i).getAddress();
String age = wdcontext.nodemodelnode.getAgeelementatindex(i).getAge();
Create a method for the Table Property onLeadSelect() where you can open a popup window
Create a value node and with attributes same as Table attributes and then set the values of the table
to the value node attributes.
Thanks -
Select multiple rows from dual table
Is it possible to select multiple rows from dual table using a single select statement.
i.e., i want the out put to be
column_name
1
2
3
4
Edited by: vidya.ramachandra on Dec 14, 2009 8:24 AMAside from the fact you're responding to an old thread...
1002424 wrote:
While using CONNECT BY, I see it always leave behind one row.
Suppose I have a condition based on which I have to generate constant rows like
SELECT 1 FROM DUAL WHERE ROWNUM < N;
Here if N = 0, still it gives out single row.... you are obviously doing something wrong in your code elsewhere, because that SQL statement does not always return a single row...
SQL> SELECT 1 FROM DUAL WHERE ROWNUM < 0;
no rows selected
SQL> -
Easy Question:Select many rows from a table and execute BAPI for these rows
Hi Experts,
I have created one WD project. The WD project fetches some records of backend using BAPI and displays in a table. I have to select some rows from the table and then execute BAPI for selected rows.
How I can select multiple records from the table and then execute another BAPI for selected rows.
Regards,
GaryHi,
In the Node which you binded to the table create one more attribute of type boolean.
For example your node is as below:
//Table Node
TableNode
> Att1
> Att2
> isSelected(boolean) - Newly created attribute for this requirement.
//Result Node contains the elements selected in TableNode
ResultNode
>Att1
>Att2
Now in the table create one more Column with Checkbox as tablecell editor. Now bind this boolean attribute to that check box.
Now in the code you can get the selected rows by user as below:
for(int i=0;i<TableNode().size();i++)
if(wdContext.nodeTableNode().getTableNodeElementAt(i).getIsSelected()==true)
IPrivateTestView.IResultNode element=wdContext.createResultNodeElement();
element.setAtt1(wdContext.nodeTableNode().getTableNodeElementAt(i).getAtt1());
element.setAtt2(wdContext.nodeTableNode().getTableNodeElementAt(i).getAtt2());
wdContext.nodeResultNode().addElement(element);
Regards,
Charan -
Selecting multiple rows of a table
Hi Forum,
How to select multiple rows of a table at a time? Please help me..
Thanks
SwapnaHi Swapna,
To select more then one row in table, just set the selectionmode property of table to 'multi' or 'auto' and also change the selection property of the node (to which table is binded) to 0:n.
I hope it helps.
Regards
Arjun
Edited by: Arjun on Feb 4, 2009 11:52 AM -
Select discontiguous rows in a table with the keyboard
I am using jdk 1.3.1 and have tried this on 1.4 as well. I don't seem to be able to select discontiguous rows in a table using the keyboard. I can Ctrl-click with the mouse to do this but can't find a way to do this with the keyboard. I searched and found somebody asked this same question before and the reply was it works in 1.3.1. I am not seeing this. What could I be missing? The Ctrl-Up and Ctrl-Down keys don't do anything and neither does the spacebar.
I'm pretty sure you can't do this using the standard JTable interface.
You might be able to write your own keyboard listener and fake focus events for up&down arrow, but making this work seamlessly with JTable seemss like it would not be trivial. -
Unable to select any row(s) in table/ALV
Hi ,
I am having a problem while selecting a row in a table/ALV.
I am displaying data in a table which is NOT set to 'Initialize lead selection' in the context.When it is displayed and I try to select a row the row does not get selected(highlighted) in the view.
However,I am able to perform tasks on 'Onselect' event on the rows.Just that its not getting highlighted neither in table nor in ALV.
What could be the reason for this ? I do not want the context element to be set as 'Initialize lead selection' as that would highlight the first line of the table when the view is rendered first time.
Thanks for your help,
Sandip.hi sandip,
Try this method
lo_table_sett TYPE REF TO if_salv_wd_table_settings.
lo_config_tab TYPE REF TO cl_salv_wd_config_table.
lo_config_tab = lo_ref_interface_controller->get_model( ).
lo_table_sett ?= lo_config_tab.
lo_table_sett ->SET_SELECTION_MODE( value ).
value- '00' for auto
'02' for single
'04' for multi
'06' for none
'07' for singleNolead
'08' for multi Nolead
Regards,
janakiram -
Application import halts on clicking at "Next" Button after selecting file
Hi,
I'm trying to import an application to another server but import hangs after clicking at the "Next" button after I have selected the file to be uploaded.
I do can import the application on apex.oracle.com and in the same server
version for toolkit is 10.1.2.0.6
database version 9.2.0.7
The javascript error showing on the page complains on a function( x_Show ).
Any ideas about what's wrong?
/ JannisThanks for letting us know what fixed it for you. You just made me realise why my install of Apex 3.0 on XE didn't work - I had the same symptoms as you. I hadn't set up the image folders, which I've read about elsewhere since then, but I hadn't connected the two before.
Cheers
Richard -
How to select one row in a table with radio button
Hi all.
I have a VO where there is an attribute (isDefault [String]) that identifies the default record in the view. The possible values are 'Y' for yes and 'N' for no. Obviously only one record can have the 'Y' value.
In my page I have created an ADF Table (with the usual data control drag & drop). I would to transform the default inputText of "isDefault" field with a selectOneRadio component in order to permit the user to select (and save contextually in the DB) the default row of this table.
Can you explain me how? I'm using JDeveloper 11.1.1.4.
Thanks in advance.
BaduelBaduel wrote:
Cvele,
thanks for your responses. Yes, it's easier to use af:selectBooleanCheckbox but I need that the selection is mutually exclusive (only one row can be selected). >If this is possible also with the boolean checkbox please tell me how.- Let's try with CheckBox :
1. At the ViewObjectImpl level (for example, YourViewObjectImpl), add the following code:
private oracle.jbo.Key currSelectedRowKey = null;
public void doRowSelection(Key newKey) {
// de-select old one
if (currSelectedRowKey != null) {
Row[] rows = findByKey(currSelectedRowKey, 1);
if (rows != null && rows.length > 0)
rows[0].setStatusAsBoolean(Boolean.FALSE); // cast to the appropriate row Impl class if need !
// remember a new selected row key:
currSelectedRowKey = newKey;
}In the ViewRowImpl, in the transient attr settter, do as follows:
public void setStatusAsBoolean(Boolean value) {
setStatus(value.booleanValue() ? ONE : ZERO);
if (value.booleanValue()) {
YourViewObjectImpl vo = (YourViewObjectImpl)getViewObject();
vo.doRowSelection(getKey());
} P.S. The above was not tested at all, but should give you an idea -
How do i select a row when a table is loaded?
Hello Guys
could somebody help me? I'm new to ADF and I'm trying to make a SearchPage. It works but I get this behavior:
#1: I bound the Table with the ResultSet of a EJB-SessionBean find-Method. When the SearchPage is loaded, a the SessionBean-find-Mehod is called. I want, that the Table only shows the ResultSet when the CommandButton "Search" is clicked not on PageLoad.
#2. In the ResultSet shown in the table no row is preselected. How can i change that?
# 3. The Table is placed in a TabbedPanel in a showDetailItem "SearchResult". After i select a row I want to show the Details of the selected row-Object in anoteher showDetailItem "Details". How could i handle that?
Thnx a lot for your Help!Hello Frank,
thank you for responding!
#1) I tryed #1 but i got the Exception Illegal . I followed the steps you recommended as follow:
a) On the button "Search" add an af:setPropertyListener. It looks like this:
<af:commandButton actionListener="#{bindings.getDelegateFindAllBySearchCriteria.execute}"
text="Suche starten"
disabled="#{!bindings.getDelegateFindAllBySearchCriteria.enabled}"
id="cb1" inlineStyle="margin-left:8px;">
<af:setPropertyListener from="#{true}" to="#{viewScope.executeOK}" type="action"/>
</af:commandButton>
b) Have the RefreshCondition property on the iterator in the pageDef file looking for a memory flag e.g #{viewScope.executeOk==true?true:false}. In the ExpressionBuilder I get "#{adfFacesContext.viewScope}" but not #{viewScope}
I got an error message writing this in de pageDefinition. It accepted: #{viewScope.executeOk==true}. It is right, if TRUE -> TRUE, if FALSE -> FALSE
The compiler says: "executeOK is an unknown property"
After that i started the Application and got an
<14.04.2011 16:59 Uhr MESZ> <Error> <HTTP> <BEA-101020> <[ServletContext@17109869[app:EHRCPD_PISA_TT module:EHRCPD_PISA_TT-ViewController-context-root path:/EHRCPD_PISA_TT-ViewController-context-root spec-version:2.5]] Servlet failed with Exception
java.lang.IllegalStateException
at oracle.jbo.uicli.binding.JUSearchBindingCustomizer.getViewCriteria(JUSearchBindingCustomizer.java:2161)
#2) I set DisplayProperty to "selected" but it did not works. I checked the rows (they are 2) but they are the same. If i debbug the application i see, that the resultSet got from the Database (JPA) is OK. The size of the resultSet is 2 and the Objects retrieved are different. What i'm doing wrong?
#3) This worked perfectly! Thank you!
I hope, I get this working.
Thnx again
Maybe you are looking for
-
I was having trouble with synching my iphone 5 since the new operating system was installed. But I was waiting for my 6+ and figured it would be solved with my dandy new phone. No such luck. I downloaded a great deal of music and then added to it
-
Partner Function in Project Definition Level
Hi All I understand that it is possible to determine what are the partner functions available to the project based on the value indicated in the partner determination field of the project. The list of partner functions to be available are maintained
-
I am unable to successfully download updates to my Apple TV. I am stuck on software 5.1. Am I going to just have to buy a new Apple TV or can Apple TV be repaired. Anybody know any tricks. I am connected to Internet with through a power line adapter.
-
Multiple JTextPane Interesting Implementation for serial numbers entries
Hi fellows, I am trying to implement as simply as possible a multiple JtextPanes Entries that would behave the same way as serial number entries in classic installshields. Let there be 4 JTextfields : txt1 txt2 txt3 txt4 So I would like to: A\ get th
-
Layout doesn't look the same on all screens...
I've just designed the layout and background for a new site, www.utopiapetsitting.com, and when my client looked at it on his wide screen monitor, it showed up all on one side of the screen. Ideally, I think I'm having trouble setting the background