From: Joachim S. <Joa...@be...> - 2006-01-31 16:22:33
|
Hi Timo, the xml notation of gui4j does not support directly cast. Either you wo= rk directly with typed objects in Java, or you introduce a converter metho= d in your controller. For instance: public Name object2name(Object o) { return (Name)o; } Then, of course you can use this method in xml. Hope this helps you, Joachim ----------------------------------------------------- Dr. Joachim Schmid Beck et al. projects GmbH Theresienh=F6he 13, D-80339 M=FCnchen Phone: +49 / 89 / 54 42 53 - 29 Mobile: +49 /163 / 54 42 529 = "Timo Meinen" = <me...@gm...> = Sent by: = To gui4j-user-admin@ gui...@li...= lists.sourceforge = cc .net = Subj= ect [Gui4j-user] Casting objects in = 31.01.2006 17:17 edit-fields = = = = = = = Hi, last weeks I converted my hole app to Gui4j and I am really satisfied w= ith this decision. So, thanks to all developers. I have a small problem: Is it possible to cast Objects? In ComboBoxes i= t is simple by adding the contentType-tag. My problem is to cast objects in edit-components. Here the contentType-tag is missing. My Example: getEditEntity() returns Object (because of generalization problems I ca= n't define a specialized class as return type), but to have access to the methods getName it needs to be casted to e.g. Customer. <edit value=3D"{eEventEditRefresh}getEditEntity.getName" setValue=3D"getEditEntity.setName(?value)"/> Thank you very much Timo -- Gl=FCck Auf Timo (MAIL) me...@gm... (ICQ) 10201138 (AIM) TimoLiebtEffi (JAB) tim...@ja... DSL-Aktion wegen gro=DFer Nachfrage bis 28.2.2006 verl=E4ngert: GMX DSL-Flatrate 1 Jahr kostenlos* http://www.gmx.net/de/go/dsl ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!= http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D103432&bid=3D230486&dat= =3D121642 _______________________________________________ Gui4j-user mailing list Gui...@li... https://lists.sourceforge.net/lists/listinfo/gui4j-user = |