You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Jer Kah <je...@gmail.com> on 2004/10/22 17:46:17 UTC

submit form on DatePicker change

Greetings,

I'm new to Tapestry as I started using it this past Monday. 
Everything's going well except that I can't figure out how to submit a
form when I select a Date using the DatePicker component.  I've
searched the web and this archive, and I've found one or two other
people asking the same question, but no one replied satisfactorially
(if at all) to the posts I found.  I've tried messing around with the
DatePicker script and javascript source, but I couldn't get it work.

More in depth, the application I'm writing needs to display weekly
data from a db.  When a different date is chosen via the DatePicker,
the app has to check if it's during the same week as what's currently
displayed and if not, query the db and update the page.

Does anyone know of a way to do this?

Thanks,
   Jeremy

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


Re: submit form on DatePicker change [auf Viren geprueft]

Posted by Jer Kah <je...@gmail.com>.
I'm still not getting it.  I updated the DatePicker.script file like
you said in your post a while back.  I've apparently tried putting the
"onChangeMethod" everywhere except the right spot because I either end
up with 1) an error (Tapestry not being able to find the
onChangeMethod or 2) the calendar showing up, inserting the date I
select into the textbox, but not going away after the date has been
selected.

So I guess my question is where am I supposed to put the
onChangeMethod and what do I  need to do so that it refreshes the
form?

Thanks,
   Jer



On Fri, 22 Oct 2004 14:47:56 -0400, Jer Kah <je...@gmail.com> wrote:
> OK, I've updated the DatePicker.script file so that it now calls the
> onchange() method.  Then, in my html I have the following:
> 
> <SCRIPT language="JavaScript">
> function onchange()
> {
>   document.myform.submit();
> }
> </SCRIPT>
> 
> The problem is that I don't know what the name of the form will be
> since Tapestry dynamically makes it (via the jwcid="@Form" attribute).
>  So what do I call my form in the code above?
> 
> Or am I doing this completely wrong?
> 
> Thanks,
>   Jer
> 
> 
> 
> 
> On Fri, 22 Oct 2004 18:03:23 +0100, Jonathan O'Connor
> <jo...@xcom.de> wrote:
> > Jeremy, there is a bug in the DatePicker so that it does not call
> > onChanged() on the TextEdit. Search this list for my fix for this problem.
> > You will need to add one line of code into the DatePicker.js or some such
> > file.
> >
> > I thought I had added a bug for this, but I think I added it into the
> > wrong place (Tapestry seems to have switched bug tracking systems in
> > recent months). I'll add this on Tuesday, when I'm back from our long
> > weekend!
> > Ciao,
> > Jonathan O'Connor
> > XCOM Dublin
> >
> > Jer Kah <je...@gmail.com>
> > 22/10/2004 16:46
> > Please respond to
> > "Tapestry users" <ta...@jakarta.apache.org>
> >
> > To
> > tapestry-user@jakarta.apache.org
> > cc
> >
> > Subject
> > submit form on DatePicker change [auf Viren geprueft]
> >
> > Greetings,
> >
> > I'm new to Tapestry as I started using it this past Monday.
> > Everything's going well except that I can't figure out how to submit a
> > form when I select a Date using the DatePicker component.  I've
> > searched the web and this archive, and I've found one or two other
> > people asking the same question, but no one replied satisfactorially
> > (if at all) to the posts I found.  I've tried messing around with the
> > DatePicker script and javascript source, but I couldn't get it work.
> >
> > More in depth, the application I'm writing needs to display weekly
> > data from a db.  When a different date is chosen via the DatePicker,
> > the app has to check if it's during the same week as what's currently
> > displayed and if not, query the db and update the page.
> >
> > Does anyone know of a way to do this?
> >
> > Thanks,
> >    Jeremy
> >
> > ---------------------------------------------------------------------
> > 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: submit form on DatePicker change [auf Viren geprueft]

Posted by Jer Kah <je...@gmail.com>.
OK, I've updated the DatePicker.script file so that it now calls the
onchange() method.  Then, in my html I have the following:

<SCRIPT language="JavaScript">
function onchange()
{
  document.myform.submit();
}
</SCRIPT>

The problem is that I don't know what the name of the form will be
since Tapestry dynamically makes it (via the jwcid="@Form" attribute).
 So what do I call my form in the code above?

Or am I doing this completely wrong?  

Thanks,
  Jer


On Fri, 22 Oct 2004 18:03:23 +0100, Jonathan O'Connor
<jo...@xcom.de> wrote:
> Jeremy, there is a bug in the DatePicker so that it does not call
> onChanged() on the TextEdit. Search this list for my fix for this problem.
> You will need to add one line of code into the DatePicker.js or some such
> file.
> 
> I thought I had added a bug for this, but I think I added it into the
> wrong place (Tapestry seems to have switched bug tracking systems in
> recent months). I'll add this on Tuesday, when I'm back from our long
> weekend!
> Ciao,
> Jonathan O'Connor
> XCOM Dublin
> 
> Jer Kah <je...@gmail.com>
> 22/10/2004 16:46
> Please respond to
> "Tapestry users" <ta...@jakarta.apache.org>
> 
> To
> tapestry-user@jakarta.apache.org
> cc
> 
> Subject
> submit form on DatePicker change [auf Viren geprueft]
> 
> Greetings,
> 
> I'm new to Tapestry as I started using it this past Monday.
> Everything's going well except that I can't figure out how to submit a
> form when I select a Date using the DatePicker component.  I've
> searched the web and this archive, and I've found one or two other
> people asking the same question, but no one replied satisfactorially
> (if at all) to the posts I found.  I've tried messing around with the
> DatePicker script and javascript source, but I couldn't get it work.
> 
> More in depth, the application I'm writing needs to display weekly
> data from a db.  When a different date is chosen via the DatePicker,
> the app has to check if it's during the same week as what's currently
> displayed and if not, query the db and update the page.
> 
> Does anyone know of a way to do this?
> 
> Thanks,
>    Jeremy
> 
> ---------------------------------------------------------------------
> 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: submit form on DatePicker change [auf Viren geprueft]

Posted by Jonathan O'Connor <Jo...@xcom.de>.
Jeremy, there is a bug in the DatePicker so that it does not call 
onChanged() on the TextEdit. Search this list for my fix for this problem. 
You will need to add one line of code into the DatePicker.js or some such 
file.

I thought I had added a bug for this, but I think I added it into the 
wrong place (Tapestry seems to have switched bug tracking systems in 
recent months). I'll add this on Tuesday, when I'm back from our long 
weekend!
Ciao,
Jonathan O'Connor
XCOM Dublin



Jer Kah <je...@gmail.com> 
22/10/2004 16:46
Please respond to
"Tapestry users" <ta...@jakarta.apache.org>


To
tapestry-user@jakarta.apache.org
cc

Subject
submit form on DatePicker change [auf Viren geprueft]






Greetings,

I'm new to Tapestry as I started using it this past Monday. 
Everything's going well except that I can't figure out how to submit a
form when I select a Date using the DatePicker component.  I've
searched the web and this archive, and I've found one or two other
people asking the same question, but no one replied satisfactorially
(if at all) to the posts I found.  I've tried messing around with the
DatePicker script and javascript source, but I couldn't get it work.

More in depth, the application I'm writing needs to display weekly
data from a db.  When a different date is chosen via the DatePicker,
the app has to check if it's during the same week as what's currently
displayed and if not, query the db and update the page.

Does anyone know of a way to do this?

Thanks,
   Jeremy

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