You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Craig Lenzen <le...@visi.com> on 2007/09/02 03:39:31 UTC

AjaxButton value attribute

Am I missing something here?  Why doesn't the AjaxButton take a IModel that
sets the value attribute like the normal Button component?

I need to internationalize the button value (name), do I really need to
override something like the onbeforerender method to add a
AttributeModifier?

-Craig
-- 
View this message in context: http://www.nabble.com/AjaxButton-value-attribute-tf4366376.html#a12445623
Sent from the Wicket - User mailing list archive at Nabble.com.


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


Re: AjaxButton value attribute

Posted by Craig Lenzen <le...@visi.com>.
I agree Igor, this is a much better way to internationalize an attribute,
which keeps the model open for the component.

Thanks
Craig


igor.vaynberg wrote:
> 
> <input type="button" wicket:id="ajaxbutton" value="preview"
> wicket:message="value:key"/>
> 
> i believe that is the syntax for internatianalyzing attributes. yes it is
> a
> bit inconsistent, but if anything i would like the button to not use its
> model and let me put in there a model i can use in onsubmit(). just my two
> cents.
> 
> -igor
> 
> 
> On 9/1/07, Carlos Pita <ca...@gmail.com> wrote:
>>
>> Why would you override onBeforeRender to do that? Just add an attribute
>> modifier that takes a model in your constructor or wherever.
>> Regards,
>> Carlos
>>
>> On 9/1/07, Craig Lenzen <le...@visi.com> wrote:
>> >
>> >
>> > Am I missing something here?  Why doesn't the AjaxButton take a IModel
>> > that
>> > sets the value attribute like the normal Button component?
>> >
>> > I need to internationalize the button value (name), do I really need to
>> > override something like the onbeforerender method to add a
>> > AttributeModifier?
>> >
>> > -Craig
>> > --
>> > View this message in context:
>> >
>> http://www.nabble.com/AjaxButton-value-attribute-tf4366376.html#a12445623
>> > Sent from the Wicket - User mailing list archive at Nabble.com.
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> > For additional commands, e-mail: users-help@wicket.apache.org
>> >
>> >
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/AjaxButton-value-attribute-tf4366376.html#a12489033
Sent from the Wicket - User mailing list archive at Nabble.com.


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


Re: AjaxButton value attribute

Posted by Igor Vaynberg <ig...@gmail.com>.
<input type="button" wicket:id="ajaxbutton" value="preview"
wicket:message="value:key"/>

i believe that is the syntax for internatianalyzing attributes. yes it is a
bit inconsistent, but if anything i would like the button to not use its
model and let me put in there a model i can use in onsubmit(). just my two
cents.

-igor


On 9/1/07, Carlos Pita <ca...@gmail.com> wrote:
>
> Why would you override onBeforeRender to do that? Just add an attribute
> modifier that takes a model in your constructor or wherever.
> Regards,
> Carlos
>
> On 9/1/07, Craig Lenzen <le...@visi.com> wrote:
> >
> >
> > Am I missing something here?  Why doesn't the AjaxButton take a IModel
> > that
> > sets the value attribute like the normal Button component?
> >
> > I need to internationalize the button value (name), do I really need to
> > override something like the onbeforerender method to add a
> > AttributeModifier?
> >
> > -Craig
> > --
> > View this message in context:
> >
> http://www.nabble.com/AjaxButton-value-attribute-tf4366376.html#a12445623
> > Sent from the Wicket - User mailing list archive at Nabble.com.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
>

Re: AjaxButton value attribute

Posted by Carlos Pita <ca...@gmail.com>.
Why would you override onBeforeRender to do that? Just add an attribute
modifier that takes a model in your constructor or wherever.
Regards,
Carlos

On 9/1/07, Craig Lenzen <le...@visi.com> wrote:
>
>
> Am I missing something here?  Why doesn't the AjaxButton take a IModel
> that
> sets the value attribute like the normal Button component?
>
> I need to internationalize the button value (name), do I really need to
> override something like the onbeforerender method to add a
> AttributeModifier?
>
> -Craig
> --
> View this message in context:
> http://www.nabble.com/AjaxButton-value-attribute-tf4366376.html#a12445623
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>