You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Nazmul Bhuiyan <Na...@nz.fujitsu.com> on 2007/09/13 06:32:19 UTC

Re: T3: DateTimePicker

Please help me finding what I'm missing here?

I'm getting the following error:

org.apache.tapestry.ApplicationRuntimeException 
Unable to convert 'myws:DateTimePicker' to a property type. 
location: context:/InfringementEdit.page, line 39, column 74 
   
org.apache.tapestry.ApplicationRuntimeException 
Could not load class myws:DateTimePicker from WebappClassLoader delegate:
false repositories: /WEB-INF/classes/ ----------> Parent Classloader:
org.apache.catalina.loader.StandardClassLoader@2bb514 : myws:DateTimePicker 



.application
<application name="eFileWeb">
	<library id="contrib"
specification-path="/org/apache/tapestry/contrib/Contrib.library" />	
	<library id="myws"
specification-path="/myws/tapestry/components/MyWorkspace.library"/>
</application>


.page

<property-specification name="offnHearDate" type="myws:DateTimePicker"/>
<component id="offnHearDate" type="DateTimePicker">
	<binding name="validator" expression="beans.requiredDate" />
	<binding name="value" expression="offnHearDate"></binding>
</component>


.java
	public abstract DateTimePicker getOffnHearDate();
	public abstract void setOffnHearDate(DateTimePicker offnHearDate);

Thanks

Naz

