Your html should be something like:
<span jwcid="@DirectLink"listener="ognl:listeners.edit"
parameters="ognl:currentItem.ID" >edit</span>
This calls the "edit" listener method. Inside that method, grab the
parameter and bucket brigade it to the Edit page.
public void edit(IRequestCycle cycle)
{
Object[] params = cycle.getServiceParameters();
int id= ((Integer) params[0]).intValue();
EditPage nextPage = (EditPage ) cycle.getPage("EditPage");
nextPage .setID(id);
cycle.activate(nextPage );
}
Then the ID should be available in the pageBeginRender method on the
Edit page by calling getID()
Hope that helps.
On 7/7/05, Jeff Emminger <[EMAIL PROTECTED]> wrote:
> apologies for a probably simple question:
>
> i have my List page use a DirectLink to send to an Edit page with the id
> of the object clicked as a parameter.
>
> the Edit page picks this id up in pageBeginRender() from
> getServiceParameters() and loads the appropriate object.
>
> the problem is when i post back, that parameter is no longer in
> getServiceParameters()... is there a standard way to do this?
>
>
> ---------------------------------------------------------------------
> 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]