Re: [Webwork-user] WebWorkVelocityServlet views
Brought to you by:
baldree,
rickardoberg
From: G.L. G. <ga...@gr...> - 2002-07-13 01:52:13
|
> Another way of doing this using the ParameterAware interface is as > follows. Assuming your Products Action class above has getMyParam() and > setMyParam(String) methods. The setMyParam method will be called if > there's a "myParam" parameter. Then, within the Velocity template > forwarded to from that Action you can access it like this: One thing I didn't understand about this is how the Product class would be mapped to that 'select' context. Are you saying that in the views.properties I'd have my Products Action return the view "selectB.success" (like below) and then in my velocity template I'd write what's below (assuming MyParam is actually a getMyParam() method of the Action)? velocity.Products.selectB.success=prods/prods.vm?select=myVal Which I know I'm misunderstanding because the val of the select key would not be used. > ## assumes the Products Action is mapped to select. > #if ( $select.MyParam ) ## same as $select.getMyParam() > ## do something > #end > Much thanks and all help appreciated. |