Sagewire Logo

T5: createActionLink, delimiter ":" and "."

3 Message(s) by 3 Author(s) originally posted in tapestry java


From: Foror Date:   Wednesday, December 26, 2007
When I call a createActionLink("send", false, 2050) in page then link
is "message:send/2050". And it doesn't work (onSendAction(long id) is
not called). In a component ActionLink link is "message.send/2050" and
it works. Below a part of a code responsible for link generation. Why
it is so?

public class ActionLinkTarget



if (hasComponentId)
{
builder.append(".");
// Already lower case by design.
builder.append(_componentNestedId);
}

// If no nested component id, then must append the action; the ':' and the action become the
// delimiter between the page name and the event context.

if (!hasComponentId || !_eventType.equals(TapestryConstants.ACTION_EVENT))
{
builder.append(":");
builder.append(_eventType);
}
---------------------------------------------------------------------


To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxx


From: Howard Lewis Ship Date:   Friday, December 28, 2007
Your method is named incorrectly. It should be onSend() or
onSendFromFoo() (where Foo is the component id).

wrote in message:
When I call a createActionLink("send", false, 2050) in page then link
is "message:send/2050". And it doesn't work (onSendAction(long id) is
not called). In a component ActionLink link is "message.send/2050" and
it works. Below a part of a code responsible for link generation. Why
it is so?
public class ActionLinkTarget
if (hasComponentId)
{
builder.append(".");
// Already lower case by design.
builder.append(_componentNestedId);
}
// If no nested component id, then must append the action; the ':' and the action become the
// delimiter between the page name and the event context.
if (!hasComponentId || !_eventType.equals(TapestryConstants.ACTION_EVENT))
{
builder.append(":");
builder.append(_eventType);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxx
--


Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxx


From: Davor Hrg Date:   Friday, December 28, 2007
while speaking of ActionLink...
is there a strong reason why action name isn't parametrized ?
default value should be of course "action"Davor Hrg

wrote in message:
Your method is named incorrectly. It should be onSend() or
onSendFromFoo() (where Foo is the component id).
wrote in message:
> When I call a createActionLink("send", false, 2050) in page then link
> is "message:send/2050". And it doesn't work (onSendAction(long id) is
> not called). In a component ActionLink link is "message.send/2050" and
> it works. Below a part of a code responsible for link generation. Why
> it is so?
>
> public class ActionLinkTarget
>
> if (hasComponentId)
> {
> builder.append(".");
> // Already lower case by design.
> builder.append(_componentNestedId);
> }
>
> // If no nested component id, then must append the action; the ':' and the action become the
> // delimiter between the page name and the event context.
>
> if (!hasComponentId || !_eventType.equals(TapestryConstants.ACTION_EVENT))
> {
> builder.append(":");
> builder.append(_eventType);
> }
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxx
> For additional commands, e-mail: users-help@xxxxxxxxxxx
>
>
--
Howard M. Lewis Ship
Creator Apache Tapestry and Apache HiveMind
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxx


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxx



Next Message: T5 & Ajax - Which Ajax/JAVAscript framework will be next?



Programming | Sports | Autos

copyright 2006
Valid XHTML 1.0 Transitional