Hi list ! I am trying to make a reusable component to have buttons translated. The idea is to just provide a key to the button that will take care to find the translation in the .strings This looks like Chuck's "LocaleString" but for buttons. Here is what I did : TranslatedButton HTML : <webobject name="link"><webobject name="button"></webobject></webobject> TranslatedButton .wod : button : WOGenericElement { elementName = "input"; type = "button"; value = translatedKey; } link : WOHyperlink { action = action; } And I call it using bindings like : loginButton : TranslatedButton { action = logIn; key = "a_key"; } And here is my problem : How can I manage to have - the key bound in TranslatedButton (to be able to translate the key with a ApplicationUtilities.translate(key, session().languages()) ) - have the logIn method called in the parent component I know I could use performParentAction() but it takes a String and it would not allow me to use code completion in WOLips. Is there something I can do? Thanks ! Fabrice www.easyshadow.com International Corporate Consulting Palais de la Scala 1 avenue Henri Dunant Suite 1155 MC - 98000 Monaco Skype: fabrice.pipart Tel. +377 97 98 21 04 (direct) Fax. +377 97 70 88 07 |
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to archive@mail-archive.com