Hi Juan,

The rewind is performed in exactly the same way as the render, except that no output is produced. In other words, all mutators that would be invoked during render (such as the property set by the iterator), would be invoked during rewind as well.

Best regards,

-mb

 

 Juan Alvarez <[EMAIL PROTECTED]> wrote:

Excelent response, but i have one more question, the component
ListLocale suppose that the setCurrentLocale occurs before the
getCurrentLocale? all muttators are called in the rewind process?

thx for all support to the development and users of tapestry,

greatings from colombia

On Tue, Nov 26, 2002 at 03:10:10PM -0800, Mind Bridge wrote:
> Hi Juan,
>
> When a component is in a foreach component and this foreach component is
> in a form component, numeric identifier are automatically appended to
> the name of the component?
>
> Yes, this is one of the great parts of Tapestry -- form elements are
> assigned unique names automatically behind the scenes. As a result, even
> if you have an iterator within a form, each element within the iterator
> will be given a unique name. Upon the form submission a 'rewind' is
> performed on the form to dynamically 'recreate' it, values will then be
> assigned and listeners will be invoked for each matching name in the
> key-value pairs within the POST.
>
> This example is actually fairly simple in this respect, since the Checkbox
> component does not carry any information other than whether it has been
> checked or not. The element in the list the checkbox refers to is provided
> by the currentLocale property which the iterator changes with each row. (A
> more complex component that combines a Checkbox and a Hidden can be
> developed that would carry not only the the state of the checkbox, but
> also the element (or its id) that it refers to, but this is rarely needed
> as demonstrated by this example.)
>
> The framework automatically calls in the render process the method
> setCheckboxSelected, for each of the checkboxes generated?
>
> Nearly so. setCheckboxSelected() is actually called during the 'rewind'
> process that occurs at form submission. It generates a form identical to
> that generated by the render process of the previous request, which allows
> the correct setting of fields and invocation of listeners. The rewind is
> then followed by a new render that generates the new page (possibly the
> form in its new state, updated to reflect the changes within the session
> that have occurred due to the previous page submission).
>
> I hope this makes sense -- not sure I managed to explain it clearly
> enough...
>
> -mb
>
>
>
> Juan Alvarez <[EMAIL PROTECTED]>wrote:
>
> I'm reading the example of workbench application. I'm primarly
> interested in table component so i went to read the source code of
> LocaleList component, and i found some hard to understand thing:
>
> The checkbox component is wrapped into the tableRows component,
> TableRows component type, i like to know why that component knows what
> locales are selected, so i go to read the xml descriptor to see the
> associated expresion of the checkbox component:
>
> then go to the java source code:
>
> public boolean getCheckboxSelected()
> {
> return m_setSelectedLocales.contains(getCurrentLocale());
> }
>
> public void setCheckboxSelected(boolean bSelected)
> {
> if (bSelected)
> m_setSelectedLocales.add(getCurrentLocale());
> else
> m_setSelectedLocales.remove(getCurrentLocale());
> }
>
> and all its pretty logical, but i dont understand:
>
> When a component is in a foreach component and this foreach component is
> in a form component, numeric identifier are automatically appended to
> the name of the component?
>
> The framework automatically calls in the render process the method
> setCheckboxSelected, for each of the checkboxes generated?
>
> --
> Juan Alvarez Fluid Signal S.A.
> mailto:[EMAIL PROTECTED] http://www.fluidsignal.com/
> Key fingerprint: 15C4 0986 A174 862A B607 8EEA 934F 8649 07E2 EA40
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Get the new Palm Tungsten T
> handheld. Power & Color in a compact size!
> http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en
> _______________________________________________
> Tapestry-developer mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/tapestry-developer
>
> ----------------------------------------------------------------------
>
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now

--
Juan Alvarez Fluid Signal S.A.
mailto:[EMAIL PROTECTED] http://www.fluidsignal.com/
Key fingerprint: 15C4 0986 A174 862A B607 8EEA 934F 8649 07E2 EA40


-------------------------------------------------------
This SF.net email is sponsored by: Get the new Palm Tungsten T
handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en
_______________________________________________
Tapestry-developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/tapestry-developer



Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now

Reply via email to