:) I created a Callback registered @afterRender inside DateInput.java and
that did  the trick!
thanks a lot for your suggestions Mark!

(the post and code in my blog already has all changes)

On 5/30/07, Juan Maya <[EMAIL PROTECTED]> wrote:

Hi Matt. Yes, i am already aware of this problem and reading how to do it
in T5. If anybody has any suggestions i will appreciate it.


On 5/30/07, Matt Kerr <[EMAIL PROTECTED]> wrote:
>
> Hey Juan -
>
> umm ... 2 cents..
> if you have a minute, maybe let me know what i'm missing ..
> (thanks!)
>
> >Here is the DateInput component for t5:
> >http://juanemaya.blogspot.com/2007/05/tapestry-5-date-input-component.html
> >I am not sure if that's the best way to do it. I think that building
> the
> >date in the year set is not the best way but well, i am learning slowly
> :)
>
> I'd have to check the T5 docs(?), but I thought in T4 (and prior?) ..
> that you were *not* guaranteed to have your set'ers called in any specific
> order (e.g Year, Month, Day .. or Day, Month, Year, .. or whatever)
>
> So, if this works, it's just by chance.
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> public void setYear(String year) {
> this.year = year;
> setValue(DateUtils.buildDate(Integer.parseInt(month), Integer.parseInt(day),
> Integer.parseInt(year)));
> }
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Can anyone confirm or deny ?
>
>
> It's also kind of unsavory -- since, well, it's kind of subtle hidden
> there in setYear().
>
> Isn't there a well-defined point in time (e.g. a callback method) which
> is invoked by the framework to let you know ..
> "Hey!  The request has been process .. and your Component's ivars are
> set now .. so, go ahead and perform your Component's action, like
> setValue()"
>
> Versus .. always placing the Component's *real* beahiovor in the bottom
> half of the last accessor ?
> Doesn't that seem strange - ?
>
> If that's the case .. there seems little separation between the .html
> and the .java code :-((
> (E.g you can change the order of your .html (Year/Month/Day ->
> Month/Day/Year) .. and that will *break* your component :-O !!)
> That's the complete opposite of why you separate out presentation from
> logic -- they're not supposed to affect each other.
>
> I think you need a listener method or some such.
>
> I'm reading through the Tap4 docs -
>   http://tapestry.apache.org/tapestry4/UsersGuide/
>
> But where's the section on "Request Processing"?
> eg. what happens when someone submits a <FORM>?
> Or examples of simple form processing ..
>
> Thanks,sl
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to