How to get the selected node value of a tree which is build on java code
Hi Experts,
How can i get the selected node value if I build the tree programatically.
I am using the following code in selectionListener but it is throwing error.
RichTreeTable treeTable = (RichTreeTable)getQaReasontreeTable();
CollectionModel _tableModel =
(CollectionModel)treeTable.getValue();
RowKeySet _selectedRowData = treeTable.getSelectedRowKeys();
Iterator rksIterator = _selectedRowData.iterator();
String selectedQaCode ="";
while (rksIterator.hasNext()) {
List key = (List)rksIterator.next();
JUCtrlHierBinding treeTableBinding =
(JUCtrlHierBinding)((CollectionModel)treeTable.getValue()).getWrappedData();
JUCtrlHierNodeBinding nodeBinding =
treeTableBinding.findNodeByKeyPath(key);
String nodeStuctureDefname =
nodeBinding.getHierTypeBinding().getStructureDefName();
selectedQaCode = selectedQaCode + nodeBinding.getAttribute(0);
where I am using following link to create a tree with java code.
http://one-size-doesnt-fit-all.blogspot.com/2007/05/back-to-programming-programmatic-adf.html
Please help me in resolving this issue.
Regards
Gayaz
Hi,
you should also move
JUCtrlHierBinding treeTableBinding =
(JUCtrlHierBinding)((CollectionModel)treeTable.getValue()).getWrappedData();
out of the while loop as this is not necessary to be repeated for each key in the set
Frank
Similar Messages
-
How to get the selection parameter values to Posting logic method
How can i read the selection parameter values at " posting logic" method, which are given in " Select Option function module"?
max bianchi wrote:
Hi
>
> The selection-screen data are stored in ABAP memory, so it need to clear it .
>
> Now how set ID parameter can depend on SAP release, anyway in ECC 6 this should work:
>
>
INITIALIZATION.
> DATA: BEGIN OF MEMKEY,
> REPORT TYPE SY-REPID VALUE SY-REPID,
> VARIANT TYPE RSVAR-VARIANT,
> INT_MODE(2) TYPE N,
> KIND(1) TYPE C,
> END OF MEMKEY.
>
> SYSTEM-CALL INTERNAL MODE INTO MEMKEY-INT_MODE.
> FREE MEMORY ID MEMKEY.
>
> But in this way it'll clea whole selection-screen...do you wnat do it?
>
> Max
@Max : The above hack seem to work fine unless you assign a 'DEFAULT' value to the selection fields.
@OP : Here is an other work around, however, this approach needs an additional effort to create
new PF-STATUS('MYLIST') and assign a function code of your choice to the function keys in the standard toolbar and handle them in the 'AT USER-COMMAND' event as shown below. Let us know if you have/find any issues with this.
PARAMETERS:
p_test TYPE char5 DEFAULT '123'.
AT USER-COMMAND.
CASE syst-ucomm.
WHEN 'MBACK'.
SUBMIT zytest WITH p_test = '' VIA SELECTION-SCREEN.
ENDCASE.
START-OF-SELECTION.
SET PF-STATUS 'MYLIST'.
-Rajesh. -
How to get the selected values from the shuttle
Hi
Please tell me how to get the selected option values from the shuttle leading list.
Thanksyou can also obtain the option values present in the leading and trailing lists using the
following methods:
public String[] getLeadingListOptionValues(OAPageContext pageContext, OAWebBean
webBean)
public String[] getTrailingListOptionValues(OAPageContext pageContext, OAWebBean
webBean)For example, the following code sample returns an array of values in the trailing list, ordered according to the
order in which they appear in the list:
String[] trailingItems =
shuttle.getTrailingListOptionValues(pageContext, shuttle);Thanks
--Anil -
How to get the selected value in SelectOneMenu in backing bean
Hello all,
I need your help. I want to have 2 select menus with the second menu's items list are populated based on the selection in the first menu. I don't know how to get the selected value in the backing bean so that I can based on that select menu to populate the second menu's item list. Basically I need to access to the UI Component of the first select Menu and retrieve its selected value.
Could you help me out?
Thank you very much in advance,
LngoHi Lingo,
There r two ways of getting the values into the list. First one is hardcoding the values and the second one is use the list and get the values into the list by firing a query in the database.
Inorder to display the values in the second menu based on the first onces selection we need to add an attribute to the first selectonemenu known as valueChangeListener and we need to sumit the page.
Here is the sample code
<h:selectOneMenu id="catalogue"
binding="#{urbean.catalogue}" onchange="submit()"
valueChangeListener="#{urbean.categoryValueChange}"
<f:selectItem itemLabel="Select Catalogue" itemValue="" />
<f:selectItems value="#{urbean.catalogueList}" />
</h:selectOneMenu>
<h:selectOneMenu id="category"
binding="#{urbean.category}"> <f:selectItem itemLabel="Select Category" itemValue="" />
<f:selectItems value="#{urbean.categoryList}" />
< </h:selectOneMenu>
now in method called by valuechangelistener we need to write the similar code
public void categoryValueChange(ValueChangeEvent event) {
String rfnum = (String) event.getNewValue();
List categoryList = new ArrayList();
List tempList = new TablenameDAO().getActiveCatByCatalogueID(rfnum);
for (int i = 0; i < tempList.size(); i++) {
Tablename tablename = (Tablename ) tempList.get(i);
String value = "" + tablename .getrfnum();
String label = tablename .getname();
if (label == null) {
label = "";
SelectItem item = new SelectItem(value, label);
categoryList.add(item);
bean.setCategoryList(categoryList);
///getActiveCatByCatalogueID (rfnum) should bring the records which r based on the rfnum
if u follow this process i am damsure that u will get the values in to the secondlist based upon the first list
Thanks & Regards
Manidhar -
How could i get the selected node in the JTree
getLastSelectedPathComponent() �returns the parent node of currenr selected, so how could I get the selected node itself in the JTree
I will appretiate for any help!i think you can get by....
TreePath treePath = tree.getSelectionPath();
DefaultMutableTreeNode treeNode = (DefaultMutableTreeNode) treePath.getLastPathComponent(); -
How to get the current node element by its value?
e.g,:
wdContext.current<b>Deal</b>Element().setAttributeValue("<i>deal_id</i>","<i>aaaaaaa</i>");
above code can get the result i wanna.
but now i wanna in terms of its node'name to set attribute vaue of itself. in other words,i have no idea about how to get the current node element by its name"<b>Deal</b>".Hi Wing,
The answer is there in your question itself.
wdContext.currentDealElement()
will give you the current node element by its name"Deal" or you could use
wdContext.nodeDeal().getCurrentElement()
or you could use
wdContext.nodeDeal().getElementAt(wdContext.nodeDeal().getLeadSelection())
Regards,
Sudeep -
How to get the selected rows & columns in the table?
hi everybody,
In my application the table is kept inside the event structure.I select the cells in the table (using mouse) on running time.How to get the selected number of rows & columns in that table?Hello,
You can fill selected values of the table by writing to it or the corresponding property using a property node - the table is just a 2D array of strings. I think for your "disable" question you are referring to the shortcut menu (when you right click). If you are using LabVIEW 8.x, you can edit or disable that shortcut menu - just right click on your table at edit time and choose Advanced >> Run-Time Shortcut Menu.
Best Regards,
JLS
Best,
JLS
Sixclear -
How to get the selected cell in a Matrix.
Hi all,
Does any one know how to get the selected cell in a Matrix. Please help to answer. Thanks in advance.
Regards,
Thanh TranHi,
You can get the value of every cell using UI API but using datasources is a better aproach.
Using UI API you need to know the event you want to catch. Example: Catching click event in itemcode column and getting the value (C#):Ki
if ((pVal.EventType == BoEventTypes.et_CLICK) && //CLICK EVENT
(pVal.ItemUID == "38") && //MATRIX-> ITEM 38
(pVal.ColUID == "1") && //ITEMCODE COLUMN
(!pVal.InnerEvent) &&
(!pVal.BeforeAction))
Form form = null;
try
form = kernel.Application.Forms.Item(pVal.FormUID);
form.Freeze(true);
Matrix mtx = (form.Items.Item(pVal.ItemUID).Specific as Matrix); //MATRIX OBJECT
string itemCode = (mtx.Columns.Item("1").Cells.Item(pVal.Row).Specific as EditText).Value.Trim(); //itemcode = VALUE OF CELL. COLUMN "1": ITEMCODE COLUMN. CURRENT ROW: pVal.Row
catch (Exception ex)
kernel.Application.MessageBox("Error " + ex.Message, 0, "", "", "");
finally
if (form != null)
form.Freeze(false);
Kind regards,
Nauzet Díaz -
How to get the current month value for a customer exit variable?
How to get the current month value for a customer exit variable?
And also if we have an InfoObject with date value (including date, month, year), then how to derive the month value from this date type of Char.?
Thanks!Hi Kevin,
Check here........
Re: Customer Exist for "From Current Date To Month End"
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/25d98cf6-0d01-0010-0e9b-edcd4597335a
Cal month
Regards,
Vijay. -
How to get the Change node in Production Server!!!!!
Hi Guys,
Kindly let me know how to get the Change node in Production Server for the Transaction Code Pe03 for generating the Acknowledgement No for the year 2008 .
Plz provide me the steps how to get the Change Node for Acknowledgement No so tat i can get the configuration done.
Regards
Ansuman Mohanty.Hi Mr!
If you want to generate the e-file feature 40ACK, do it in our Customization client box (Golden box) & save the request & move to Quality & production.
Still if you need to workout only in Production, than with the help of Basis people you can get the Production change mode for 5 to 10 min time & can generate it. But mostly Basis people wont give us change mode for Production box ... with ur request they can do..try it.
Did u collected 4 quarter TAN no's for 2008 Quarter...if not collect it & generate it at a time.
All the best:-)
Kind Regards,
Saisree.S -
How to get the selection parameters from logical database into one of the t
Hi Sap ABAP Champians,
How to get the selection parameters from logical database into one of the tab in the tabstrip selection-screen.
Please help me for this
Thanks
BasuHi
Thanks, that will work, but then I'll have to insert code into all my reports.
I can see that "Application Server Control Console" is able to rerun a report.
This must mean that the Report Server has access to the runtime parameters.
But how?
Cheers
Nils Peter -
How to get the latest procured value of a spare updated in material master
How to get the latest procured value of a spare updated in material master
J S S PRASAD
See table MBEW via transaction SE16.
However, you may need to look at the last PO created for that material.
PeteA -
How to get the anchor tag values in next jsp
Hey all,
I have two jsp files.
in first jsp,
I am getting the resultset.
I am setting the resultset to the anchor tag.
below is the code...
<a target="_top" rel="contents" rev="contents" class="fordynamiclabel" href="ASCMasterTwo.jsp"><%=rSet.getString(1) %></a></td>
whenever he click on any anchor tag,
It will goes to ACSMasterTwo.jsp page for edit the compleate record.
how to get the anchor tag value in that page...
Please help me on this.You have to pass a parameter. An id is good.
Of course you have to get an id from somewhere in the result set right?
<a target="_top" rel="contents" rev="contents" class="fordynamiclabel" href="ASCMasterTwo.jsp?id=<%= rSet.getString("id") %>"><%=rSet.getString(1) %></a></td>Then you call
request.getParameter("id");
and look up the values related to that id in the database. -
How to get the previous record value in the current record plz help me...
In my sql how to get the previous record value...
in table i m having the field called Date i want find the difference b/w 2nd record date value with first record date... plz any one help me to know this i m waiting for ur reply....
Thanx in Advance
with regards
kotreshFirst of this not hte mysql or database forum so don;t repeate again.
to get diff between two date in mysql use date_format() to convert them to date if they r not date type
then use - (minus)to get diff. -
I have an Apple I Phone 4S which is great but, can someone help me how to get the photos and videos to my PC which runs on MS XP. I would like to be able to edit and copy photos and videos to a DVD.
Connect your iPhone to your computer. Tp your pc should recognize your iPhone as a camera. Use what ever application you have on the pc to transfer files from a camera to your computer.
Maybe you are looking for
-
Partitioning Hard drive for Windows Use
Hopefully someone has the solution to this. I have been trying to partition part of my hard drive for the past couple of days because there is a program I need for a class I am taking that only works in Windows. Every time I try to partition a portio
-
There is a serious problem with my 2nd gen 16 gig touch
ive had this problem for almost a couple months now,and its only been recently that i started to seek some real help. - for starters, my ipod crashes.... All the time. when its running, i can play music, go thru apps, etc, but not very long, as it ju
-
Portege R100: FDISK and HDD format takes very long time
I have Portege R100 and when I tried to run FDISK it take very long time to Create a DOS partion. After running FDISK I tried to do FORMAT the HD and is taking more than 6 hours to Format hard drive. After Format I tried to Load Win XP but it system
-
Hi I have installed the required .Net software, but never the less I've got this message. Could you please help me out ? Thanx in advance Pia TITLE: Microsoft SQL Server Management Studio Cannot show Query Designer. ADDITIONAL INFORMATION: Exception
-
Application Server 10 g Load Handling statistics
Hi, We are in planning stage, to deploy multiple applications used by our organization onto Oracle 10 g Application Server am scratching my head on designing appropriate infrastructure for these applications.Can any one please guide me to a document