Why not just use ComponentResources.createActionLink and ComponentResources.createPageLink?

.tml:
<a href="$somelink">Link Text</a>
.java:

@Inject
private ComponentResources resources;

public String getSomeLink() {
return resources.createPageLink("mypage",true,contextValue1,contextValue2,...);
}


Robert

On Oct 31, 2008, at 10/315:04 PM , Marcel Sammut wrote:


Greetings,
I'm looking at porting my 3.0 tapestry web application to v5 and I'm trying to build a menu component which accepts a parameter of type ArrayList that contains a list of AbstractLink objects. These items get rendered in a menu layout etc. The page that this menu component exists on will create, at runtime, the set of desired menu item and pass them to the menu component.

This sounds straight forward, however, I am unable to determin how to
instantiate, for example, a new instance of a ActionLink. In the previous version (3.0), I simply rendered the anchor myself and generated the URi in a custom implementation. I was hoping that in T5, I would be able to use the internal Link components since they do pretty much what I was doing in
3.0.

Is there a way, in code, to create a new ActionLink component and have it
act as the model for another component to be rendered?

Your thoughts are much appreciated.
- Marcel
--
View this message in context: 
http://www.nabble.com/-T5--Creating-Links-At-Runtime-tp20274715p20274715.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
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]

Reply via email to