wicket-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Krasnay <j...@krasnay.ca>
Subject Re: [jira] Created: (WICKET-2184) Check component id against invalid chars ':' and '.'
Date Sat, 21 Mar 2009 13:58:02 GMT
You've just argued against CompoundPropertyModel, not dots per se.

jk

On Sat, Mar 21, 2009 at 02:50:53PM +0100, Juergen Donnerstag wrote:
> Ahh I see. I never use it this way because it exposes internals to the
> markup which may change after refactoring and than all by a sudden it
> doesn't work anymore. But I understand it is handy and saves some
> typing
> 
> Juergen
> 
> On Sat, Mar 21, 2009 at 2:40 PM, Martijn Dashorst
> <martijn.dashorst@gmail.com> wrote:
> > Doing it all the time:
> >
> > <input type="text" wicket:id="address.street" />
> >
> > Form form = new Form("form", new CompoundPropertyModel(person));
> > form.add(new TextField("address.street"));
> >
> > and works with localizers/properties too... Have been using (and
> > promoting this functionality) since 1.0.
> >
> > Martijn
> >
> > On Sat, Mar 21, 2009 at 2:33 PM, Juergen Donnerstag
> > <juergen.donnerstag@gmail.com> wrote:
> >> Are you sure? Did you ever create markup like <div
> >> wicket:id="this.is.my.component">. I'm pretty sure it doesn't work
> >> with Localizer and properties.
> >>
> >> Juergen
> >>
> >>
> >> <On Sat, Mar 21, 2009 at 12:18 PM, Martijn Dashorst
> >> <martijn.dashorst@gmail.com> wrote:
> >>> The "." (dot) is an accepted, and widely used part of component
> >>> identifiers: CompoundPropertyModel makes heavy use of this feature.
> >>>
> >>> Martijn
> >>>
> >>> On Sat, Mar 21, 2009 at 11:27 AM, Juergen Donnerstag (JIRA)
> >>> <jira@apache.org> wrote:
> >>>> Check component id against invalid chars ':' and '.'
> >>>> ----------------------------------------------------
> >>>>
> >>>>                 Key: WICKET-2184
> >>>>                 URL: https://issues.apache.org/jira/browse/WICKET-2184
> >>>>             Project: Wicket
> >>>>          Issue Type: Improvement
> >>>>          Components: wicket
> >>>>    Affects Versions: 1.4-RC2
> >>>>            Reporter: Juergen Donnerstag
> >>>>
> >>>>
> >>>> Currently we are only testing a component id not to be null. However
':' and '.' are effectively invalid chars as well. ":" is used as separator between path component
and "." is used to find properties like myComponent.Required
> >>>>
> >>>> Component.java should be modified as follows:
> >>>>
> >>>>        final void setId(final String id)
> >>>>        {
> >>>>                if (!(this instanceof Page))
> >>>>                {
> >>>>                        if (Strings.isEmpty(id))
> >>>>                        {
> >>>>                                throw new WicketRuntimeException("Null
or empty component id is not allowed.");
> >>>>                        }
> >>>>
> >>>>                        if ((id.indexOf('.') != -1) || (id.indexOf(':')
!= -1))
> >>>>                        {
> >>>>                                throw new WicketRuntimeException("The
component id must not contain a '.' or ':'.");
> >>>>                        }
> >>>>                }
> >>>>                this.id = id;
> >>>>        }
> >>>>
> >>>>
> >>>> --
> >>>> This message is automatically generated by JIRA.
> >>>> -
> >>>> You can reply to this email to add a comment to the issue online.
> >>>>
> >>>>
> >>>
> >>>
> >>>
> >>> --
> >>> Become a Wicket expert, learn from the best: http://wicketinaction.com
> >>> Apache Wicket 1.3.5 is released
> >>> Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.
> >>>
> >>
> >
> >
> >
> > --
> > Become a Wicket expert, learn from the best: http://wicketinaction.com
> > Apache Wicket 1.3.5 is released
> > Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.
> >

Mime
View raw message