On Sun, 28 Nov 2010 05:53:30 -0200, Alessio Gambi <[email protected]>
wrote:
Hi folks,
Hi!
I am stuck in this and apparently I am not able to understand why.
I have a page containing a single component of type *TestEvent *(the
code is pasted below).
Basically the component has a parameter (of type String) that must be
filled by default with an eventLink.
I'm sorry, but this doesn't make any sense. EventLink is a component, not
a String. I guess you're confusing a component (EventLink) with the event
itself (which is just a name, i.e., a String). And the return value of
createEventLink is a Link, not an EventLink.
public String defaultLink(){
return resources.createEventLink("testEvent", new
Object[]{}).toString();
}
What about just receiving the event *name* instead of an EventLink
instance?
By the way, you can just use createEventLink("eventName") without passing
other parameters. ;)
@BeginRender
void outputDiv(MarkupWriter writer){
writer.element("div", new Object[]{});
This line is way better written as writer.element("div"); ;)
--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]