You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by RR <se...@gmail.com> on 2004/10/26 20:58:14 UTC

ValidDatePicker question

Does anyone have a working implementation of ValidDatePicker? I ask
because I'm receiving the following error:

Script symbol 'field' is
nz.co.clever.components.valid.ValidDatePicker$Enhance_9, not
org.apache.tapestry.valid.ValidField.

I'd love to hear from someone with a working implementation. By .page
is as follows:

<component id="proposedDatePicker" type="ValidDatePicker">
        <binding name="value" expression="proposedDate"/>
        <binding name="displayName" expression="'Proposed'"/>
        <binding name="validator" expression="beans.unreqDateValidator"/>
</component>

After digging into the code it appears that the DateValidator.script
requires a field, but I've not figured out how this is meant to work
in ValidDatePicker.

Thanks for the help,
-RR-

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


Re: ValidDatePicker question

Posted by RR <se...@gmail.com>.
The DatePicker.script included with ValidDatePicker needed to be
updated to be exactly like the DatePicker.script included with
Tapestry 3.0 source. Otherwise the "buttonOnclickHandler" symbol is
undefined. Hence the rendered href in the anchor is blank and the
calendar is inoperable.

-RR


On Wed, 27 Oct 2004 09:45:44 -0600, RR <se...@gmail.com> wrote:
> So this suggestion eliminated the error message. However, the
> component doesn't render its anchor correctly, as in it's empty
> altogether.
> 
> DateTimePicker is more complicated than we need and the work required
> to get it to behave and appear like DatePicker probably isn't worth
> the effort if we can just get ValidDatePicker working. At this point
> I'm about ready to write my own.
> 
> Thanks for the help Galen!
> 
> -RR-
> 
> 
> 
> 
> On Tue, 26 Oct 2004 14:39:23 -0700, Galen Meurer <si...@galenmeurer.com> wrote:
> > Yes, I remember now; we had the same problem. I had to change the
> > DateValidator.script. I changed that line and put the .script in our source
> > tree.
> >
> > DateValidator.script, line 22:
> > <input-symbol key="field"
> > class="nz.co.clever.components.valid.ValidDatePicker" required="yes"/>
> >
> > Then you have to create a validator that uses that script:
> >
> >   <bean name="requiredDate" class="org.apache.tapestry.valid.DateValidator"
> > lifecycle="page">
> >     <set-property name="clientScriptingEnabled" expression="true"/>
> >     <set-property name="required" expression="true"/>
> >     <set-property name="scriptPath"
> > expression='"/path/to/your/package/validation/DateValidator.script"'/>
> >   </bean>
> >
> > My memory on this is a bit fuzzy, but I hope that gets it working; then you
> > can make a choice between that and the DateTimePicker having seen them both.
> >
> > G;
> >
> >
> >
> > ----- Original Message -----
> > From: "RR" <se...@gmail.com>
> > To: "Tapestry users" <ta...@jakarta.apache.org>
> > Sent: Tuesday, October 26, 2004 2:24 PM
> > Subject: Re: ValidDatePicker question
> >
> > > Thanks for the update Galen. I have ValidDatePicker in a library
> > > included during deployment. I did see that email you posted when I did
> > > a search, and have placed that file in my WEB-INF--but the error is
> > > still consistent.
> > >
> > > I've spent several hours today trying to figure out what specifically
> > > is causing the error. It appears that somehow the ValidDatePicker
> > > doesn't supply the field by the time that DateValidator is invoked.
> > > I'm in a bit over my head, so this may be an incorrect assessment..
> > > I'll give Harish's component   a whirl (when SourceForge is back up)
> > > and see if it'll do.
> > >
> > > I should have included the rest of the stack trace originally:
> > >
> > > Script symbol 'field' is
> > > nz.co.clever.components.valid.ValidDatePicker$Enhance_10, not
> > > org.apache.tapestry.valid.ValidField.
> > > location: classpath:/org/apache/tapestry/valid/DateValidator.script,
> > > line 22, column 88
> > > Stack Trace:
> > [snip]
> >
> > ---------------------------------------------------------------------
> >
> >
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
> >
>

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


