Eduardo,

See org.apache.wicket.extensions.yui.calendar.DateField if you want a popup
DateTextField does not have a popup
DateTimeField has fields for time (as well as date) 

All the javadoc seems to be 
http://repo1.maven.org/maven2/org/apache/wicket/wicket/ there .
http://repo1.maven.org/maven2/org/apache/wicket/wicket/
Also see  http://wicket.apache.org/quickstart.html this .

There are a lot of good people working on this project. The documentation is
constantly improving (but  http://manning.com/dashorst/ Wicket In Action  is
a great resource) and this forum will give you more help than you can buy
for money anywhere else.

Regards - Cemal
http://www.jWeekend.co.uk http://jWeekend.co.uk 





Eduardo Simioni wrote:
> 
> If you want Wicket to be competitive, you should think about better and
> centralized documentation.
> Many developer blogs is not documentation, an outdated wiki is not
> documentation, and definitely source code is not documentation.
> I'm saying all this, because, once again, I spent a lot of time to get to
> work something that should be easy and straight.
> The first problem was my mistake, I haven't had realized that the
> DatePicker
> was a separate component.
> But the second problem with the DateTimeField, as almost always, I had to
> realize myself what was happening looking at the source code of the
> component. There was no example, no documentation at all showing how to
> use
> the component.
> Wicket is the only framework I work with that is impossible to achieve
> simple tasks without opening the source code. I know that this can happen,
> and I sometimes have to open the source code of other frameworks, but with
> Wicket this happens all the time.
> Another problem is that JavaDoc doesn't come with the dist. I have to read
> it at source code as well, because on the website there is just the
> JavaDoc
> for the current release. Please, don't ask me to generate the JavaDoc
> myself.
> 
> Wicket is nice, but its doc is still very poor.
> 
> Eduardo.
> 
> On 11/26/08, Eduardo Simioni <[EMAIL PROTECTED]> wrote:
>>
>> Nobody? Am I the only one having problems with these fields?
>>
>> Thanks,
>>
>> Eduardo.
>>
>> On 11/25/08, Eduardo Simioni <[EMAIL PROTECTED]> wrote:
>>>
>>> Thanks for the hints.
>>>
>>> The conversion using nested models worked, although I have had to do
>>> some
>>> ugly things in the code because, unlike other fields, date fields
>>> model's
>>> don't get automatically updated when the form model is updated. Probably
>>> because of the converter model, it would definitely be better if we
>>> could
>>> work with something more "magic". But for now that's ok.
>>>
>>> The problem now is that the date fields don't show up as expected in the
>>> page. I tried the DateTextField as in the examples but the button to
>>> open
>>> the calendar pop-up is not showing in the page.
>>> The DateTimeField (my first option) has a different problem, it shows an
>>> extra field that does nothing, I could not manage to remove it. Are
>>> these
>>> known bugs? I'm using 1.4-m3.
>>>
>>> See this image: http://www.simioni.net/wicket-date-fields-problems.jpg
>>>
>>> The relevant parts of the code for the class and page are the following:
>>>
>>> Class:
>>> private class RankingForm extends EntityForm<Ranking> {
>>>
>>>         private CalendarToDateModel modelStartDate;
>>>         private CalendarToDateModel modelEndDate;
>>>
>>>         public RankingForm( IModel<Ranking> model, Component dataTable )
>>> {
>>>             super( model, dataTable );
>>>             add( new TextField<Ranking>( "name" ) );
>>>             modelStartDate = new CalendarToDateModel( new
>>> PropertyModel<Calendar>( model, "startDate" ) );
>>>             add( new DateTextField( "startDate", modelStartDate, new
>>> StyleDateConverter( "SM", false ) ) );
>>>             modelEndDate = new CalendarToDateModel( new
>>> PropertyModel<Calendar>( model, "endDate" ) );
>>>             add( new DateTimeField( "endDate", modelEndDate ) );
>>>             add( new TextField<Ranking>( "scoreRight" ) );
>>>             add( new TextField<Ranking>( "scoreWrong" ) );
>>>             add( new TextField<Ranking>( "scoreLimit" ) );
>>>         }
>>>
>>>         @Override
>>>         public MarkupContainer setDefaultModel( IModel<?> model ) {
>>>             modelStartDate.setDefaultModel( new PropertyModel<Calendar>(
>>> model, "startDate" ) );
>>>             modelEndDate.setDefaultModel( new PropertyModel<Calendar>(
>>> model, "endDate" ) );
>>>             return super.setDefaultModel( model );
>>>         }
>>> ...
>>>
>>> HTML:
>>> <form wicket:id="form">
>>>             <h2 wicket:id="createEdit">Criar/Editar Ranking</h2>
>>>             <div id="feedbackPanel" wicket:id="feedbackPanel">Feedback
>>> Panel</div>
>>>             <label for="name">Nome</label>: <input wicket:id="name"
>>> type="text" size="20"/><br />
>>>             <label for="startDate">Data/Hora InĂ­cio</label>: <input
>>> type="text" wicket:id="startDate"/><br />
>>>             <label for="endDate">Data/Hora Fim</label>: <input
>>> type="text"
>>> wicket:id="endDate"/><br />
>>>             <label for="scoreRight">Pontos para Acerto</label>: <input
>>> wicket:id="scoreRight" type="text" size="10"/><br />
>>>             <label for="scoreWrong">Pontos para Erro</label>: <input
>>> wicket:id="scoreWrong" type="text" size="10"/><br />
>>>             <label for="scoreLimit">Limite de Pontos</label>: <input
>>> wicket:id="scoreLimit" type="text" size="10"/><br />
>>> ...
>>>
>>>
>>> Does anyone know a solution for these problems?
>>>
>>> Thanks!
>>>
>>> Eduardo.
>>>
>>>
>>> On 11/24/08, Jeremy Thomerson <[EMAIL PROTECTED]> wrote:
>>>>
>>>> Yes - this would be a perfect time for a nested model - write a generic
>>>> model that implements IModel<Date> and takes an IModel<Calendar> as its
>>>> input.
>>>>
>>>> See
>>>>
>>>> http://www.jeremythomerson.com/blog/2008/11/06/wicket-the-power-of-nested-models/
>>>> for
>>>> assistance with the rest.
>>>>
>>>>
>>>> --
>>>> Jeremy Thomerson
>>>> http://www.wickettraining.com
>>>>
>>>>
>>>>
>>>>
>>>> On Mon, Nov 24, 2008 at 3:08 PM, Igor Vaynberg <[EMAIL PROTECTED]
>>>> >wrote:
>>>>
>>>>
>>>> > write a model that converts to and from.
>>>> >
>>>> > -igor
>>>> >
>>>> > On Mon, Nov 24, 2008 at 12:30 PM, Eduardo Simioni
>>>> > <[EMAIL PROTECTED]> wrote:
>>>> > > Hi all,
>>>> > >
>>>> > > I'm trying to use the DateTimeField from the wicket-datetime
>>>> project.
>>>> But
>>>> > I
>>>> > > realized that it's stuck to java.util.Date, all my entities use
>>>> > > java.util.Calendar to store dates. So the question is: Is there a
>>>> clean
>>>> > way
>>>> > > to work with DateTimeField and java.util.Calendar "targets"?
>>>> > > I tried to find something in the list archive but looks like
>>>> everybody
>>>> > uses
>>>> > > java.util.Date, or I'm missing something silly.
>>>> > >
>>>> > > Thanks!
>>>> > >
>>>> > > Eduardo.*
>>>> > > *
>>>> > >
>>>> >
>>>> > ---------------------------------------------------------------------
>>>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>> > For additional commands, e-mail: [EMAIL PROTECTED]
>>>> >
>>>> >
>>>>
>>>
>>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/DateTimeField-and-java.util.Calendar-tp20669154p20726929.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to