Re: [Webwork-user] Name collision
Brought to you by:
baldree,
rickardoberg
From: Rickard <ri...@jb...> - 2000-12-08 09:17:55
|
Hi! "Maurice C . Parker" wrote: > To try and explain this clearer I will denote jsp params by enclosing them in *'ss. <snip> Very good question. How to solve? Here's one idea: results can be bound to request attributes (by using the "id" tag attribute). It would be possible to use a scoping notation to explicitly refer to an entry point: <webwork:property name="hasBar" id="foo"> <webwork:property name="xyzzy:hasBar" id="xyzzy"> <webwork:property name="foo@bar"/> <!-- explicitly get the bar from foo, even though the normal scoping rules would have stopped at xyzzy --> </webwork:property> </webwork:property> Seems ok? This can be used with params too I think: <webwork:property name="hasBar" id="foo"> <jsp:include page="FooListElementsHasBar.action?list.jsp" flush="true"> <jsp:param name="name" value="xyzzy"/> <jsp:param name="label" value="foo@bar"/> <jsp:param name="value" value="bar"/> </jsp:include> </webwork:property> list.jsp --- <!-- xyzzy is iterator attribute of FooList. Elements have "bar" attribute, so we need to scope -> <webwork:iterator name="xyzzy"> <!-- Show value of foo@bar, and also print out xyzzy elements' bar value --> <webwork:property name="$label"/>:<webwork:property name="$value"/> </webwork:iterator> --- I think the above allows arbitrary scoping. And it also allow included pages to refer to any attribute of any property in parent page (without this scoping the child included pages can only refer to attributes in the result!). Seems ok. Any flaws with? Pros/cons? /Rickard -- Rickard Öberg Email: ri...@jb... |