Nick Westgate wrote:
> 
> Most readers here won't have a T3 project handy,
> and even fewer will have used this component (I haven't).
> 
> Please define "didn't work".
> 
> Cheers,
> Nick.
> 
> 
> Nazmul Bhuiyan wrote:
>> I've downloaded the myworkspace-0.2.jar from
>> http://myworkspace.sourceforge.net/component-library.html.
>> I've tried to use this component as DatePicker but didn't work. I must
>> have
>> missed something basic.
>> Can some one please some example how to use this component?
>> For example: in the html templet, .page and the java?
>> Thanks
>> Naz
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/T3%3A-DateTimePicker-tf4344767.html#a12648572
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


Re: T3: DateTimePicker

Posted by Nick Westgate <ni...@key-planning.co.jp>.
Well displayName must be a string, right?

If you copy the code I gave (note the ' ' inside the " ") binding uses
ognl notation for a string, or you can use static-binding like you did.
       <binding name="displayName" expression="'The field name'" />
or
       <static-binding name="displayName" value="The field name" />

Cheers,
Nick.


Nazmul Bhuiyan wrote:
> I couldn't manage to use the "displayName" for DateTimePicker. I don't know
> how to define it. 
> 
> I had similar problem with DatePicker and handle it as below:
> 
> <tr>
>     <td> Active Date:</td>
>     <td>
>         -span jwcid="activeDate" />
>         -span style="color : #f00;"> *
>     </td>
> </tr>
> 
> <component id="activeDate" type="DatePicker">
>     <binding name="validator" expression="beans.requiredDate"/>
>     <binding name="value" expression="activeDate"></binding>
> </component>
> 
> And then I've done all my validation on my page class. I know it is not
> tapestry way.
> 
> Can you please show me how should I define my DateTimePicker component with
> the the "displayName" in my html templet? 
> 
> I've done for other field as below:
> 
> <tr>
> 	<td>
> 		span jwcid="@FieldLabel"
> field="ognl:components.inputAddrTypeCodeOld">Code: 
> 	</td>
> 	<td>
> 		<input type="text" jwcid="inputAddrTypeCodeOld"/>
> 	</td>
> </tr>
> 
> <component id="inputAddrTypeCodeOld" type="ValidField">
> 	<static-binding name="displayName" value="Code " />
> 	<binding name="validator" expression="beans.required"/>
> 	<binding name="value" expression="addrType.adtTypeCode"/>
> </component>
> 
> 
> Thanks
> 
> Naz
> 
> 
> Nick Westgate wrote:
>> Hmm, looks like you are trying to edit a value of type DateTimePicker!
>>
>> <property-specification> is used to define properties of your Java class.
>> You are presumably trying to edit a date, so something like:
>>
>> .page
>> <property-specification name="offnHearDate" type="java.lang.Date"/>
>> <component id="offnHearDatePicker" type="myws:DateTimePicker">
>>      <binding name="validator" expression="beans.requiredDate" />
>>      <binding name="value" expression="offnHearDate"></binding>
>>      <binding name="displayName" expression="'The field name'" />
>> </component>
>>
>> All bindings given above are marked as required in DateTimePicker.jwc.
>>
>> .java
>>      public abstract Date getOffnHearDate();
>>      public abstract void setOffnHearDate(Date offnHearDate);
>>
>> Cheers,
>> Nick.
>>
>>
>> Nazmul Bhuiyan wrote:
>>> Please help me finding what I'm missing here?
>>>
>>> I'm getting the following error:
>>>
>>> org.apache.tapestry.ApplicationRuntimeException 
>>> Unable to convert 'myws:DateTimePicker' to a property type. 
>>> location: context:/InfringementEdit.page, line 39, column 74 
>>>    
>>> org.apache.tapestry.ApplicationRuntimeException 
>>> Could not load class myws:DateTimePicker from WebappClassLoader delegate:
>>> false repositories: /WEB-INF/classes/ ----------> Parent Classloader:
>>> org.apache.catalina.loader.StandardClassLoader@2bb514 :
>>> myws:DateTimePicker 
>>>
>>>
>>>
>>> .application
>>> <application name="eFileWeb">
>>> 	<library id="contrib"
>>> specification-path="/org/apache/tapestry/contrib/Contrib.library" />	
>>> 	<library id="myws"
>>> specification-path="/myws/tapestry/components/MyWorkspace.library"/>
>>> </application>
>>>
>>>
>>> .page
>>>
>>> <property-specification name="offnHearDate" type="myws:DateTimePicker"/>
>>> <component id="offnHearDate" type="DateTimePicker">
>>> 	<binding name="validator" expression="beans.requiredDate" />
>>> 	<binding name="value" expression="offnHearDate"></binding>
>>> </component>
>>>
>>>
>>> .java
>>> 	public abstract DateTimePicker getOffnHearDate();
>>> 	public abstract void setOffnHearDate(DateTimePicker offnHearDate);
>>>
>>> Thanks
>>>
>>> Naz
>>>
>>> Nick Westgate wrote:
>>>> Most readers here won't have a T3 project handy,
>>>> and even fewer will have used this component (I haven't).
>>>>
>>>> Please define "didn't work".
>>>>
>>>> Cheers,
>>>> Nick.
>>>>
>>>>
>>>> Nazmul Bhuiyan wrote:
>>>>> I've downloaded the myworkspace-0.2.jar from
>>>>> http://myworkspace.sourceforge.net/component-library.html.
>>>>> I've tried to use this component as DatePicker but didn't work. I must
>>>>> have
>>>>> missed something basic.
>>>>> Can some one please some example how to use this component?
>>>>> For example: in the html templet, .page and the java?
>>>>> Thanks
>>>>> Naz
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>
>>>>
>>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>>
> 

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


Re: T3: DateTimePicker

Posted by Nazmul Bhuiyan <Na...@nz.fujitsu.com>.
I couldn't manage to use the "displayName" for DateTimePicker. I don't know
how to define it. 

I had similar problem with DatePicker and handle it as below:

<tr>
    <td> Active Date:</td>
    <td>
        -span jwcid="activeDate" />
        -span style="color : #f00;"> *
    </td>
</tr>

<component id="activeDate" type="DatePicker">
    <binding name="validator" expression="beans.requiredDate"/>
    <binding name="value" expression="activeDate"></binding>
</component>

And then I've done all my validation on my page class. I know it is not
tapestry way.

Can you please show me how should I define my DateTimePicker component with
the the "displayName" in my html templet? 

I've done for other field as below:

<tr>
	<td>
		span jwcid="@FieldLabel"
field="ognl:components.inputAddrTypeCodeOld">Code: 
	</td>
	<td>
		<input type="text" jwcid="inputAddrTypeCodeOld"/>
	</td>
</tr>

<component id="inputAddrTypeCodeOld" type="ValidField">
	<static-binding name="displayName" value="Code " />
	<binding name="validator" expression="beans.required"/>
	<binding name="value" expression="addrType.adtTypeCode"/>
</component>


Thanks

Naz


Nick Westgate wrote:
> 
> Hmm, looks like you are trying to edit a value of type DateTimePicker!
> 
> <property-specification> is used to define properties of your Java class.
> You are presumably trying to edit a date, so something like:
> 
> .page
> <property-specification name="offnHearDate" type="java.lang.Date"/>
> <component id="offnHearDatePicker" type="myws:DateTimePicker">
>      <binding name="validator" expression="beans.requiredDate" />
>      <binding name="value" expression="offnHearDate"></binding>
>      <binding name="displayName" expression="'The field name'" />
> </component>
> 
> All bindings given above are marked as required in DateTimePicker.jwc.
> 
> .java
>      public abstract Date getOffnHearDate();
>      public abstract void setOffnHearDate(Date offnHearDate);
> 
> Cheers,
> Nick.
> 
> 
> Nazmul Bhuiyan wrote:
>> Please help me finding what I'm missing here?
>> 
>> I'm getting the following error:
>> 
>> org.apache.tapestry.ApplicationRuntimeException 
>> Unable to convert 'myws:DateTimePicker' to a property type. 
>> location: context:/InfringementEdit.page, line 39, column 74 
>>    
>> org.apache.tapestry.ApplicationRuntimeException 
>> Could not load class myws:DateTimePicker from WebappClassLoader delegate:
>> false repositories: /WEB-INF/classes/ ----------> Parent Classloader:
>> org.apache.catalina.loader.StandardClassLoader@2bb514 :
>> myws:DateTimePicker 
>> 
>> 
>> 
>> .application
>> <application name="eFileWeb">
>> 	<library id="contrib"
>> specification-path="/org/apache/tapestry/contrib/Contrib.library" />	
>> 	<library id="myws"
>> specification-path="/myws/tapestry/components/MyWorkspace.library"/>
>> </application>
>> 
>> 
>> .page
>> 
>> <property-specification name="offnHearDate" type="myws:DateTimePicker"/>
>> <component id="offnHearDate" type="DateTimePicker">
>> 	<binding name="validator" expression="beans.requiredDate" />
>> 	<binding name="value" expression="offnHearDate"></binding>
>> </component>
>> 
>> 
>> .java
>> 	public abstract DateTimePicker getOffnHearDate();
>> 	public abstract void setOffnHearDate(DateTimePicker offnHearDate);
>> 
>> Thanks
>> 
>> Naz
>> 
>> Nick Westgate wrote:
>>> Most readers here won't have a T3 project handy,
>>> and even fewer will have used this component (I haven't).
>>>
>>> Please define "didn't work".
>>>
>>> Cheers,
>>> Nick.
>>>
>>>
>>> Nazmul Bhuiyan wrote:
>>>> I've downloaded the myworkspace-0.2.jar from
>>>> http://myworkspace.sourceforge.net/component-library.html.
>>>> I've tried to use this component as DatePicker but didn't work. I must
>>>> have
>>>> missed something basic.
>>>> Can some one please some example how to use this component?
>>>> For example: in the html templet, .page and the java?
>>>> Thanks
>>>> Naz
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>>
>> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/T3%3A-DateTimePicker-tf4344767.html#a12665364
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


Re: T3: DateTimePicker

Posted by Nick Westgate <ni...@key-planning.co.jp>.
Hmm, looks like you are trying to edit a value of type DateTimePicker!

<property-specification> is used to define properties of your Java class.
You are presumably trying to edit a date, so something like:

.page
<property-specification name="offnHearDate" type="java.lang.Date"/>
<component id="offnHearDatePicker" type="myws:DateTimePicker">
     <binding name="validator" expression="beans.requiredDate" />
     <binding name="value" expression="offnHearDate"></binding>
     <binding name="displayName" expression="'The field name'" />
</component>

All bindings given above are marked as required in DateTimePicker.jwc.

.java
     public abstract Date getOffnHearDate();
     public abstract void setOffnHearDate(Date offnHearDate);

Cheers,
Nick.


Nazmul Bhuiyan wrote:
> Please help me finding what I'm missing here?
> 
> I'm getting the following error:
> 
> org.apache.tapestry.ApplicationRuntimeException 
> Unable to convert 'myws:DateTimePicker' to a property type. 
> location: context:/InfringementEdit.page, line 39, column 74 
>    
> org.apache.tapestry.ApplicationRuntimeException 
> Could not load class myws:DateTimePicker from WebappClassLoader delegate:
> false repositories: /WEB-INF/classes/ ----------> Parent Classloader:
> org.apache.catalina.loader.StandardClassLoader@2bb514 : myws:DateTimePicker 
> 
> 
> 
> .application
> <application name="eFileWeb">
> 	<library id="contrib"
> specification-path="/org/apache/tapestry/contrib/Contrib.library" />	
> 	<library id="myws"
> specification-path="/myws/tapestry/components/MyWorkspace.library"/>
> </application>
> 
> 
> .page
> 
> <property-specification name="offnHearDate" type="myws:DateTimePicker"/>
> <component id="offnHearDate" type="DateTimePicker">
> 	<binding name="validator" expression="beans.requiredDate" />
> 	<binding name="value" expression="offnHearDate"></binding>
> </component>
> 
> 
> .java
> 	public abstract DateTimePicker getOffnHearDate();
> 	public abstract void setOffnHearDate(DateTimePicker offnHearDate);
> 
> Thanks
> 
> Naz
> 
> Nick Westgate wrote:
>> Most readers here won't have a T3 project handy,
>> and even fewer will have used this component (I haven't).
>>
>> Please define "didn't work".
>>
>> Cheers,
>> Nick.
>>
>>
>> Nazmul Bhuiyan wrote:
>>> I've downloaded the myworkspace-0.2.jar from
>>> http://myworkspace.sourceforge.net/component-library.html.
>>> I've tried to use this component as DatePicker but didn't work. I must
>>> have
>>> missed something basic.
>>> Can some one please some example how to use this component?
>>> For example: in the html templet, .page and the java?
>>> Thanks
>>> Naz
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>>
> 

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