Re: DateTimeField and java.util.Calendar
On Thu, 27 Nov 2008, Eduardo Simioni wrote: If you want Wicket to be competitive, you should think about better and centralized documentation. Or better yet write it :) The wiki is centralised and open, everybody is more than welcome to update and improve it. documentation, and definitely source code is not documentation. Definitely source code is documentation and I find Wicket source code mostly understandable. It can be improved though, and here your patches are most welcome again :) In some places, the readability has to give way to optimisation though. 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. Nope, with Wicket (and any open source framework) you should just bundle the sources in your IDE, then the IDE will show javadocs as well. And javadocs always make more sense to read with the actual source code. E.g. mvn -DdownloadSources eclipse:eclipse Best wishes, Timo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DateTimeField and java.util.Calendar
] 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]
Re: DateTimeField and java.util.Calendar
Fim/label: input type=text wicket:id=endDate/br / label for=scoreRightPontos para Acerto/label: input wicket:id=scoreRight type=text size=10/br / label for=scoreWrongPontos para Erro/label: input wicket:id=scoreWrong type=text size=10/br / label for=scoreLimitLimite 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 IModelDate and takes an IModelCalendar 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]
Re: DateTimeField and java.util.Calendar
/ label for=scoreLimitLimite 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 IModelDate and takes an IModelCalendar 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]
Re: DateTimeField and java.util.Calendar
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 EntityFormRanking { private CalendarToDateModel modelStartDate; private CalendarToDateModel modelEndDate; public RankingForm( IModelRanking model, Component dataTable ) { super( model, dataTable ); add( new TextFieldRanking( name ) ); modelStartDate = new CalendarToDateModel( new PropertyModelCalendar( model, startDate ) ); add( new DateTextField( startDate, modelStartDate, new StyleDateConverter( SM, false ) ) ); modelEndDate = new CalendarToDateModel( new PropertyModelCalendar( model, endDate ) ); add( new DateTimeField( endDate, modelEndDate ) ); add( new TextFieldRanking( scoreRight ) ); add( new TextFieldRanking( scoreWrong ) ); add( new TextFieldRanking( scoreLimit ) ); } @Override public MarkupContainer setDefaultModel( IModel? model ) { modelStartDate.setDefaultModel( new PropertyModelCalendar( model, startDate ) ); modelEndDate.setDefaultModel( new PropertyModelCalendar( model, endDate ) ); return super.setDefaultModel( model ); } ... HTML: form wicket:id=form h2 wicket:id=createEditCriar/Editar Ranking/h2 div id=feedbackPanel wicket:id=feedbackPanelFeedback Panel/div label for=nameNome/label: input wicket:id=name type=text size=20/br / label for=startDateData/Hora InĂcio/label: input type=text wicket:id=startDate/br / label for=endDateData/Hora Fim/label: input type=text wicket:id=endDate/br / label for=scoreRightPontos para Acerto/label: input wicket:id=scoreRight type=text size=10/br / label for=scoreWrongPontos para Erro/label: input wicket:id=scoreWrong type=text size=10/br / label for=scoreLimitLimite 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 IModelDate and takes an IModelCalendar 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]
DateTimeField and java.util.Calendar
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.* *
Re: DateTimeField and java.util.Calendar
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]
Re: DateTimeField and java.util.Calendar
Yes - this would be a perfect time for a nested model - write a generic model that implements IModelDate and takes an IModelCalendar 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]