The basic idea is that when the user updates the window  position the code just 
updates the Configuration and not the screen. This will result a call in 
modified that contains the new coordinates, which are then used to reposition 
the window. 

This way you have only one code path for the initial start and any updates. 
Clean and simple. 

Of course you should not do this for fine grained updates but for courser 
configuration that is the approach: update config -> use the notification to 
reflect the update.

Kind regards,

        Peter Kriens



On 5 jun 2011, at 07:49, Andrei Pozolotin wrote:

>    Hello.
> 
>    I am using felix ConfigurationAdmin & SCR;
> 
>    question: how can I combine ConfigurationAdmin & component self-update?
> 
>    for example, SCR component has a ui located on the screen (x,y);
>    this is pushed from ConfigurationAdmin to the component via
>    SCR.activate() & SCR.modified();
> 
>    now user moves a ui to a new (x,y); per osgi spec, ConfigurationAdmin
>    does not differentiate on the update request source;
> 
>    hence, Configuration.update(properties) (trying to persist the new
>    (x,y))
>    if called from configuration target component itself,
>    will create a recursion, which it does;
> 
>    and Configuration.update() /* with no properties*/ does not create a
>    recursion,
>    but does not persist the configuration either;
> 
>    what am I missing? :-)
> 
>    Thank you,
> 
>    Andrei.
> 


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

Reply via email to