Dynamic tree
Hi,
I have a dynamic tree on the page1 and I need to send 2 parameters to page2.
I tried this:
ownerNode.setUrl("/faces/cars.jsp?ownerId=" +
ownerDataProviderARKM.getValue("OWNER.OWNERID").toString())"&owId=" + ownerDataProviderARKM.getValue("OWNER.OWNERID").toString());
I have 2 tables on page2; owner information and his cars.
How should I do this?
Thanks
[412 byte] By [
enskaa] at [2007-11-26 15:12:58]

# 2
Hi.In dynamic tree example page 2 get 1 parameter:String parmTripId = (String)getExternalContext().getRequestParameterMap().get("tripId");I have tried to receive 2 parameters changing this code, but with no success.How could I get this working?Thanks
# 4
In the example given here: http://blogs.sun.com/divas/entry/workaround_for_dynamic_trees ( i happen to be seeing this example just now and since i have so many problems with tree in a page fragment), you could try to get the two parameters on page 2 as follows:
String ownerId = (String)getExternalContext().getRequestParameterMap().get("ownerId");
String owId= (String)getExternalContext().getRequestParameterMap().get("owId");
In the example, this has been done in prerender method.
If you have further problems let us know.
# 5
Thanks.
If I do like this:
String ownerId = (String)getExternalContext().getRequestParameterMap().get("ownerId");
String owId = (String)getExternalContext().getRequestParameterMap().get("owId");
if (ownerId != null) {
Integer ownerid = new Integer(ownerId);
Integer owid = new Integer(owId);
try {
getRequestBean1().getOwnerRowSet().setObject(1, ownerid);
getRequestBean1().getCarRowSet().setObject(1, owid);
ownerDataProvider.refresh();
carDataProvider.refresh();
} catch (Exception e) {
error("Cannot display " + ownerid);
log("Cannot display " + ownerid, e);
}
}else {
error("No owner id specified.");
}
From Tomcat log I found: Statement parameter 1 not set.
On the addressbar parameters seems to be OK.