Hi  Carlo,

Look at the wicket interface wicket.model.IModel

public interface IModel<T>  extends IDetachable {

public T getObject();

public void setObject(T value);

}

Every component in wicket has a default model. Think of the textfield case where the model contains the string being entered. By layering or using a specific implementation you can have the value of the text field actually stored in a java bean.

Your "how is it loaded?" question is an implementation detail of the particular model being used.

For example extending AbstractReadonlyModel would let you pull out a specific field in a bean programatically.

Or you could use a CompountPropertyModel that does the same thing but using some type of reflection.

Or a LoadableDetachableModel to pull in data from the database or other non-serializable context that is reassociated on each request.

This page on the wicket wiki is a good entry point on this topic: https://cwiki.apache.org/WICKET/working-with-wicket-models.html

Regards,

Mike

hi,

through what mechanism does it do it?
i was wondering if wicket uses reflection or it generates code on the fly

thanks

On Mon, Apr 4, 2011 at 12:21 AM, James Carman<ja...@carmanconsulting.com>wrote:

That's not entirely correct.  Wicket uses the models to populate form
components
On Apr 3, 2011 9:11 AM, "Sven Meier"<s...@meiers.net>  wrote:
Yes, take a look at org.apache.wicket.util.lang.PropertyResolver

Sven

On 04/03/2011 03:01 PM, Carlo Camerino wrote:
Does wicket use reflection for this purpose?

On Sun, Apr 3, 2011 at 8:50 PM, Carlo Camerino<carlo.camer...@gmail.com
wrote:
HI,

I was just wondering, what mechanism does Wicket uses to get values
from
Java beans?

Is reflection used or does wicket use a library to do this?
I had a very slow experience when using Reflection, how does Wicket do
it?
Thanks
Carlo


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to