Αρχικό μήνυμα από  Vinicius Carvalho <[EMAIL PROTECTED]>:

> Hello there folks. I need to create a datetime component composed of
> textfields and selects (text for hours, and selects for
> days/months/years).
> What's really tricking me is how can I be able to convert 5 fields
> into a date object? My first Idea was to create a
> AbstractFormComponent and user the writer to write everything, but it
> occurred to me that use a html template like this:
> 
> <input jwcid="[EMAIL PROTECTED]" model="daysInMonth"/> <input
> jwcid="[EMAIL PROTECTED]" model="monthsInYear"/> <input
> jwcid="[EMAIL PROTECTED]" model="years"/> <input
> jwcid="[EMAIL PROTECTED]"/> <input jwcid="[EMAIL PROTECTED]"/>
> 
> And on my component I'd provide the models for everything. But how to
> bind 5 fields into one object?

Bind them to 5 objects.
Then add a "date" parameter to your component.
On render, read the date parameter and 'extract' the values
that those 5 objects should have.
On rewind, read the 5 objects and use them to update the
date parameter.

Tapestry In Action contains a similar example ... a credit card
component is created from 4 textfields.


> 
> Could someone point me the directions, I promise as soon I finish it
> I'll post it here, I believe its an good addition to the framework (if
> it don't stinks too much).
> 
> ---------------------------------------------------------------------
> 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]

Reply via email to