Basically, I think this component looks like a panel that displays a list of other panels;
(a) the list's model is the list of properties of the bean;
(b) for each property: see what it's type is (and for the advanced implementation look op property descriptor stuff, and see if special editors are attached etc). Now when we know which type it is, we construct a nested panel for it that in turn has the needed input field on it. E.g. when it is a boolean, we construct a 'CheckboxInputPanel' (which has a checkbox on it), and when it is something else, we construct a 'TextfieldInputPanel' (which has a text field on it). We might also have a map with custom panels for certain types and/ or properties;


It is probably wise NOT to include the form itself on it, as that makes its usage actually less flexible, while not really adding power to it.

What I describe above, we actually have done allready (though not by introspection) for our project here. Works really well.

Eelco

Jonathan Locke wrote:



Eelco Hillenius wrote:

We could also consider making this a contrib component, or maybe even just a Wiki section. It's pretty specific, unless it is really good (full fledged java bean descriptor stuff).


i was thinking an extension. the power of having this done right might be really something... i'd hate to see that get lost in the shuffle...


A simple version is quite easy to implement. Might do it this weekend, or - if Ari wants to give it a shot, we can help him a bit by giving idea's. Or... now that I think of it, it might also be an example of how to construct custom components.


Eelco

Jonathan Locke wrote:


i wonder if we should have something like BeanEditForm that does just this...


<property-name> <form-component>
<property-name> <form-component>
   ...

let's make this an RFE for 1.1




------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to