You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by Harish Krishnaswamy <hk...@comcast.net> on 2003/09/12 17:46:20 UTC

[Fwd: RE: Decoupled Date Picker component questoin]

Any reason why the Button component should not render the <button...> 
tag instead of the <input type="button".../>?

-Harish

-------- Original Message --------
Subject: 	RE: Decoupled Date Picker component questoin
Date: 	Thu, 11 Sep 2003 11:40:59 -0500
From: 	Chris Norris <CN...@widen.com>
Reply-To: 	Tapestry users <ta...@jakarta.apache.org>
To: 	'Tapestry users' <ta...@jakarta.apache.org>



We solved this problem.  We just created and ImageButton component that
extends the tapestry button, but renders an image.  Works like a charm.  I
then made a wrapper component that contains a ValidField, and ImageButton,
and the DecoupledDatePicker.

If I find the time, I'll make a more general ImageButton component that
could be reused by other people.

-chris

-----Original Message-----
From: Chris Norris [mailto:CNorris@widen.com] 
Sent: Thursday, September 11, 2003 10:00 AM
To: 'Tapestry users'
Subject: RE: Decoupled Date Picker component questoin


Alright, I figured this problem out.  I changed the TextFields to
ValidFields and used a dateValidator, and everything worked out fine.

Which brings me to part 2 of my problem:
How to make an image into a button.  Does anyone have any suggestions here?
My only guess right now is to make some extension of tapestry.form.button.
Something along the lines of the ImageSubmit component, but a more general
ImageButton component.  Or am I going about this in the wrong way?

-chris

-----Original Message-----
From: Chris Norris [mailto:CNorris@widen.com] 
Sent: Thursday, September 11, 2003 9:16 AM
To: 'Tapestry users'
Subject: RE: Decoupled Date Picker component questoin


Harish,
Thanks for responding. I think it is a problem with the way I am defining my
buttons and passing them to the DecoupledDatePicker.  Here's the html:

	Start Date<br />
	<input jwcid="startDateField@TextField" value="ognl:newStartDate" />
	<input jwcid="calendarButton@Button" label="Calendar"/>
	<input jwcid="startDatePicker" />

And the corresponding .page file:

	<component id="startDatePicker" type="DecoupledDatePicker">
		<binding name="field" expression="components.startDateField"
/>
		<binding name="button"
expression="components.calendarButton" />
		<binding name="format"
expression="@md.Formats@DATE_FORMAT.toPattern()" />
		<binding name="value" expression="newStartDate" />
	</component>

I have a feeling that maybe the problem is that the TextField is trying to
update the property with a String.

-chris

-----Original Message-----
From: Harish Krishnaswamy [mailto:hkrishnaswamy@comcast.net] 
Sent: Thursday, September 11, 2003 9:09 AM
To: Tapestry users
Subject: Re: Decoupled Date Picker component questoin


I am not quite sure I understand. I have been using the component with 
Date objects and I don't have a problem. Could you provide some code 
that I can take a look at? But be advised that it may take a little 
while for me to respond.

-Harish

Chris Norris wrote:

>I've been trying to use the decoupled datepicker that Harish posted a 
>little while ago so that I could use something just like the 
>DatePicker, but with a custom button instead of some little down arrow 
>thingy that designers cringe at.  After putting it in and testing it, I 
>have only one problem.  I can't get it to actually try to set a date 
>object... it tries to put out a string, whereas the DatePicker actually 
>puts out a date.  I don't want to have to make an extra 
>setThisDate(String date) method in every class that already has a 
>setThisDate(Date date) method.  How can I get the decoupledDatePicker 
>to exhibit the same behavior as the DatePicker?
> 
>-chris
>
>  
>


---------------------------------------------------------------------
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

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