yes, but Component is much more flexible than String.
i think you're hung up on trying to create some generalized data binding solution. i don't think wicket should get involved in that. wicket should have a solution that's really targeted at binding wicket components to their data in a flexible and useful way.
Jan Blok wrote:
Hi,
Clear, to gain efficiency any of the proposed arguments passed to IModel.set/getObject methods will work...
Jan
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jonathan Locke
Sent: Friday, March 04, 2005 10:47 PM
To: [email protected]
Subject: Re: [Wicket-develop] Wicket IModel questions
yeah, but these aren't models in general. they're wicket component models. in that sense, i think IModel is a whole lot more flexible this way.
i really dislike the idea of giving Component any more attributes, especially this particular attribute. in addition, it's important to me that Component not directly hold the Object. i think this indirection is a worthwhile abstraction.
Jan Blok wrote:
Component),Hi,
I not sure yet what to think about Jonathan's idea to passing a
Component, IModel whould be less clean, and gets a class dependency
(which is for sure less clean for my models having to import
clean/simple butbut would work for me...
Is it an idea to use as said before what we in Servoy use? Give a
component set/getDataProviderID which is used in
Imodel.getObject(dataProvider)? keeping Imodel fairly
implementation inhave an excplicit identifier for modelobject lookup?
Jan
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Eelco Hillenius
Sent: Friday, March 04, 2005 10:03 PM
To: [email protected]
Subject: Re: [Wicket-develop] Wicket IModel questions
That's allright I guess.
Jonathan Locke wrote:
yeah, i'm on the fence too on the properties file
fact thatthe core. but if we used Component instead of String,someone could
implement that as an extension. if we use String, we're walled in forever. if we do this at all, i'd be much more in favor of getObject(Component) even if we just do Component.getName()for now.
simple, andmake sense?
jon
Eelco Hillenius wrote:
Makes sense, but I don't like it. Next thing to introduce is some fancy XML binding! I like Wicket because it keeps things
files to knowyou don't need to browse through tons of configuration
what you're doing.
I also like stuff like Jan sent us:
class Row implements IModel { private Map columndata;
public Object getObject(String id) { return columndata.get(id); } public void setObject(String id,Object obj) { columndata.put(id,obj) }
So I am kind of +0.5 for changing IModel to the structure Jan proposed; I especially like the efficiency gain, and the
reading now.would lookproperty model (or whatever its name would be in future)
((PropertyMappings)mappings.get(getPage().getClass())).expressmore natural. But anything that introduces any more 'magic' will actually make it fuzzier.
I'd like to know what Chris and Juergen think about this as well.
Regards,
Eelco
Jonathan Locke wrote:
uh, oh yeah, i guess obviously this:
public String propertyExpression()
{
return
ionFor(this);
component.getName();}
needs to do the null check. and not this:
public String expressionFor(Component component)
{
String expression = properties.get(component.getClassRelativePath());
return expression != null ? expression :
from real users.-------------------------------------------------------} ;-)
so it would be:
public String propertyExpression()
{
OgnlBindings bindings = bindings.get(getPage().getClass());
return bindings == null ? getName() : bindings.expressionFor(this);
}
make sense? ;-)
Jonathan Locke wrote:
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products
reading now.Discover which products truly live up to the hype. Start
from real users.-------------------------------------------------------http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Wicket-develop mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wicket-develop
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products
Discover which products truly live up to the hype. Startreading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click-------------------------------------------------------
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop
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
real users.http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Wicket-develop mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wicket-develop
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from
-------------------------------------------------------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-develop mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wicket-develop
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-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop
------------------------------------------------------- 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-develop mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wicket-develop
------------------------------------------------------- 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-develop mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wicket-develop
