[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Language-change in combobox  XML
Forum Index -> Development
Author Message
fschlott

Power User

Joined: 13/03/2009 19:09:22
Messages: 38
Offline

Hello,

i have following problem:
In our framework we have a surrounding page where the user can change the language.
So the class referenced by surround.jsp has the methods onDE(ActionEvent ae) and onEN(ActionEvent ae).

Inside we have a test.jsp which contains a combobox and references test.java

The combobox exists of a String-Array. Each String is put in the combobox with addValidValue(string, RessourceManager.getRuntimeInstance().readProperty(literals ...))

So if user changes the language in the application all Names defined in the jsps changes to the other language.
In the combobox the text doesnt change. So i think i have to do it with beanprocessing. So if the method onDE, or method onEN from surround-class is excecuted it should excecut the method fillComboBox.
Is it possible to set the invoker on another class, or is there another way to do this?

Hope its understandable. Otherwise just ask me
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5521
Offline

Hello,

no, you need to refresh the combo boxes currently. Of course this is not trivial... - but it is very difficult to find some generic mechanism here. Basically the same applies if you e.g dynamically name labels (not be resource but by your program).

I would do it in the following way:

Code:
 ValidValuesBinding m_departmentVVS;
 public ValidValuesBinding getDepartmentVVS()
 {
     if (XYZ.checkIfUpdateRequired(m_departmentVVS))
         m_departmentVVS = createValidValuesForDepartment();
     return m_deparmentVVS();
 }
 


The the XYZ is the central instance that is visited with every call. It returns "true" if the valid values binding that is passed is null, or if the language changed, or if the user changed (other rights...).

Björn

Björn Müller, CaptainCasa GmbH
 
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team