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:
>> [EMAIL PROTECTED] :
>> 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: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>>
>> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to