You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Ernesto Reinaldo Barreiro <re...@gmail.com> on 2017/06/01 07:56:07 UTC

Re: StringResouceModel Can't find key with BootstrapCheckbox

Nice... I just debugged it... and was about to create a patch...

@Martin,.

I think component might not need to keep a copy of labelModel because it is
passed to label... and Label will detach it and onConfigure of Lable could
be wrriten in term of getDfaultModel()?

On Wed, May 31, 2017 at 10:12 PM, Martin Grigorov <mg...@apache.org>
wrote:

> Fixed with
> https://github.com/l0rdn1kk0n/wicket-bootstrap/commit/
> 25c75f84cf932dff7730c030d02b5469a26aab28
>
> Thanks, Ernesto!
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Sun, May 28, 2017 at 6:04 PM, David Beer <da...@gmail.com>
> wrote:
>
> > Hi Ernesto
> >
> > Unfortunately I can't see your in line images. However I have attached a
> > quickstart with Wicket bootstrap added and demonstrating the checkbox the
> > two ways as discussed.
> >
> > Thanks
> >
> > David
> >
> > On 26 May 2017 at 05:55, Ernesto Reinaldo Barreiro <re...@gmail.com>
> > wrote:
> >
> >> I think StringResourceModel is a  IComponentAssignedModel and
> >>
> >> [image: Inline image 1]
> >>
> >> and
> >>
> >> [image: Inline image 2]
> >>
> >> So maybe the line
> >>
> >> this.label = labelModel
> >>
> >> should be replaced by
> >>
> >> this.label = wrap(labelModel) for this to work? Thought Label tag should
> >> already be doing that. Can you create a quick start?
> >>
> >>
> >>
> >>
> >> On Fri, May 26, 2017 at 1:20 AM, David Beer <da...@gmail.com>
> >> wrote:
> >>
> >>> Hi
> >>>
> >>> I am using the BootstrapCheckbox and when I try to add the Label using
> >>> StringReosrceModel if fails to find the key in the properties file for
> >>> the
> >>> page it is on.
> >>>
> >>> However when I use Model.of() it works.
> >>>
> >>> BootstrapCheckbox addMoreUsersCheckbox = new
> >>> BootstrapCheckbox("checkbox-add-more-users", addUsers, Model.of("Addd
> >>> another user"));
> >>>
> >>> BootstrapCheckbox addMoreUsersCheckbox = new
> >>> BootstrapCheckbox("checkbox-add-more-users", addUsers, new
> >>> StringResourceModel("checkbox"));
> >>>
> >>> How do I reference the value checkbox in the page properties file
> >>> properly?
> >>>
> >>> Thanks
> >>>
> >>> David
> >>>
> >>
> >>
> >>
> >> --
> >> Regards - Ernesto Reinaldo Barreiro
> >>
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
>



-- 
Regards - Ernesto Reinaldo Barreiro

Re: StringResouceModel Can't find key with BootstrapCheckbox

Posted by Ernesto Reinaldo Barreiro <re...@gmail.com>.
https://github.com/l0rdn1kk0n/wicket-bootstrap/pull/677/files

On Fri, Jun 2, 2017 at 6:12 AM, Ernesto Reinaldo Barreiro <
reiern70@gmail.com> wrote:

> Ok. I will do it now :-)
>
> On Thu, Jun 1, 2017 at 9:36 PM, Martin Grigorov <mg...@apache.org>
> wrote:
>
>> Hi Ernesto,
>>
>> Yes, I agree this class could be simplified!
>> PR is welcome! Otherwise I'll do it soon!
>>
>> Martin Grigorov
>> Wicket Training and Consulting
>> https://twitter.com/mtgrigorov
>>
>> On Thu, Jun 1, 2017 at 9:56 AM, Ernesto Reinaldo Barreiro <
>> reiern70@gmail.com> wrote:
>>
>> > Nice... I just debugged it... and was about to create a patch...
>> >
>> > @Martin,.
>> >
>> > I think component might not need to keep a copy of labelModel because
>> it is
>> > passed to label... and Label will detach it and onConfigure of Lable
>> could
>> > be wrriten in term of getDfaultModel()?
>> >
>> > On Wed, May 31, 2017 at 10:12 PM, Martin Grigorov <mgrigorov@apache.org
>> >
>> > wrote:
>> >
>> > > Fixed with
>> > > https://github.com/l0rdn1kk0n/wicket-bootstrap/commit/
>> > > 25c75f84cf932dff7730c030d02b5469a26aab28
>> > >
>> > > Thanks, Ernesto!
>> > >
>> > > Martin Grigorov
>> > > Wicket Training and Consulting
>> > > https://twitter.com/mtgrigorov
>> > >
>> > > On Sun, May 28, 2017 at 6:04 PM, David Beer <da...@gmail.com>
>> > > wrote:
>> > >
>> > > > Hi Ernesto
>> > > >
>> > > > Unfortunately I can't see your in line images. However I have
>> attached
>> > a
>> > > > quickstart with Wicket bootstrap added and demonstrating the
>> checkbox
>> > the
>> > > > two ways as discussed.
>> > > >
>> > > > Thanks
>> > > >
>> > > > David
>> > > >
>> > > > On 26 May 2017 at 05:55, Ernesto Reinaldo Barreiro <
>> reiern70@gmail.com
>> > >
>> > > > wrote:
>> > > >
>> > > >> I think StringResourceModel is a  IComponentAssignedModel and
>> > > >>
>> > > >> [image: Inline image 1]
>> > > >>
>> > > >> and
>> > > >>
>> > > >> [image: Inline image 2]
>> > > >>
>> > > >> So maybe the line
>> > > >>
>> > > >> this.label = labelModel
>> > > >>
>> > > >> should be replaced by
>> > > >>
>> > > >> this.label = wrap(labelModel) for this to work? Thought Label tag
>> > should
>> > > >> already be doing that. Can you create a quick start?
>> > > >>
>> > > >>
>> > > >>
>> > > >>
>> > > >> On Fri, May 26, 2017 at 1:20 AM, David Beer <
>> david.m.beer@gmail.com>
>> > > >> wrote:
>> > > >>
>> > > >>> Hi
>> > > >>>
>> > > >>> I am using the BootstrapCheckbox and when I try to add the Label
>> > using
>> > > >>> StringReosrceModel if fails to find the key in the properties file
>> > for
>> > > >>> the
>> > > >>> page it is on.
>> > > >>>
>> > > >>> However when I use Model.of() it works.
>> > > >>>
>> > > >>> BootstrapCheckbox addMoreUsersCheckbox = new
>> > > >>> BootstrapCheckbox("checkbox-add-more-users", addUsers,
>> > Model.of("Addd
>> > > >>> another user"));
>> > > >>>
>> > > >>> BootstrapCheckbox addMoreUsersCheckbox = new
>> > > >>> BootstrapCheckbox("checkbox-add-more-users", addUsers, new
>> > > >>> StringResourceModel("checkbox"));
>> > > >>>
>> > > >>> How do I reference the value checkbox in the page properties file
>> > > >>> properly?
>> > > >>>
>> > > >>> Thanks
>> > > >>>
>> > > >>> David
>> > > >>>
>> > > >>
>> > > >>
>> > > >>
>> > > >> --
>> > > >> Regards - Ernesto Reinaldo Barreiro
>> > > >>
>> > > >
>> > > >
>> > > >
>> > > > ------------------------------------------------------------
>> ---------
>> > > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> > > > For additional commands, e-mail: users-help@wicket.apache.org
>> > > >
>> > >
>> >
>> >
>> >
>> > --
>> > Regards - Ernesto Reinaldo Barreiro
>> >
>>
>
>
>
> --
> Regards - Ernesto Reinaldo Barreiro
>



-- 
Regards - Ernesto Reinaldo Barreiro

Re: StringResouceModel Can't find key with BootstrapCheckbox

Posted by Ernesto Reinaldo Barreiro <re...@gmail.com>.
Ok. I will do it now :-)

On Thu, Jun 1, 2017 at 9:36 PM, Martin Grigorov <mg...@apache.org>
wrote:

> Hi Ernesto,
>
> Yes, I agree this class could be simplified!
> PR is welcome! Otherwise I'll do it soon!
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Thu, Jun 1, 2017 at 9:56 AM, Ernesto Reinaldo Barreiro <
> reiern70@gmail.com> wrote:
>
> > Nice... I just debugged it... and was about to create a patch...
> >
> > @Martin,.
> >
> > I think component might not need to keep a copy of labelModel because it
> is
> > passed to label... and Label will detach it and onConfigure of Lable
> could
> > be wrriten in term of getDfaultModel()?
> >
> > On Wed, May 31, 2017 at 10:12 PM, Martin Grigorov <mg...@apache.org>
> > wrote:
> >
> > > Fixed with
> > > https://github.com/l0rdn1kk0n/wicket-bootstrap/commit/
> > > 25c75f84cf932dff7730c030d02b5469a26aab28
> > >
> > > Thanks, Ernesto!
> > >
> > > Martin Grigorov
> > > Wicket Training and Consulting
> > > https://twitter.com/mtgrigorov
> > >
> > > On Sun, May 28, 2017 at 6:04 PM, David Beer <da...@gmail.com>
> > > wrote:
> > >
> > > > Hi Ernesto
> > > >
> > > > Unfortunately I can't see your in line images. However I have
> attached
> > a
> > > > quickstart with Wicket bootstrap added and demonstrating the checkbox
> > the
> > > > two ways as discussed.
> > > >
> > > > Thanks
> > > >
> > > > David
> > > >
> > > > On 26 May 2017 at 05:55, Ernesto Reinaldo Barreiro <
> reiern70@gmail.com
> > >
> > > > wrote:
> > > >
> > > >> I think StringResourceModel is a  IComponentAssignedModel and
> > > >>
> > > >> [image: Inline image 1]
> > > >>
> > > >> and
> > > >>
> > > >> [image: Inline image 2]
> > > >>
> > > >> So maybe the line
> > > >>
> > > >> this.label = labelModel
> > > >>
> > > >> should be replaced by
> > > >>
> > > >> this.label = wrap(labelModel) for this to work? Thought Label tag
> > should
> > > >> already be doing that. Can you create a quick start?
> > > >>
> > > >>
> > > >>
> > > >>
> > > >> On Fri, May 26, 2017 at 1:20 AM, David Beer <david.m.beer@gmail.com
> >
> > > >> wrote:
> > > >>
> > > >>> Hi
> > > >>>
> > > >>> I am using the BootstrapCheckbox and when I try to add the Label
> > using
> > > >>> StringReosrceModel if fails to find the key in the properties file
> > for
> > > >>> the
> > > >>> page it is on.
> > > >>>
> > > >>> However when I use Model.of() it works.
> > > >>>
> > > >>> BootstrapCheckbox addMoreUsersCheckbox = new
> > > >>> BootstrapCheckbox("checkbox-add-more-users", addUsers,
> > Model.of("Addd
> > > >>> another user"));
> > > >>>
> > > >>> BootstrapCheckbox addMoreUsersCheckbox = new
> > > >>> BootstrapCheckbox("checkbox-add-more-users", addUsers, new
> > > >>> StringResourceModel("checkbox"));
> > > >>>
> > > >>> How do I reference the value checkbox in the page properties file
> > > >>> properly?
> > > >>>
> > > >>> Thanks
> > > >>>
> > > >>> David
> > > >>>
> > > >>
> > > >>
> > > >>
> > > >> --
> > > >> Regards - Ernesto Reinaldo Barreiro
> > > >>
> > > >
> > > >
> > > >
> > > > ------------------------------------------------------------
> ---------
> > > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > > For additional commands, e-mail: users-help@wicket.apache.org
> > > >
> > >
> >
> >
> >
> > --
> > Regards - Ernesto Reinaldo Barreiro
> >
>



-- 
Regards - Ernesto Reinaldo Barreiro

Re: StringResouceModel Can't find key with BootstrapCheckbox

Posted by Martin Grigorov <mg...@apache.org>.
Hi Ernesto,

Yes, I agree this class could be simplified!
PR is welcome! Otherwise I'll do it soon!

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Thu, Jun 1, 2017 at 9:56 AM, Ernesto Reinaldo Barreiro <
reiern70@gmail.com> wrote:

> Nice... I just debugged it... and was about to create a patch...
>
> @Martin,.
>
> I think component might not need to keep a copy of labelModel because it is
> passed to label... and Label will detach it and onConfigure of Lable could
> be wrriten in term of getDfaultModel()?
>
> On Wed, May 31, 2017 at 10:12 PM, Martin Grigorov <mg...@apache.org>
> wrote:
>
> > Fixed with
> > https://github.com/l0rdn1kk0n/wicket-bootstrap/commit/
> > 25c75f84cf932dff7730c030d02b5469a26aab28
> >
> > Thanks, Ernesto!
> >
> > Martin Grigorov
> > Wicket Training and Consulting
> > https://twitter.com/mtgrigorov
> >
> > On Sun, May 28, 2017 at 6:04 PM, David Beer <da...@gmail.com>
> > wrote:
> >
> > > Hi Ernesto
> > >
> > > Unfortunately I can't see your in line images. However I have attached
> a
> > > quickstart with Wicket bootstrap added and demonstrating the checkbox
> the
> > > two ways as discussed.
> > >
> > > Thanks
> > >
> > > David
> > >
> > > On 26 May 2017 at 05:55, Ernesto Reinaldo Barreiro <reiern70@gmail.com
> >
> > > wrote:
> > >
> > >> I think StringResourceModel is a  IComponentAssignedModel and
> > >>
> > >> [image: Inline image 1]
> > >>
> > >> and
> > >>
> > >> [image: Inline image 2]
> > >>
> > >> So maybe the line
> > >>
> > >> this.label = labelModel
> > >>
> > >> should be replaced by
> > >>
> > >> this.label = wrap(labelModel) for this to work? Thought Label tag
> should
> > >> already be doing that. Can you create a quick start?
> > >>
> > >>
> > >>
> > >>
> > >> On Fri, May 26, 2017 at 1:20 AM, David Beer <da...@gmail.com>
> > >> wrote:
> > >>
> > >>> Hi
> > >>>
> > >>> I am using the BootstrapCheckbox and when I try to add the Label
> using
> > >>> StringReosrceModel if fails to find the key in the properties file
> for
> > >>> the
> > >>> page it is on.
> > >>>
> > >>> However when I use Model.of() it works.
> > >>>
> > >>> BootstrapCheckbox addMoreUsersCheckbox = new
> > >>> BootstrapCheckbox("checkbox-add-more-users", addUsers,
> Model.of("Addd
> > >>> another user"));
> > >>>
> > >>> BootstrapCheckbox addMoreUsersCheckbox = new
> > >>> BootstrapCheckbox("checkbox-add-more-users", addUsers, new
> > >>> StringResourceModel("checkbox"));
> > >>>
> > >>> How do I reference the value checkbox in the page properties file
> > >>> properly?
> > >>>
> > >>> Thanks
> > >>>
> > >>> David
> > >>>
> > >>
> > >>
> > >>
> > >> --
> > >> Regards - Ernesto Reinaldo Barreiro
> > >>
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > For additional commands, e-mail: users-help@wicket.apache.org
> > >
> >
>
>
>
> --
> Regards - Ernesto Reinaldo Barreiro
>