The ValueBuilder.withState() calls the provided
StateHolder.visitProperties to build up the content, but it is
non-trivial to get hold of the Properties in the model. Assuming we
would like to keep that as-is for compatibility reasons, I would like
to suggest;

void dynamically( StateProvider state );

public interface StateProvider
{
    Object valueFor( PropertyDescriptor descriptor );
}

and the ValueBuilder will make a call for each Property to the StateProvider.


I use this extensively (the harder way) quite a lot to interact with
all kinds of external systems, where the 'plugin' is given a
ValueComposite type and handed back a populated one... I'll write a
longer mail on that topic.

WDYT?
-- 
Niclas Hedhman, Software Developer
http://www.qi4j.org - New Energy for Java

I live here; http://tinyurl.com/3xugrbk
I work here; http://tinyurl.com/24svnvk
I relax here; http://tinyurl.com/2cgsug

_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to