You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Stephan Windmüller <st...@tu-dortmund.de> on 2014/08/06 12:16:05 UTC

Using "defer=false" in combination with zones

Hello,

we have a custom component which manages a list of items and allows to
add and remove items to this list. In order to make this work, we have
to set the "defer" parameter of the add/remove-buttons to "false"
because otherwise it would not be possible to use this component in a loop.

Currently we want to add AJAX behavior to this component, allowing to
select the items from AJAX-select-fields (like in [0]). Using
"defer=false" does not work here, as soon as I wrap the fields in a
zone, the selected values are set long after the handling of
"onSelectFromAddButton" which is used to add the item, causing a lot of
problems with the data flow.

Does anyone know how I can use zones in this constellation?

Regards
 Stephan

[0] http://jumpstart.doublenegative.com.au/jumpstart/examples/ajax/select1

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Using "defer=false" in combination with zones

Posted by Geoff Callender <ge...@gmail.com>.
Sorry, I thought I'd have time to play with your example, but I don't.

In the past I've found that a Zone inside a Form is problematic. I think the zone updates upset the structure that Form expects (is that true, anyone?). I think the usual advice on the mailing list in this case is to use FormFragment instead of Zone, with each request from a FormFragment being a Submit (with mode="cancel" defer="false", and the Form having zone="^") rather than an EventLink, but that might not help you. Luckily for me, I've never had a UI design that flows in the way yours does. And I don't think I've ever tried putting a FormFragment inside a Loop.

The only other thing I can offer is probably not much help either: life will be much easier if you can somehow redesign it to have a Form within a Zone (within the Loop), like these:

	http://jumpstart.doublenegative.com.au/jumpstart7/examples/ajax/formsinaloop
	http://jumpstart.doublenegative.com.au/jumpstart7/examples/ajax/formsinaloopwithdeh

Geoff

On 15 Aug 2014, at 5:50 pm, Stephan Windmüller <st...@tu-dortmund.de> wrote:

> On 12.08.2014, I wrote:
> 
>> To demonstrate it, I created an example application along with a screenshot:
>> https://github.com/stovocor/tapestry-zone-defer
>> As you can see when starting it, the parameter of the select field in
>> the zone is null when hitting the "Add" button. Furthermore the wrong
>> zone is updated because of the loop.
> 
> Did anyone take a look at the example or could me point to an example
> AJAX component which can be used in a loop inside a form?
> 
> - Stephan
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Using "defer=false" in combination with zones

Posted by Stephan Windmüller <st...@tu-dortmund.de>.
On 12.08.2014, I wrote:

> To demonstrate it, I created an example application along with a screenshot:
> https://github.com/stovocor/tapestry-zone-defer
> As you can see when starting it, the parameter of the select field in
> the zone is null when hitting the "Add" button. Furthermore the wrong
> zone is updated because of the loop.

Did anyone take a look at the example or could me point to an example
AJAX component which can be used in a loop inside a form?

- Stephan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Using "defer=false" in combination with zones

Posted by Stephan Windmüller <st...@tu-dortmund.de>.
On 11.08.2014, Geoff Callender wrote:

> It's very hard to visualise your situation. Can you drop a mockup of
> the UI somewhere that we can see it?

To demonstrate it, I created an example application along with a screenshot:

https://github.com/stovocor/tapestry-zone-defer

As you can see when starting it, the parameter of the select field in
the zone is null when hitting the "Add" button. Furthermore the wrong
zone is updated because of the loop.

What am I doing wrong here?

Regards
 Stephan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Using "defer=false" in combination with zones

Posted by Geoff Callender <ge...@gmail.com>.
It's very hard to visualise your situation. Can you drop a mockup of the UI somewhere that we can see it?

On 11 Aug 2014, at 11:40 pm, Stephan Windmüller <st...@tu-dortmund.de> wrote:

> On 06.08.2014, I wrote:
> 
>> Currently we want to add AJAX behavior to this component, allowing to
>> select the items from AJAX-select-fields (like in [0]). Using
>> "defer=false" does not work here, as soon as I wrap the fields in a
>> zone, the selected values are set long after the handling of
>> "onSelectFromAddButton" which is used to add the item, causing a lot of
>> problems with the data flow.
> 
> Does anyone have an idea on how to fix this?
> 
> Regards
> Stephan
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Using "defer=false" in combination with zones

Posted by Stephan Windmüller <st...@tu-dortmund.de>.
On 06.08.2014, I wrote:

> Currently we want to add AJAX behavior to this component, allowing to
> select the items from AJAX-select-fields (like in [0]). Using
> "defer=false" does not work here, as soon as I wrap the fields in a
> zone, the selected values are set long after the handling of
> "onSelectFromAddButton" which is used to add the item, causing a lot of
> problems with the data flow.

Does anyone have an idea on how to fix this?

Regards
 Stephan


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org