Skip to main content

Problem with yahoo/tree with a service and JSF (VWP) page postback.

2 replies [Last post]
grombouts
Offline
Joined: 2007-10-18
Points: 0

I use a yahoo/tree, in a visual web pack application in Netbeans 5.5.1. It uses a 'service' attribute to specify a web service serving up its content in JSON. This works fine if a new page is displayed, and also when the page is reloaded with the browser's reload button. BUT if the page is the result of a postback (so e.g. a submit button is pressed that does not navigate to another page, but comes back to the same page), the tree does not load its contents from the service, but it shows the default content ("Default Yahoo Tree Root Node" with 3 default nodes attached). In the browser's javascript error console, no errors are displayed. Is there any workaround for this problem ?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
gmurray71
Offline
Joined: 2003-07-31
Points: 0

Hi,

This sounds like the tree data is not coming back with the POST back. There are a option which is to use the latest jMaki. We are going to introduce a jMaki Listerner tag that should help.

http://weblogs.java.net/blog/ntruchsess/archive/2007/09/jmakieventliste....

Are you willing to work with us with the latest emerging jMaki?

If so we can help you get things up and working.

-Greg

grombouts
Offline
Joined: 2007-10-18
Points: 0

Greg,

thanks for your answer. For now I have (kind of ?) solved the problem by using the value-attribute instead of the service-attribute. The value-attribute now refers to a property in the VWP SessionBean which returns as a string the JSON-tree contents.

I fully agree though that the solution you are proposing is much better, and offers a lot of extra possibilities. I will look into it as soon as possible (but at this moment I am unable to spend too much time on it).

Thanks again,
Geert.