on 04-02-2009 1:39 PM
Hi Colleagues,
We have a requirement where
we will get the URL's(number of URL's changes according to the ouput) as query output
These URL's need to be Displayed on the screen
Here in our code we are getting URL's in this way
for (int j=0; j < finalResult.size(); j++)
{
RESULT result = (RESULT)finalResult.get(j);
wdComponentAPI.getMessageManager().reportSuccess(result.getURL()+ " " + result.getURLNAME() );
}
Could anyone please let me know How to bind these URL and URLName to the Context
and Get these URL's displayed(no of URLs returned by Query) on the View
Manythanks & Regards
Swetha
Hi
in the below code the PatResult size is 2
for (int j=0; j < PatResult.size(); j++)
{
result = (PAT)PatResult.get(j);
wdComponentAPI.getMessageManager().reportSuccess(result.getURL()+ " " + result.getDLOBJNAME() + "" + result.getDLOBJTITLE());
element = wdContext.createElementsElement();
element.setURL(result.getURL());
element.setURLLabel(result.getDLOBJTITLE());
wdContext.nodeElements().bind(element);
wdComponentAPI.getMessageManager().reportSuccess("URL is"+element.getURL());
wdComponentAPI.getMessageManager().reportSuccess("FileName is"+element.getURLLabel());
/*wdContext.currentElementsElement().setURL(result.getURL());
wdContext.currentElementsElement().setURLLabel(result.getDLOBJTITLE());*/
}
When i bind it to the context as mentioned above and get the node size using
wdComponentAPI.getMessageManager().reportSuccess("elements node size is "+wdContext.nodeElements().size());
it si returning nodesize as "1"
actually it should return two URL's
but now the context node element is returning only one URL?
Could anyone please let me know...i am missing something
is it something like we have set the nodesize before?
Thanks & Regards
Swetha
Edited by: Swetha Nellore on Apr 3, 2009 9:07 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
for (int j = 0; j < PatResult.size(); j++)
{
result = (PAT) PatResult.get(j);
element = wdContext.nodeElements().createAndAddElementsElement();
/* in old releases use: createElementsElement() + addElement() */
element.setURL(result.getURL());
element.setURLLabel(result.getDLOBJTITLE());
}
Armin
Either use a Table UI element with a LinkToURL as cell editor, or create LinkToURL UI elements inside wdDoModifyView().
When using a Table, create a context node "Result" with an attribute "url" and bind the cell editor to the attribute. Fill the context node from your result set.
When using individual LinkToURL elements, use setReference() to assign the URLs from result to the links.
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
25 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.