On Feb 12, 2009, at 2/127:24 PM , manuel aldana wrote:
Hi,
a question on @Parameter:
@Parameter
private String param;
1) How is it possible to filter a passed param (e.g. manipulating
the value)? Using getters and setters for that would not work.
Generally, the "setupRender" phase is what you want to use:
@SetupRender //annotation is redundant if the method name is setupRender
void setupRender() {
//manipulate "param" parameter here...
param = param==null?null:param.replaceAll("a","b");
}
This method will be called before the component renders.
See: http://tapestry.apache.org/tapestry5/guide/rendering.html
2) How can I make the parameter available to the template (e.g. to
render this), i.e. want to have it passed as a parameter but want to
render it as a property in my component.
@Parameter
@Property
private String param;
Or:
@Parameter
private String param;
public String getParam() {
return param;
}
Robert
thanks.
--
manuel aldana
ald...@gmx.de
software-engineering blog: http://www.aldana-online.de
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org