+1

On Mar 19, 2014, at 1:25 PM, Ji Kim wrote:

> For note =>
> 
> This is to allow components and etcetera to listen to this event by adding a 
> listener in the new UIXEditableValueTemplate.addValueUpdatedListener API. 
> 
> The pro of adding this event + listener is that various components can then 
> listen when the value has been updated in the model. 
> 
> This is beneficial in 
> 1) Clearing up any data that would have been persisted for some reason [i.e. 
> if the app wished to keep a temporary value of a component using some kind of 
> polling from client to server to not lose any dirty data {i.e. how confluence 
> wiki allows users to preserves the old states}]. 
> 2) To avoid sending a certain asynchronous dirty data from the client to the 
> server 
> 
> Thanks!
> 
> On 3/19/2014 12:44 PM, Ji Kim wrote:
>> So as requested I am sending out a separate email to get responses from the 
>> crowd regarding this JIRA 
>> [https://issues.apache.org/jira/browse/TRINIDAD-2459].
>> 
>> The change is to add 2 new APIs to Trinidad's UIXEditableValueTemplate =>
>> 
>> public void addValueUpdatedListener(ValueUpdatedListener listener) 
>> { 
>>   super.addFacesListener (listener); 
>> } 
>> 
>> public void removeValueUpdatedListener (ValueUpdatedListener listener) 
>> { 
>>   super.removeFacesListener (listener); 
>> } 
>> 
>> where ValueUpdatedEvent is queued within the updateModel method/phase.
>> 
>> public void updateModel(FacesContext context)
>> {
>>     ...
>>     try
>>     {
>>       Object localValue = getLocalValue();
>>       expression.setValue(context.getELContext(), localValue);
>>       setValue(null);
>>       setLocalValueSet(false);
>>       (new ValueUpdatedEvent(this)).queue();
>>     ...
>> }
>> 
>> Thanks!
> 

Reply via email to