I'm +1 as well. Juergen
On Fri, 04 Mar 2005 14:44:48 -0800, Jonathan Locke <[EMAIL PROTECTED]> wrote: > > > Jan Blok wrote: > > >Hi, > > > > > > > >>yes, but Component is much more flexible than String. > >> > >> > >> > >Passing Component is fine, no problem what so ever... > > > > > > > >>i think you're hung up on trying to create some generalized > >>data binding solution. > >> > >> > > > >Not really/intentional when I did review I noticed loads of Imodel > >instance objects created/needed due to the fact of the design of Imodel, > >which can be so easily prevented/optimized. > > > > > yup. good catch. i was worried at first mainly because i didn't > understand you, but i think in the end we have something good here. > > jon > > >Regards Jan > > > > > > > >>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: > >>>> > >>>> > >>>> > >>>> > >>>> > >>>>>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 > >>> > >>> > >>> > >>> > >>> > >>------------------------------------------------------- > >>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
