Have you got a spare gun and only one bullet ? You will have your gun back
of course but not the bullet.

Thank you :D

On Mon, Nov 19, 2012 at 11:06 AM, Taha Siddiqi <tawus.tapes...@gmail.com>wrote:

> These are two components t:error and t:errors. You have to use t:error.
> t:errors doesn't have for component
>
>
> On Nov 19, 2012, at 2:26 PM, Muhammad Gelbana wrote:
>
> > Thanks ! But unfortunately that didn't work either. All error components
> > list all error messages whether they are bound to it or or even if the
> > error component isn't bound at all (i.e. <errors />)!
> > I checked tapestry jumpstart for guidance and found that I was using
> > @InjectComponent instead of @Component but I didn't notice any difference
> > so I assume there isn't.
> >
> > My template file looks like this:
> >
> >> <t:block t:id="dnsTestOptions">
> >> <fieldset>
> >> <legend>${testType} Options</legend>
> >> <div>
> >> <div><t:errors t:for="dnsServerField"/></div>
> >> <div>
> >> <t:label t:for="dnsServerField">DUT</t:label>
> >> <t:textfield t:id="dnsServerField"
> >> t:value="testOptions('server.ip').value" />
> >> </div>
> >> <div><t:errors t:for="domainNameField" /></div>
> >> <div>
> >> <t:label t:for="domainNameField">Domain Name</t:label>
> >> <t:textfield t:id="domainNameField"
> >> t:value="testOptions('domain-name').value" />
> >> </div>
> >> </div>
> >> </fieldset>
> >> </t:block>
> >
> >
> > Withing my page, the form and form fields injection statements are:
> >
> >> @Component(id = "testConfigurationForm")
> >> private Form testForm;
> >> @Component
> >> private TextField dnsServerField, domainNameField;
> >
> >
> > That's how I record my errors
> >
> >> testForm.recordError(field, "Please provide a valid IPv4 address.");
> >
> >
> > I even tried making sure that I'm not recording an error twice for both
> > fields (Since the error message would be identical) I prefixed the error
> > message with the field's label and it was clear that each error component
> > is listing all errors even the ones not bound to it !
> >
> > Thanks again.
> >
> > On Mon, Nov 19, 2012 at 8:18 AM, Taha Siddiqi <tawus.tapes...@gmail.com
> >wrote:
> >
> >> Hi
> >>
> >> Checkout the "for" parameter in
> >>
> http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Error.html
> .
> >> You can specify a field there to retrieve error specific to that field
> >>
> >> regards
> >> Taha
> >>
> >> On Nov 19, 2012, at 2:10 AM, Muhammad Gelbana wrote:
> >>
> >>> I have a form that submits by reloading the whole page. But my form's
> >>> fields are in separate zones. Before submitting the form, these zones
> get
> >>> changed (i.e. different fields are shown with each zone update) till
> the
> >>> user is satisfied and then he submits the form in the manner mentioned.
> >>>
> >>> Now after I validate my fields and record errors using
> recordError(Field,
> >>> String), I don't find a difference between that method and using the
> >> other
> >>> one recordError(String). What is the difference if the t:error
> component
> >>> doesn't utilize the Field object passed to the first method to indicate
> >> the
> >>> difference between the error messages ?!
> >>>
> >>> I mean it always lists all error messages in a list without indicating
> to
> >>> which field does this error message belong ? Shouldn't it be something
> >> like:
> >>>
> >>>
> >>>> You must resolve these errors before proceeding:
> >>>
> >>> Field A:
> >>>>   . Error msg 1.
> >>>>   . Error msg 2.
> >>>> Field C:
> >>>>   . Error msg 1.
> >>>> Field B:
> >>>>   . Error msg 1.
> >>>>   . Error msg 2.
> >>>
> >>>
> >>> ?
> >>>
> >>> After checking the Error component source code, I think this deserves a
> >>> JIRA issue. Am I correct or did I miss something here ?
> >>
> >>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

Reply via email to