You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Jo...@gmx.de on 2002/12/31 11:23:34 UTC
jpath problem
Hi,
first let me say, that I really love the flow framework. Finally it
can be fun to write web applications.
My problem is that I can't figure out how to pass objects other than simple
strings via the bizData object to the view layer.
In the example below I only get the users object converted to a string.
neither the getGroup() nor the getNames() methods get called.
What am I doing wrong?
Thanks,
Johannes Hofmann
in my flowscript I have:
var users = new Packages.test.Users();
sendPageAndWait("user.xml", {"users":users});
the relevant part of user.xml looks like:
Users Object:
<xsp:expr>
<jpath:value-of select="users"/>
</xsp:expr>
Group:
<xsp:expr>
<jpath:value-of select="users/group"/>
</xsp:expr>
Names:
<jpath:for-each select="users/names">
<jpath:value-of select="."/>
</jpath:for-each>
The corresponding JavaBean is:
public class Users {
String [] names = {"foo", "bar"};
public String getGroup() {
return "myGroup";
}
public String[] getNames() {
return names;
}
}
PS: I tried xml-cocoon2_20021230172148.tar.gz.
--
+++ GMX - Mail, Messaging & more http://www.gmx.net +++
NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen!
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: jpath problem
Posted by Ugo Cei <u....@cbim.it>.
Johannes.Hofmann@gmx.de wrote:
> My problem is that I can't figure out how to pass objects other than simple
> strings via the bizData object to the view layer.
>
> In the example below I only get the users object converted to a string.
> neither the getGroup() nor the getNames() methods get called.
>
> What am I doing wrong?
Nothing. It's a bug in the implementation of the flow machinery. Ovidiu
promised me that he will have looked after it a few weeks ago, but I
haven't heard from him since then. I guess he's on vacation now.
Since I need this feature to work ASAP, I'm going to start debugging the
problem in the coming days. If you want to follow my progress, you'd
better subscribe to cocoon-dev.
Ugo
--
Ugo Cei - http://www.beblogging.com/blog/
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>