Very good.

On 22 May 2014, at 3:00 pm, Ilya Obshadko <[email protected]> wrote:

> On Wed, May 21, 2014 at 5:51 AM, Geoff Callender <
> [email protected]> wrote:
> 
> I'm confused about the aim here. There's one form, yet there's one submit
>> per row. If you make changes to rows 1, 2, and 3, then click submit on row
>> 2, what do you expect to happen in the DB and client-side? Should rows 1
>> and 3 be persisted to the DB? Should rows 1 and 3 be reset, or perhaps
>> refreshed, client-side?
>> 
> 
> Well, not exactly. Form is a "wizard" style and I'm iterating over
> session-persisted collection.
> Each collection item is represented by set of form fields. Suppose you
> would like to 'reset' a specific collection item to its default state.
> I was trying to achieve that using t:submit element inside a component
> which represents a 'view' of collection item.
> 
> When the above method didn't work, I just moved my logic to client-side,
> resetting fields using JS and then submitting the form.
> That gave me the result I needed.
> 
> 
>> Might it be better to use Loop instead of AjaxFormLoop and do one AJAX
>> Form per row?
>> 
>> 
>> http://jumpstart.doublenegative.com.au/jumpstart/examples/ajax/formsinaloop
>> 
>> Geoff
>> 
>> On 20 May 2014, at 11:05 pm, Ilya Obshadko <[email protected]>
>> wrote:
>> 
>>> I've encountered a problem with event triggering inside AjaxFormLoop.
>>> 
>>> Suppose the following scenario.
>>> 
>>> - external component
>>> 
>>> <t:form>
>>> <t:ajaxformloop>
>>>   <t:mycomponent/>
>>> </t:ajaxformloop>
>>> </t:form>
>>> 
>>> - internal component (MyComponent)
>>> 
>>> <t:formfragment>
>>>  <t:submit t:id="submitControl" value=".."/>
>>>  ...
>>> </t:formfragment>
>>> 
>>> - in the code of MyComponent:
>>> 
>>> void onSelectedFromSubmitControl () {
>>> 
>>> }
>>> 
>>> Regardless of which submit is clicked, the event is triggered only on the
>>> last component in the loop. I know that p:defer parameter is supposed to
>>> handle this, but adding p:defer="false" doesn't help. Any ideas how to
>>> handle this?
>>> 
>>> 
>>> --
>>> Ilya Obshadko
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>> 
>> 
> 
> 
> -- 
> Ilya Obshadko


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to