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]
# 1
So it's the same id-number that I need to put to 2 querys as parameter.Anybody?
enskaa at 2007-7-8 9:04:08 > top of Java-index,Development Tools,Java Tools...
# 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
enskaa at 2007-7-8 9:04:08 > top of Java-index,Development Tools,Java Tools...
# 3
Still needing help to get 2 parameter for 2 querys to page2 from dynamic tree. The parameters values are same.Anyone?
enskaa at 2007-7-8 9:04:08 > top of Java-index,Development Tools,Java Tools...
# 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.

c.m.mwungua at 2007-7-8 9:04:08 > top of Java-index,Development Tools,Java Tools...
# 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.

enskaa at 2007-7-8 9:04:08 > top of Java-index,Development Tools,Java Tools...