Re: ValidDatePicker question

Posted by RR <se...@gmail.com>.
So this suggestion eliminated the error message. However, the
component doesn't render its anchor correctly, as in it's empty
altogether.

DateTimePicker is more complicated than we need and the work required
to get it to behave and appear like DatePicker probably isn't worth
the effort if we can just get ValidDatePicker working. At this point
I'm about ready to write my own.

Thanks for the help Galen!

-RR-


On Tue, 26 Oct 2004 14:39:23 -0700, Galen Meurer <si...@galenmeurer.com> wrote:
> Yes, I remember now; we had the same problem. I had to change the
> DateValidator.script. I changed that line and put the .script in our source
> tree.
> 
> DateValidator.script, line 22:
> <input-symbol key="field"
> class="nz.co.clever.components.valid.ValidDatePicker" required="yes"/>
> 
> Then you have to create a validator that uses that script:
> 
>   <bean name="requiredDate" class="org.apache.tapestry.valid.DateValidator"
> lifecycle="page">
>     <set-property name="clientScriptingEnabled" expression="true"/>
>     <set-property name="required" expression="true"/>
>     <set-property name="scriptPath"
> expression='"/path/to/your/package/validation/DateValidator.script"'/>
>   </bean>
> 
> My memory on this is a bit fuzzy, but I hope that gets it working; then you
> can make a choice between that and the DateTimePicker having seen them both.
> 
> G;
> 
> 
> 
> ----- Original Message -----
> From: "RR" <se...@gmail.com>
> To: "Tapestry users" <ta...@jakarta.apache.org>
> Sent: Tuesday, October 26, 2004 2:24 PM
> Subject: Re: ValidDatePicker question
> 
> > Thanks for the update Galen. I have ValidDatePicker in a library
> > included during deployment. I did see that email you posted when I did
> > a search, and have placed that file in my WEB-INF--but the error is
> > still consistent.
> >
> > I've spent several hours today trying to figure out what specifically
> > is causing the error. It appears that somehow the ValidDatePicker
> > doesn't supply the field by the time that DateValidator is invoked.
> > I'm in a bit over my head, so this may be an incorrect assessment..
> > I'll give Harish's component   a whirl (when SourceForge is back up)
> > and see if it'll do.
> >
> > I should have included the rest of the stack trace originally:
> >
> > Script symbol 'field' is
> > nz.co.clever.components.valid.ValidDatePicker$Enhance_10, not
> > org.apache.tapestry.valid.ValidField.
> > location: classpath:/org/apache/tapestry/valid/DateValidator.script,
> > line 22, column 88
> > Stack Trace:
> [snip]
> 
> ---------------------------------------------------------------------
> 
> 
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
>

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


Re: ValidDatePicker question

Posted by Galen Meurer <si...@galenmeurer.com>.
Yes, I remember now; we had the same problem. I had to change the
DateValidator.script. I changed that line and put the .script in our source
tree.

DateValidator.script, line 22:
<input-symbol key="field"
class="nz.co.clever.components.valid.ValidDatePicker" required="yes"/>

Then you have to create a validator that uses that script:

  <bean name="requiredDate" class="org.apache.tapestry.valid.DateValidator"
lifecycle="page">
    <set-property name="clientScriptingEnabled" expression="true"/>
    <set-property name="required" expression="true"/>
    <set-property name="scriptPath"
expression='"/path/to/your/package/validation/DateValidator.script"'/>
  </bean>

My memory on this is a bit fuzzy, but I hope that gets it working; then you
can make a choice between that and the DateTimePicker having seen them both.

G;

