You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Yohan Yudanara <yo...@gmail.com> on 2012/02/01 03:10:05 UTC

How to automatically add mixins to all

Hi,

I'm planning to use Lenny Primak - Flowlogix's "DisableAfterSubmit" mixins
to all of my submit component. It works great to prevent double submit.

Please give me a clue how to accomplish this, instead of having to copy
paste "mixins="DisableAfterSubmit" to all of submit components on so many
pages?

Thank you..

Best regards,
Yohan Yudanara

Re: How to automatically add mixins to all

Posted by Yohan Yudanara <yo...@gmail.com>.
Thank you very much, Taha and Dragan.

You make me save a lot of time...

On Wed, Feb 1, 2012 at 5:14 PM, Dragan Sahpaski
<dr...@gmail.com> wrote:
> Hi,
> There is one more solution to your problem. I'm not saying it's better than
> Taha's on the contrary I recommend Taha's approach, this solution is more
> of a hack but it works and I have used it.
>
> Here it is.
>
> Just create a component in your app with the same name: Submit.
>
> public class Submit extends org.apache.tapestry5.corelib.components.Submit
> {
>
> @Mixin
> private DisableAfterSubmit disableAfterSubmit;
>
> }
>
> Cheers,
> Dragan Sahpaski
>
>
>
> On Wed, Feb 1, 2012 at 3:10 AM, Yohan Yudanara <yo...@gmail.com>wrote:
>
>> Hi,
>>
>> I'm planning to use Lenny Primak - Flowlogix's "DisableAfterSubmit" mixins
>> to all of my submit component. It works great to prevent double submit.
>>
>> Please give me a clue how to accomplish this, instead of having to copy
>> paste "mixins="DisableAfterSubmit" to all of submit components on so many
>> pages?
>>
>> Thank you..
>>
>> Best regards,
>> Yohan Yudanara
>>

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


Re: How to automatically add mixins to all

Posted by Dragan Sahpaski <dr...@gmail.com>.
Hi,
There is one more solution to your problem. I'm not saying it's better than
Taha's on the contrary I recommend Taha's approach, this solution is more
of a hack but it works and I have used it.

Here it is.

Just create a component in your app with the same name: Submit.

public class Submit extends org.apache.tapestry5.corelib.components.Submit
{

@Mixin
private DisableAfterSubmit disableAfterSubmit;

}

Cheers,
Dragan Sahpaski



On Wed, Feb 1, 2012 at 3:10 AM, Yohan Yudanara <yo...@gmail.com>wrote:

> Hi,
>
> I'm planning to use Lenny Primak - Flowlogix's "DisableAfterSubmit" mixins
> to all of my submit component. It works great to prevent double submit.
>
> Please give me a clue how to accomplish this, instead of having to copy
> paste "mixins="DisableAfterSubmit" to all of submit components on so many
> pages?
>
> Thank you..
>
> Best regards,
> Yohan Yudanara
>

Re: How to automatically add mixins to all

Posted by Taha Hafeez Siddiqi <ta...@gmail.com>.
Hi

Write a ComponontClassTransformWorker

catch all submit components and add your mixin :)

http://tawus.wordpress.com/2011/08/01/tapestry-mixins-classtransformations/

regards
Taha

On Feb 1, 2012, at 7:50 AM, Yohan Yudanara wrote:

> Currently my project already have use standard Submit components in all of
> its pages.
> And there are so many pages.. :)
> 
> So I'm looking for an 'automatic' way to add mixins to existing "standard"
> submit components on my project.
> 
> Thanks..
> 
> Best regards,
> Yohan Yudanara
> 
> On Wed, Feb 1, 2012 at 9:15 AM, Robert Zeigler
> <ro...@roxanemy.com>wrote:
> 
>> Why don't you create a custom submit component that uses the mixin? Then
>> just use your custom component anywhere the standard submit would otherwise
>> be used?
>> 
>> Robert
>> 
>> On Jan 31, 2012, at 1/318:10 PM , Yohan Yudanara wrote:
>> 
>>> Hi,
>>> 
>>> I'm planning to use Lenny Primak - Flowlogix's "DisableAfterSubmit"
>> mixins
>>> to all of my submit component. It works great to prevent double submit.
>>> 
>>> Please give me a clue how to accomplish this, instead of having to copy
>>> paste "mixins="DisableAfterSubmit" to all of submit components on so many
>>> pages?
>>> 
>>> Thank you..
>>> 
>>> Best regards,
>>> Yohan Yudanara
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>> 
>> 


Re: How to automatically add mixins to all

Posted by Yohan Yudanara <yo...@gmail.com>.
Currently my project already have use standard Submit components in all of
its pages.
And there are so many pages.. :)

So I'm looking for an 'automatic' way to add mixins to existing "standard"
submit components on my project.

Thanks..

Best regards,
Yohan Yudanara

On Wed, Feb 1, 2012 at 9:15 AM, Robert Zeigler
<ro...@roxanemy.com>wrote:

> Why don't you create a custom submit component that uses the mixin? Then
> just use your custom component anywhere the standard submit would otherwise
> be used?
>
> Robert
>
> On Jan 31, 2012, at 1/318:10 PM , Yohan Yudanara wrote:
>
> > Hi,
> >
> > I'm planning to use Lenny Primak - Flowlogix's "DisableAfterSubmit"
> mixins
> > to all of my submit component. It works great to prevent double submit.
> >
> > Please give me a clue how to accomplish this, instead of having to copy
> > paste "mixins="DisableAfterSubmit" to all of submit components on so many
> > pages?
> >
> > Thank you..
> >
> > Best regards,
> > Yohan Yudanara
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: How to automatically add mixins to all

Posted by Robert Zeigler <ro...@roxanemy.com>.
Why don't you create a custom submit component that uses the mixin? Then just use your custom component anywhere the standard submit would otherwise be used?

Robert

On Jan 31, 2012, at 1/318:10 PM , Yohan Yudanara wrote:

> Hi,
> 
> I'm planning to use Lenny Primak - Flowlogix's "DisableAfterSubmit" mixins
> to all of my submit component. It works great to prevent double submit.
> 
> Please give me a clue how to accomplish this, instead of having to copy
> paste "mixins="DisableAfterSubmit" to all of submit components on so many
> pages?
> 
> Thank you..
> 
> Best regards,
> Yohan Yudanara


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