ADF Treetable row already selected?
How can I check if a row in the tree table is already clicked/selected?
1) create a binding for treetable in the managed bean
2) you could check if a row is selected or not - by checking the following:
treetable.getSelectedRowKeys()This returns RowKeySet containing all the selected rows in the treetable.
Thanks,
Navaneeth
Similar Messages
-
Keeping track of rows already selected
Hi. I'm somewhat a T-SQL noob. The answer to my question may be obvious, but I just want to see if I have any options. I need to scan a table for rows where a column contains a certain value, and then send an email
to notify users of the resultset. I'll run that scan say hourly. The table I'm scanning is in a vendor-owned database that I can't modify. So I guess I need to keep track of previously selected rows so I don't keep notifying
users of the same resultset, and store those in a persistent table in a separate utility database. Right so far? Thanks for helping me get started.Ok, so what you'll want to do then is just select rows that have been edited in the last hour:
SELECT *
FROM myTable
WHERE last_updated_on >= DATEADD(HOUR,-1,CURRENT_TIMESTAMP)
And you'll only get the rows that have been updated in the last hour :)
Don't forget to mark helpful posts, and answers. It helps others to find relevant posts to the same question. -
How to list selected parent and child rows with values from ADF TreeTable
I created one tree table having three levels using DepartmentsVO, EmployeesVO and
JobHistoryVO where these tables contains parent and child relationship on database.
Then i added one more column to the tree table which displays selectBooleanCheckBox. This
check box is available for parent and child rows in that column.
My first concern is i
want to list out all the parentids and its child ids from three levels where the check
box is selected.
second concern is
if i select the check box for a parent row, then the remaining check boxes for child rows also select automatically which are comes under the parent row.
Thanks in advance.
jkhi Frank,
Thanks for the quick reply...
As I mentioned before I am able to get the children using JUCtrlHierNodeBinding. but wanted to change the value of child row which have specific data.
Is it possible through JUCtrlHierNodeBinding to update data of child and parent?? If so then can you please post the code snippet for the same???
Viral -
ADF multiple row selection using checkbox
One of the basic feature missing in ADF 11g is multiple row selection using checkbox (ADF supports multiple row selection by CTRL+CLICK) and business users doesn't like the idea of CTRL+CLICK especially when the volume of click is more. Our requirement is to show the records as selected, on click of checkbox. We implemented multiple row selection by giving a checkbox and on submission, iterate all the rows and filter only selected rows for further processing. The approach works fine,but it is very slow when the volume of data is more, say 10 thousand rows. For 4 thousand records, iterating everything takes more than 200 secs !
Had the multiple row selection been the ADF standard way using CTRL+CLICK, and retrieving the selected rows using method theTable.getSelectedRowKeys() works much faster (completes in millisecs for 4 thousand records). Somehow ADF fetches the selected records much faster this way. Our requirement is on click of the checkbox, the ADF should select the records ( the same way it is doing CTRL+CLICK) and all such selected rows should be retrievable using the ADF method theTable.getSelectedRowKeys()
Is there any way it can be done?
Regards,
Antony.Hi All,
We have implemented the select and select all using check-box and it is working fine. Issue here is the performance is too slow
Assume SelectValue is the VO coulmn for the checkbox to select the values. To filter out the selected rows, we use the following line
Row[] pidRows = pidView.getFilteredRows("SelectValue", Boolean.TRUE);
it is very taking more than 2 minutes if the total number of rows are *4 thousands* and only if 2 rows are selected.
Whereas with the CTRL+CLICK standard approach, ADF has a built in API theTable.getSelectedRowKeys(); to get only the selected rows, and the built in API takes only few milliseconds to get the selected rows. Users are not agreeing to the CTRL+CLICK approach as it is not user friendly. Suggest if there is a way to make the select box to make it work the same way as CTRL+CLICK.
code snippet to do the standard way :
RowKeySet sk = theTable.getSelectedRowKeys();
_logger.info("row count of select "+sk.getSize());;+
Iterator selection =sk.iterator();
EmpVORowImpl empRow = null;
+while (selection.hasNext()) {+
Object rowKey = selection.next();
theTable.setRowKey(rowKey);
rowdata = (JUCtrlHierNodeBinding)theTable.getRowData();
empRow = (EmpVORowImpl)rowdata.getRow();
_logger.info("Emp # "+empRow.getEmpno() +" Emp Name : "+empRow.getEname() +" Is selected ? "+empRow.getisChecked());+
+}+ -
ADF Treetable scrolling position resets to top on refresh
I have a master details page with the following components.
TreeTable with a Check Box on LHS and TabbedPannel on RHS.
So, users can select any row on the LHS and the corresponding details will be displayed on RHS in a new Tab. When user closes the Tab it will clear the Check Box on TreeTable.
Issue is, when user is at last row of TreeTable when there are more rows (Scroll bar will be at last), and user closes the Tab on RHS side, I will be clearing the checkbox binding and refresh the treetable using PPR to reflect the same.
This is causing the treetable scroll bar to be reset to the top. And User lost the old position on needs to scroll down again.
Can we control the Scroll bar position after PPR refresh (or)
Can we just clear off the CheckBox selection (only one row) with out refeshing the whole treetable
Environment:
JDev Version : 11.1.1.6.2
Component : ADF TreeTable with TreeModel binding (Not using BC)In my case, I am fine with disclosureState items. They do not collapse even after I remove the checkbox selection and refreshing the TreeTable component.
Only issue is scrollbar is resetting to top.
I can't use the disclosure event as they can do expandAll , select first compoenent scroll down and close the selection on RHS tab.
Which will reset the LHS scrolling position to top. -
Adf TreeTable, collapsed and expand property.
Hi,
I want to set some instructional text on UI based on whether af:treetable row is expanded or collapsed. Is there any property that I can use on UI that give this information?
I am using adf, Oracle JDeveloper 11g.
Thanks
-RishabhHi Frank,
In Treetable I have two columns and one column in nodeStamp. For example, node column show name of "application", second column show names of scholarships and the third column has commandbutton to apply for that application. Each row in application can be expanded to see list of scholarships attached to that application. Here is the code for this....
<af:treeTable value="#{bindings.SaAppListVO1.treeModel}"
var="node"
selectionListener="#{bindings.SaAppListVO1.treeModel.makeCurrent}"
id="treeTable" expandAllEnabled="true" rowBandingInterval="0"
width="94%" columnStretching="column:application"
columnBandingInterval="0"
disableColumnReordering="true"
summary="List scholarships attached to application"
rendered="#{ bindings.SaAppListVO1.estimatedRowCount > 0}">
<f:facet name="nodeStamp">
<af:column headerText="Application"
id="application">
<af:outputText value="#{node.AppName}"
rendered="#{node.AppId1 ne null}"
inlineStyle="font-size:12px; font-weight:bold;"/>
</af:column>
</f:facet>
<f:facet name="pathStamp"/>
<af:column headerText="Scholarships" width="300" noWrap="false">
<af:panelGroupLayout layout="horizontal">
<af:goLink styleClass="csaLink" text="#{node.ScholarshipsName}">
<af:showPopupBehavior triggerType="click"
popupId="::notewindow"/>
</af:goLink>
<af:image shortDesc="Need-Based"
source="/images/gold.png"
rendered="#{node.IsNeedBased == 'y'}"
inlineStyle="text-align:left;"/>
</af:panelGroupLayout>
</af:column>
<af:column align="center">
<af:commandButton text="Apply!"
rendered="#{node.AppId1 != null}"
action="apply_new">
<af:setPropertyListener from="#{node.AppId1}"
to="#{pageFlowScope.appId}"
type="action"/>
</af:commandButton>
</af:column>
</af:treeTable>
My question here is, where node row is in collapsed mode there is nothing in "scholarship" column. And when it is expanded it list all the scholarship. What I want is to add a text message in that column showing how many scholarships are there for that application in collapsed mode.
Is there any way for doing this?
Thanks,
-Rishabh -
Hide disclose icon form ADF tree row depending on row data
Hello,
I've got an ADF tree based on recursive View Object. So basically we don't know how many tree levels are there, but depending on a row data we know that the row is a leaf and there will be no children rows.
But the disclose icon is there event though we definitely know it is currently useless.
So is there any way to hide the disclose icon from ADF tree(treetable) row depending on row data?
Thanks.
ADF 11R2Great, it works.
The only thing is suggested style just makes the icon invisible, but it is still there and can be clicked.
I applied .hideDiscloseIcon af|treeTable::collapsed-icon-style
display: none;
}and there is no disclose button at all. -
How to make first row as selected in af:table
Hi,
I am using JDeveloper 11.1.1.4 and ADF-BC in my application.
In all the pages across my application we have multi select enabled for the table[af:table].
But when the pages are displayed,the first row is not selected by default.
My requirement is to display first row as selected across all the tables in my app.
I have the selectionListenerset as for example selectionListener="#{bindings.RSCMapVO2.collectionModel.makeCurrent}" in all the pages.
Please suggest on how to make first row as selected.
Regards,
PraveenHi
Put these codes in your selection listner method(You have to define a selectionListner method in your backing bean and put this code segment
(Special thanks go to Franks how posted this code segment. threadID=1089583)
RichTable yourTable = (RichTable) selectionEvent.getSource();
//the Collection Model is the object that provides the structured data
//for the table to render
CollectionModel yourTableModel = (CollectionModel) yourTable.getValue();
//the ADF object that implements the CollectionModel is JUCtrlHierBinding. It
//is wrapped by the CollectionModel API
JUCtrlHierBinding yourTableBinding = (JUCtrlHierBinding) yourTableModel.getWrappedData();
//Acess the ADF iterator binding that is used with ADF table binding
DCIteratorBinding yourTableIteratorBinding = yourTableeBinding.getDCIteratorBinding();
//the role of this method is to synchronize the table component selection
//with the selection in the ADF model
Object _selectedRowData = yourTable.getSelectedRowData();
//cast to JUCtrlHierNodeBinding, which is the ADF object that represents
//a row
JUCtrlHierNodeBinding nodeBinding = (JUCtrlHierNodeBinding) selectedRowData;
//get the row key from the node binding and set it as the current row in the
//iterator
Key rwKey = nodeBinding.getRowKey();
tableIteratorBinding.setCurrentRowWithKey(rwKey.toStringFormat(true));
Thanks
Padma -
What is the use of additon in up to 1 rows in SELECT statement
Hi All,
What is the use of up to 1 rows in select statement.
for example
SELECT kostl
FROM pa0001
INTO y_lv_kostl UP TO 1 ROWS
WHERE pernr EQ pernr
AND endda GE sy-datum.
ENDSELECT.
I'm unable to get in wat situations we hav to add up to 1 rows
please help me out...
Thanks,
santosh.Hi,
Use "select up to 1 rows" only if you are sure that all the records returned will have the same value for the field(s) you are interested in. If not, you will be reading only the first record which matches the criteria, but may be the second or the third record has the value you are looking for.
The System test result showed that the variant Single * takes less time than Up to 1 rows as there is an additional level for COUNT STOP KEY for SELECT ENDSELECT UP TO 1 ROWS.
The 'SELECT .... UP TO 1 ROWS' statement is subtly different. The database selects all of the relevant records that are defined by the WHERE clause, applies any aggregate, ordering or grouping functions to them and then returns the first record of the result set.
Regards,
Bhaskar -
How to set the first row as selected in single selection of table
when the page renders how do we make the first row as selected for single selection in a table.
Thansk a lot for your helpset the selection Attribute's value to 'Y' for the first row. Thats enough.
eg;
Row row=vo.first();
row.setAttribute("SelectionAttribute", "Y");
--Prasanna -
How to Catch the Event when a Row is Selected in Extended value Selector
Hi All.
I Want to Call the Action when a perticular row is selected in Extended value Selector.
How can I do it
Thanks & Regards
KiranHi Kiran,
Create a seperate view with the table of records same u are showing EVS because with EVS it is not possible to raise any event.
So add ths view to a seperate window and open that window instead of EVS .So here you can raise an event becuse it a view.
Regards
Padma N -
HI again!
I 'm a bit confused about using an adf treeTable component (adf faces 11g).
I've created a down-hierarchy tree with root nodes and child nodes. Now i need to bind an action listener to child nodes only. So i've defined the nodeStamp facet's component as a commandLink and assigned the appropriate action listener to it.
The problem is that it fires now when i click a root node link as well as when i click a child node link. Is there any solution for this?
It would be great at all if it were possible to define the root node component to be something like output text (not command component) and the child component to be a command link.
Thanks in Advance. Alex.You can use a switcher component inside the tree to display different things based on the tree node type #{node.hierType.structureDefName}.
<af:tree value="#{bindings.LocationsView1.treeModel}" var="node"
selectionListener="#{bindings.LocationsView1.treeModel.makeCurrent}"
rowSelection="single" id="t1"
binding="#{backing_index.tree}">
<f:facet name="nodeStamp">
<af:group id="g1">
<af:switcher id="s1" defaultFacet="drag"
facetName="#{backing_index.allowDrag}">
<f:facet name="drag">
<af:panelGroupLayout id="pgl2">
<af:outputText value="#{backing_index.allowDrag}" id="ot3"/>
<af:outputText value="#{node}" id="ot1">
<af:attributeDragSource attribute="value"/>
</af:outputText>
</af:panelGroupLayout>
</f:facet>
<f:facet name="nodrag">
<af:group id="g2">
<af:outputText value="#{backing_index.allowDrag}#{node.selectedRow}" id="ot4"/>
<af:outputText value="#{node}" id="ot2"/>
</af:group>
</f:facet>
</af:switcher>
</af:group>
</f:facet>
</af:tree> -
How display number of row in select statement
How can I display number of row in select statement?
Table
data1 data2
xxx ccd
wss qwe
qws uij
I need get from SELECT statement:
1 xxx ccd
2 wss qwe
3 qws uijuser13734495 wrote:
Thank you from answer.
Statement
select rownum rn, data1, data2 from table
is good.
And what have I do went I use
select rownum rn, data1, data2 from table order by data1
and I get
3 qws uij
2 wss qwe
1 xxx ccd
I need
1 qws uij
2 wss qwe
3 xxx ccdhence the importance of describing the complete problem.
select
rownum,
data1,
data2
from(
select
data1,
data2
from
table
order by
data1) -
Insert table row - moving Selection
Have a table row selected and new data is inserted and the table rows are moving down. When first row is NOT selected and new table row has fired inserted, the selection row programatically moves down.
However if the first row is selected, and new data is added to the first row, the first and second row are selected even tho its programatically should work, just like if the row selected was second, third etc...
What's up with the first table row selected and new data inserted into the first table row to cause selection unions, even tho programatically it shouldn't?
Thanks
Abraham KhalilAfter the row being inserted, have you tried
table.setRowSelectionInterval(row1,row2)?
And in case it is the first row,
table.setRowSelectionInterval(0,0);
And you can even scroll to show the selection if you want by call
table.scrollRectToVisible(getCellRect(selectedRow, 0, true));
which will show the selectedRow
HTH
Bing
-
Disable row in selection pop-up in WebClient UI
Hi,
My requirement is to disable (like greying it out) a row for selection/de-selection in a selection pop-up. I checked the collection wrapper class CL_BSP_WD_COLLECTION_WRAPPER but could not find any appropriate method.
Can anyone tell how to do this?
Additional information:
The selection pop-up that I am talking about is the one that appears while creating a follow-up document for e.g while creating a sales order from a quotation. The pop-up shows the line items from the source document and allows the user to select the line items he/she wants to transfer to the target document.Hi There,
Are you using complete reference between documents in copy control?
Please check on the following path: SPRO->Customer Relationship Management->Transactions->Basic Settings->Copying Control for Business Transactions->Define Copying Control for Transaction Types.
Which scenario Are you currently using? CRM Order or ERP Order?
If you are using ERP Order scenario, please check class CL_ERP_H_HEADEROVERVIEWPA_IMPL method EH_ONFOLLOWUP_SELECTED. The following code is responsible to bring the popup for item selection during the creation of follow-up documents:
create_follow_up_erp_item_sel( iv_process_type = ls_followup-process_type
iv_subobject_cat = ls_followup-subobject_category ).
To solve this issue, I have enhanced the component ERP_H view HeaderOverviewpage and event EH_ONFOLLOWUP_SELECTED, and then desactivated the code mentioned above.
I hope it helps!
Kind Regards,
Gabriel Santana
Maybe you are looking for
-
Iphoto no longer works after my yosemite "upgrade".
A little help here Apple.
-
External USB drive goes to sleep, iPhoto complains when it try's to access it and exits
I moved my iPhoto to an external USB Harddrive and everything at first worked fine. Now I get these errors sometimes "Your iPhoto Library is missing". iPhoto will exit and when you start it again everything is fine. What I think is happening is th
-
Hi, is there any way to get the number of columns (not rows) inside of resultset? thx fishfang
-
Compress the output stream..
Hello every body.. I have aproject that use the java applet to transmit a vedio and audio over the internet network to do a video conference application with other applet at another computer at the network.. I want to support the application so that
-
I'm trying to install a new HP Laserjet 3200 on Solaris 8. How do I do that so that it understands PCL and can print graphics, etc.