----- Original Message -----
From: "RR" <se...@gmail.com>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Tuesday, October 26, 2004 2:24 PM
Subject: Re: ValidDatePicker question


> Thanks for the update Galen. I have ValidDatePicker in a library
> included during deployment. I did see that email you posted when I did
> a search, and have placed that file in my WEB-INF--but the error is
> still consistent.
>
> I've spent several hours today trying to figure out what specifically
> is causing the error. It appears that somehow the ValidDatePicker
> doesn't supply the field by the time that DateValidator is invoked.
> I'm in a bit over my head, so this may be an incorrect assessment..
> I'll give Harish's component   a whirl (when SourceForge is back up)
> and see if it'll do.
>
> I should have included the rest of the stack trace originally:
>
> Script symbol 'field' is
> nz.co.clever.components.valid.ValidDatePicker$Enhance_10, not
> org.apache.tapestry.valid.ValidField.
> location: classpath:/org/apache/tapestry/valid/DateValidator.script,
> line 22, column 88
> Stack Trace:
[snip]


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


Re: ValidDatePicker question

Posted by RR <se...@gmail.com>.
Thanks for the update Galen. I have ValidDatePicker in a library
included during deployment. I did see that email you posted when I did
a search, and have placed that file in my WEB-INF--but the error is
still consistent.

I've spent several hours today trying to figure out what specifically
is causing the error. It appears that somehow the ValidDatePicker
doesn't supply the field by the time that DateValidator is invoked.
I'm in a bit over my head, so this may be an incorrect assessment..
I'll give Harish's component   a whirl (when SourceForge is back up)
and see if it'll do.

I should have included the rest of the stack trace originally:

Script symbol 'field' is
nz.co.clever.components.valid.ValidDatePicker$Enhance_10, not
org.apache.tapestry.valid.ValidField.
location: 	classpath:/org/apache/tapestry/valid/DateValidator.script,
line 22, column 88
Stack Trace:

    * org.apache.tapestry.script.InputSymbolToken.write(InputSymbolToken.java:58)
    * org.apache.tapestry.script.AbstractToken.writeChildren(AbstractToken.java:76)
    * org.apache.tapestry.script.ParsedScript.execute(ParsedScript.java:57)
    * org.apache.tapestry.valid.BaseValidator.processValidatorScript(BaseValidator.java:304)
    * org.apache.tapestry.valid.DateValidator.renderValidatorContribution(DateValidator.java:227)
    * nz.co.clever.components.valid.WriterErrorDecorator.beginEmpty(WriterErrorDecorator.java:61)
    * org.apache.tapestry.form.DatePicker.renderComponent(DatePicker.java:143)
    * nz.co.clever.components.valid.ValidDatePicker.renderComponent(ValidDatePicker.java:57)
    * org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:857)
    * org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:624)
    * org.apache.tapestry.contrib.form.FormConditional.renderComponent(FormConditional.java:83)
    * org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:857)
    * org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:624)
    * org.apache.tapestry.form.Form.renderComponent(Form.java:362)
    * org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:857)
    * org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:624)
    * org.apache.tapestry.components.RenderBody.renderComponent(RenderBody.java:45)
    * org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:857)
    * org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:624)
    * org.apache.tapestry.html.Body.renderComponent(Body.java:269)
    * org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:857)
    * org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:624)
    * org.apache.tapestry.html.Shell.renderComponent(Shell.java:123)
    * org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:857)
    * org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:118)
    * org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:857)
    * org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:118)
    * org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:857)
    * org.apache.tapestry.AbstractPage.renderPage(AbstractPage.java:300)
    * org.apache.tapestry.engine.RequestCycle.renderPage(RequestCycle.java:371)
    * org.apache.tapestry.engine.AbstractEngine.renderResponse(AbstractEngine.java:732)
    * org.apache.tapestry.engine.DirectService.service(DirectService.java:174)
    * org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:872)
    * org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:197)
    * org.apache.tapestry.ApplicationServlet.doPost(ApplicationServlet.java:326)
    * javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
