on 10-17-2005 9:36 AM
Hi,
I have a table with a single column which lists 'Company names'. I have links A,B...Z on top, when i click on these links i want the 1st element in the table to be the Company with the clicked letter and the rest of the companies will follow. How do i do this? Is there any other better way to obtain such a display where the user sorts the company by the letter he clicks? Can i use the property 'firstvisisblerow'in some way?
Thanks.
Helo Sunil
are u populting these values from database? if yes u can query the DB with the selected letter(sort using the selected letter). now populate the table with the resulting ResultSet.
Else u can set the index for a perticular element (node().moveElement(int from, int to)). eg: if u are selecting "P", u have to traverse the whole node and when u encounter any company starting with "P" set its index to 0,1,2... accordingly.
Regards,
Piyush.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
If i have 24 links representing all the alphabets, can I have a single action associated. If yes, how do I get the value of the text clicked i.e the different letters. Suppose I click 'A' then I need to get this so that I can compare it with the 1st letter of the Table elements. How do I do this?
thanks
Define an action parameter "letter" of type string.
In wdDoModifyView():
Let A = { a_0, ..., a_n-1 } be your alphabet, and let your links have the ID's L_0,...,L_n-1:
if (firstTime)
{
for (int i = 0; i < n; ++i)
{
IWDLinkToAction link = (IWDLinkToAction)
view.getElement("L_" + i);
link.mappingOfOnAction().addParameter("letter", a_i);
}
}
Then the action (event handler) parameter "letter" will contain the letter corresponding to the clicked link.
Armin
Hi Armin,
Thanks a lot for the solution. I had one small doubt though :
<b>Let A = { a_0, ..., a_n-1 } be your alphabet</b>
where do I specify this, and what is it exactly?
<b>Further more</b> : When I get the clicked letter in the action paramater, I need to then compare this string (alphabet)with the 1st letter of every element in a table (which I get from the backend). Then depending on the element that matches the letter I need to bring those to the top of the table. Any idea how can I go abt doing this?
Thanks..
Hi Sunil,
Go to this link .It deals with sorting in tables
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/webdynpro/tu... on creating tables in web dynpro - 11_0_.htm
Regards
Rohit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.