in the .page file you need to set a property-specification for
currentVariable (make sure you set the type).
Then in your Foreach component binding, you set value="currentVariable".
(Use ognl: as prefix if you are using the informal style in your html
template rather than the formal style in your page spec.)
Edward Scanzano wrote:
if I use parameters="currentVariable" the it comes
through as a java.lang.String
if I use parameters="ognl:currentVariable" then I get
an exception
java.lang.IllegalArgumentException
Could not find an adaptor for class
com.intaglio.client.api.impl.RepositoryImpl.
Is there something I need to do something in the .page
file?
--- Robert Zeigler <[EMAIL PROTECTED]> wrote:
Edward Scanzano wrote:
Hi all,
I have a situtation where I am looking over a
Collection and for each item I build a @DirectLink
which shows a property of the value
(currentVariable)variable in the loop.
Now, when I click on the link it fires a method
which
references currentVariable and I am assuming that
currentVariable is set to object that was used by
the
link I am clicking on.
you'll want to do something like:
html:
<a href="#" jwcid="@DirectLink"
parameters="currentVariable"
listener="ognl:listeners.showObj">show object</a>
java:
public void showObj(IRequestCycle cycle) {
Object[] params = cycle.getServiceParameters();
MyObj obj = (MyObj) params[0];
}
Robert
To be clearer:
A collection of 10 Facility objects
loop:
DirectLink1 (gets Facility object 1)
DirectLink2 (gets Facility object 2)
DirectLink3 (gets Facility object 3)
DirectLink4 (gets Facility object 4)
DirectLink5 (gets Facility object 5)
DirectLink6 (gets Facility object 6)
DirectLink7 (gets Facility object 7)
DirectLink8 (gets Facility object 8)
DirectLink9 (gets Facility object 9)
DirectLink10 (gets Facility object 10)
end
Now when I click on direct link 5 and I reference
currentVariable will I see Facility object 5 in
the
method that gets called?
I just tried this and I get Facility object 10.
This
is not good.
Ideas?
Ed
---------------------------------------------------------------------
To unsubscribe, e-mail:
[EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail:
[EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]