.....


On Tue, 26 Oct 2004 14:03:52 -0700, Galen Meurer <si...@galenmeurer.com> wrote:
> We had it working. I responded to somebody else who had this same problem a
> while ago (http://article.gmane.org/gmane.comp.java.tapestry.user/9305); I
> suspected that he didn't copy the DatePicker.script to their WEB-INF, but he
> didn't respond.
> 
> Is there more to that error message? A line number in a .script?
> 
> We actually abandoned the ValidDatePicker in favor of Harish's component,
> which is a validatable Date/Time picker:
> http://myworkspace.sourceforge.net/component-library.html  -- personally, I
> like the javascript popup included with Harish's contribution much better
> than the default one. I would recommend switching.
> 
> If you really need to use the ValidDatePicker, though, email all the info
> you can and I'll see if I can help as ours is working (at least it
> was...been awhile...)
> 
> Galen;
> 
> 
> 
> ----- Original Message -----
> From: "RR" <se...@gmail.com>
> To: <ta...@jakarta.apache.org>
> Sent: Tuesday, October 26, 2004 11:58 AM
> Subject: ValidDatePicker question
> 
> > Does anyone have a working implementation of ValidDatePicker? I ask
> > because I'm receiving the following error:
> >
> > Script symbol 'field' is
> > nz.co.clever.components.valid.ValidDatePicker$Enhance_9, not
> > org.apache.tapestry.valid.ValidField.
> >
> > I'd love to hear from someone with a working implementation. By .page
> > is as follows:
> >
> > <component id="proposedDatePicker" type="ValidDatePicker">
> >         <binding name="value" expression="proposedDate"/>
> >         <binding name="displayName" expression="'Proposed'"/>
> >         <binding name="validator" expression="beans.unreqDateValidator"/>
> > </component>
> >
> > After digging into the code it appears that the DateValidator.script
> > requires a field, but I've not figured out how this is meant to work
> > in ValidDatePicker.
> >
> > Thanks for the help,
> > -RR-
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
>

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


Re: ValidDatePicker question

Posted by Galen Meurer <si...@galenmeurer.com>.
We had it working. I responded to somebody else who had this same problem a
while ago (http://article.gmane.org/gmane.comp.java.tapestry.user/9305); I
suspected that he didn't copy the DatePicker.script to their WEB-INF, but he
didn't respond.

Is there more to that error message? A line number in a .script?

We actually abandoned the ValidDatePicker in favor of Harish's component,
which is a validatable Date/Time picker:
http://myworkspace.sourceforge.net/component-library.html  -- personally, I
like the javascript popup included with Harish's contribution much better
than the default one. I would recommend switching.

If you really need to use the ValidDatePicker, though, email all the info
you can and I'll see if I can help as ours is working (at least it
was...been awhile...)

Galen;

----- Original Message -----
From: "RR" <se...@gmail.com>
To: <ta...@jakarta.apache.org>
Sent: Tuesday, October 26, 2004 11:58 AM
Subject: ValidDatePicker question


> Does anyone have a working implementation of ValidDatePicker? I ask
> because I'm receiving the following error:
>
> Script symbol 'field' is
> nz.co.clever.components.valid.ValidDatePicker$Enhance_9, not
> org.apache.tapestry.valid.ValidField.
>
> I'd love to hear from someone with a working implementation. By .page
> is as follows:
>
> <component id="proposedDatePicker" type="ValidDatePicker">
>         <binding name="value" expression="proposedDate"/>
>         <binding name="displayName" expression="'Proposed'"/>
>         <binding name="validator" expression="beans.unreqDateValidator"/>
> </component>
>
> After digging into the code it appears that the DateValidator.script
> requires a field, but I've not figured out how this is meant to work
> in ValidDatePicker.
>
> Thanks for the help,
> -RR-
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>


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