You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by membersound <me...@web.de> on 2012/11/09 21:09:50 UTC

Trigger multiple fragments from one event?

<t:checkbox t:mixins="triggerfragment" fragment="fragOne, fragTwo" />

Can I somehow trigger to formfragments with one component?
My goal is to swap two fragments on a checkbox click, where one is initially
shown, and on checkbox click it is hidden an another one is shown. But as I
cannot assign the same t:id to two fragments, how can I trigger two
fragment-id's at once?

thanks



--
View this message in context: http://tapestry.1045711.n5.nabble.com/Trigger-multiple-fragments-from-one-event-tp5717895.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Trigger multiple fragments from one event?

Posted by Muhammad Gelbana <m....@gmail.com>.
Ok I think this might be even better. Check the ActionLink component source
code. From the docs (
http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/ActionLink.html)
this is how to pass an array of values through tml:

context="[account.companyId, account.id]"

Good luck !

On Sat, Nov 10, 2012 at 2:20 PM, membersound <me...@web.de> wrote:

> Thanks for your hints. I do not know how to parse an array. But I found I
> workaround:
> I just took the TriggerFragment source, renamed the class and the
> ClientElement within, and now can apply a 2nd t:mixins="triggerfragment,
> mycustomtriggerfragment" fragment="firstFrag" customfrag="secondFrag".
>
>
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/Trigger-multiple-fragments-from-one-event-tp5717895p5717902.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: Trigger multiple fragments from one event?

Posted by membersound <me...@web.de>.
Thanks for your hints. I do not know how to parse an array. But I found I
workaround:
I just took the TriggerFragment source, renamed the class and the
ClientElement within, and now can apply a 2nd t:mixins="triggerfragment,
mycustomtriggerfragment" fragment="firstFrag" customfrag="secondFrag".



--
View this message in context: http://tapestry.1045711.n5.nabble.com/Trigger-multiple-fragments-from-one-event-tp5717895p5717902.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Trigger multiple fragments from one event?

Posted by Muhammad Gelbana <m....@gmail.com>.
Check the "TriggerFragment" mixin source code. You can make a similar mixin
to do the same that it does but for multiple components. I'm not sure how
to accept an array of components as a parameter mixin though.

There still may be an easier way but I thought this might help a bit. I'd
like to know if this works for you please :)


On Fri, Nov 9, 2012 at 10:09 PM, membersound <me...@web.de> wrote:

> <t:checkbox t:mixins="triggerfragment" fragment="fragOne, fragTwo" />
>
> Can I somehow trigger to formfragments with one component?
> My goal is to swap two fragments on a checkbox click, where one is
> initially
> shown, and on checkbox click it is hidden an another one is shown. But as I
> cannot assign the same t:id to two fragments, how can I trigger two
> fragment-id's at once?
>
> thanks
>
>
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/Trigger-multiple-fragments-from-one-event-tp5717895.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>