I'm +1 for the new names but I'm also in the dark as to what
"detachable" refers to... care to clue me in?

Gili

On Fri, 28 Jan 2005 09:39:12 -0800, Jonathan Locke wrote:

>
>i've thought about this more.  i'm still a little uncomfortable with 
>this implementation, but i don't think it's the end of the world as we 
>know it because Collection is a pretty general interface.
>
>i'd like to keep IIdList and the adaptor class, but i'd like to rename 
>things.  i've already done this refactor and would like to check it in 
>tomorrow if nobody violently disagrees.  the changes are simply to help 
>indicate what the classes and methods are to be used for:
>
>IIdList -> IDetachableChoiceList
>IdListAdaptor -> DetachableChoiceList
>
>getIdValue -> getId
>?? -> objectForId
>
>minor changes, but i think they help make it obvious what everything is 
>for...
>
>i'm +1.  votes?  comments?
>
>Johan Compagner wrote:
>
>> that is already the case
>> IIdList is an interface that extends List
>> the default implementation extends ArrayList
>>
>> johan
>>
>>
>> Martijn Dashorst wrote:
>>
>>> Extending ArrayList seems to me not the correct way to go. I'd 
>>> suggest implement List and create our own implementation which 
>>> delegates to ArrayList or Vector or any other List (dependency 
>>> injection anyone?)
>>>
>>> Martijn
>>>
>>>
>>> Johan Compagner wrote:
>>>
>>>> no not convinced
>>>> I hate a that a UI framework forces me to use a specific interface 
>>>> for my persistent objecsts
>>>> Those are 2 worlds..
>>>> Also depending on toString() is not the way we want. toString should 
>>>> be used for debugging not display.
>>>> and also: What if we want one time just the lastname to display and 
>>>> another time first and lastname??
>>>>
>>>> The problem if you don't extend list then you can't do a drop in 
>>>> replacement into the DropDown anyway
>>>> because it needs a List (or Collection) for getting the values.
>>>> So if we don't extends list then we also should change the 
>>>> constructor of dropdown..
>>>> But i really don't mind that because it is a list anyway and you 
>>>> will use an ArrayList 99% of the times for it anyway.
>>>>
>>>> i personally find this way of working with the IIdList just fine. I 
>>>> find it easy to use and gives me full control.
>>>>
>>>> johan
>>>>
>>>>
>>>> Jonathan Locke wrote:
>>>>
>>>>>
>>>>> if we decide this is the best approach, which is fine, maybe we 
>>>>> could remove the List inheritance bit and put it in the model folder?
>>>>>
>>>>> i dunno... did i convince you any more with my last arguments?  ;-)
>>>>>
>>>>> Johan Compagner wrote:
>>>>>
>>>>>> yes i also thought about that  (that the objects had a display/id)
>>>>>> But then we would have to introduce a Interface in wicket 
>>>>>> (ISupportIdDisplay) that is completely drilled down to the 
>>>>>> persistence layer of the application
>>>>>> So the hibernate objects would have to implement a interface of 
>>>>>> wicket to show them in a DropDown/List
>>>>>> I really don't like that.
>>>>>> I also gould build a wrapper around those objects. But that is 
>>>>>> very time/memory  consuming because now i just load the results of 
>>>>>> a hibernate query into
>>>>>> the IIdList impl. Then i have to loop through all of them and wrap 
>>>>>> them into an object.
>>>>>>
>>>>>> So the best thing is just some glue between the DropDown and the 
>>>>>> Hibernate List like the IIdList
>>>>>>
>>>>>> joihan
>>>>>>
>>>>>>
>>>>>> Jonathan Locke wrote:
>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Johan Compagner wrote:
>>>>>>>
>>>>>>>> i am making an example right now for the examples project.
>>>>>>>>
>>>>>>>> I stil don't see how you could make a DetachableModel 
>>>>>>>> implentation for this...
>>>>>>>> ok the attach and the deattach do come from that one. But that 
>>>>>>>> are just 2 methods that are the same
>>>>>>>> setObject and getObject d on't make any sense for those because 
>>>>>>>> i need:
>>>>>>>> getDisplayValue(index row) and getRealValue(index row) and some 
>>>>>>>> others.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> i see what you mean, but i was hoping this could be more oo... 
>>>>>>> where each entry in the detachable list model has a display value 
>>>>>>> and an id somehow
>>>>>>>
>>>>>>>>
>>>>>>>> And remember the IIdList is NOT the base model, that every 
>>>>>>>> component have, where the selection is stored (the IModel)
>>>>>>>> And the selection values shouldn't also come from that Base 
>>>>>>>> Model because that would clutter the Model implementation greatly.
>>>>>>>> The AbstractDropDownChoice just does have 2 models.. That is 
>>>>>>>> something we can't go around..
>>>>>>>> One for the selection (IModel), and one for its list.(IIdModel)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> sure, i was just thinking two IModels.
>>>>>>>
>>>>>>>>
>>>>>>>> If you compare to swing then the IIdLis is a cellrenderer 
>>>>>>>> implementation..
>>>>>>>>
>>>>>>>> I still don't see how you could make a DetachableModel for this 
>>>>>>>> because people just need to implement at least 3-4 methods
>>>>>>>> for a select to be able to get all the values and set the 
>>>>>>>> selected object back into the real IModel.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> me either, but i'm still thinking here...
>>>>>>>
>>>>>>>>
>>>>>>>> johan
>>>>>>>>
>>>>>>>> Jonathan Locke wrote:
>>>>>>>>
>>>>>>>>>
>>>>>>>>> done with persistence / cookie refactor and thinking about 
>>>>>>>>> other little things to fix.
>>>>>>>>>
>>>>>>>>> i think i'm going to try refactoring IIdList tomorrow into 
>>>>>>>>> something more like DetachableListModel.  is any reason anyone 
>>>>>>>>> thinks this won't work out?  i'm curious why IIdList was the 
>>>>>>>>> approach and not some kind of DetachableListModel... was it 
>>>>>>>>> just "oh, didn't think of that" or am i missing something?  
>>>>>>>>> (you could save me a bunch of time in doing this refactor if 
>>>>>>>>> there was a good reason why the wicket.model classes didn't 
>>>>>>>>> appeal for doing this).
>>>>>>>>>
>>>>>>>>> thanks,
>>>>>>>>>
>>>>>>>>>        jon
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> -------------------------------------------------------
>>>>>>>>> This SF.Net email is sponsored by: IntelliVIEW -- Interactive 
>>>>>>>>> Reporting
>>>>>>>>> Tool for open source databases. Create drag-&-drop reports. 
>>>>>>>>> Save time
>>>>>>>>> by over 75%! Publish reports on the web. Export to DOC, XLS, 
>>>>>>>>> RTF, etc.
>>>>>>>>> Download a FREE copy at http://www.intelliview.com/go/osdn_nl
>>>>>>>>> _______________________________________________
>>>>>>>>> Wicket-develop mailing list
>>>>>>>>> [email protected]
>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/wicket-develop
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> -------------------------------------------------------
>>>>>>>> This SF.Net email is sponsored by: IntelliVIEW -- Interactive 
>>>>>>>> Reporting
>>>>>>>> Tool for open source databases. Create drag-&-drop reports. Save 
>>>>>>>> time
>>>>>>>> by over 75%! Publish reports on the web. Export to DOC, XLS, 
>>>>>>>> RTF, etc.
>>>>>>>> Download a FREE copy at http://www.intelliview.com/go/osdn_nl
>>>>>>>> _______________________________________________
>>>>>>>> Wicket-develop mailing list
>>>>>>>> [email protected]
>>>>>>>> https://lists.sourceforge.net/lists/listinfo/wicket-develop
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> -------------------------------------------------------
>>>>>>> This SF.Net email is sponsored by: IntelliVIEW -- Interactive 
>>>>>>> Reporting
>>>>>>> Tool for open source databases. Create drag-&-drop reports. Save 
>>>>>>> time
>>>>>>> by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, 
>>>>>>> etc.
>>>>>>> Download a FREE copy at http://www.intelliview.com/go/osdn_nl
>>>>>>> _______________________________________________
>>>>>>> Wicket-develop mailing list
>>>>>>> [email protected]
>>>>>>> https://lists.sourceforge.net/lists/listinfo/wicket-develop
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> -------------------------------------------------------
>>>>>> This SF.Net email is sponsored by: IntelliVIEW -- Interactive 
>>>>>> Reporting
>>>>>> Tool for open source databases. Create drag-&-drop reports. Save time
>>>>>> by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, 
>>>>>> etc.
>>>>>> Download a FREE copy at http://www.intelliview.com/go/osdn_nl
>>>>>> _______________________________________________
>>>>>> Wicket-develop mailing list
>>>>>> [email protected]
>>>>>> https://lists.sourceforge.net/lists/listinfo/wicket-develop
>>>>>>
>>>>>
>>>>>
>>>>> -------------------------------------------------------
>>>>> This SF.Net email is sponsored by: IntelliVIEW -- Interactive 
>>>>> Reporting
>>>>> Tool for open source databases. Create drag-&-drop reports. Save time
>>>>> by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
>>>>> Download a FREE copy at http://www.intelliview.com/go/osdn_nl
>>>>> _______________________________________________
>>>>> Wicket-develop mailing list
>>>>> [email protected]
>>>>> https://lists.sourceforge.net/lists/listinfo/wicket-develop
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> -------------------------------------------------------
>>>> This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
>>>> Tool for open source databases. Create drag-&-drop reports. Save time
>>>> by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
>>>> Download a FREE copy at http://www.intelliview.com/go/osdn_nl
>>>> _______________________________________________
>>>> Wicket-develop mailing list
>>>> [email protected]
>>>> https://lists.sourceforge.net/lists/listinfo/wicket-develop
>>>>
>>>
>>>
>>>
>>> -------------------------------------------------------
>>> This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
>>> Tool for open source databases. Create drag-&-drop reports. Save time
>>> by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
>>> Download a FREE copy at http://www.intelliview.com/go/osdn_nl
>>> _______________________________________________
>>> Wicket-develop mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/wicket-develop
>>>
>>>
>>
>>
>> -------------------------------------------------------
>> This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
>> Tool for open source databases. Create drag-&-drop reports. Save time
>> by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
>> Download a FREE copy at http://www.intelliview.com/go/osdn_nl
>> _______________________________________________
>> Wicket-develop mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/wicket-develop
>>
>
>
>-------------------------------------------------------
>This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
>Tool for open source databases. Create drag-&-drop reports. Save time
>by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
>Download a FREE copy at http://www.intelliview.com/go/osdn_nl
>_______________________________________________
>Wicket-develop mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/wicket-develop
>




-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop

Reply via email to