Jonathan Locke wrote:


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.

ah, okay, i guess you're saying that imodel still exists and the component doesn't hold the Object directly, but is rather just parameterized on a string.


i'm pretty sure this isn't the right thing because if you think about it, the model is actually parameterized on the Component. it's a /Component/ model.


Jan Blok wrote:

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 Component),
but 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 clean/simple but
have 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 implementation in the 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.


make 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

simple, and

you don't need to browse through tons of configuration

files to know

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 fact that property model (or whatever its name would be in future)

would look

more 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

((PropertyMappings)mappings.get(getPage().getClass())).express
ionFor(this);


  }

needs to do the null check.  and not this:

public String expressionFor(Component component)
{
String expression = properties.get(component.getClassRelativePath());
return expression != null ? expression :

component.getName();


 }
;-)

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

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






-------------------------------------------------------
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

Reply via email to