dorankseo / wizards-for-vaadin

Automatically exported from code.google.com/p/wizards-for-vaadin
0 stars 0 forks source link

Wizard step captions in i18n liferay portal environment #5

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
Hello, I use Vaadin in a Liferay 6.1 portal environment. I wanted to use the 
Wizard widget in one of my portlets. I'm also using Petter Holmström's 
I18N4Vaadin add-on to make my portlets language aware. With Liferay, users can 
change the display language at any time.

Now it appears that the Wizard is creating the labels in the progress bar 
header from the getCaption method of each step at a very early stage. 
I thought that I could add some i18n handling to each wizard step class but 
those classes are never "attached" and thus the i18n process doesn't work.
I then thought I could delegate the getCaption from the wizard step to my 
wizard step component component which is i18n aware and which works fine. 
Unfortunately, the component is only attached once the wizard navigates to that 
step but then the captions are already displayed.

What is the expected output? What do you see instead?
I would like to have a possibility to update the captions displayed in the 
progress header for the wizard when the language gets changed. This works fine 
once the component has been attached using the I18N4Vaadin add-on.
My wizard is included in a custom component that is i18n aware. If I could tell 
the wizard to refresh the captions list, the problem would be solved.

What version of the product are you using? On what operating system?
I'm using the latest form the vaadin directory, i.e. 0.4.2 beta.
Using Safari, Firefox on Mac OS X 10.7.3

Please provide any additional information below.
Using I18N4Vaadin to implement i18n support in the portlets
Using Liferay 6.1 GA1 portal server

Regards,

Alex

Original issue reported on code.google.com by alex.wei...@technolink.lu on 17 Apr 2012 at 2:12

GoogleCodeExporter commented 8 years ago
Hi again,

I kind of found a workaround ...

1) I added a method "setCaption" to each wizard step
2) In my wizard view component, when I update all labels on screen to use the 
right language, I iterate over all wizard steps. I then call the setCaption 
with the caption text in the right language using the i18n support in the 
component that wraps my wizard
3) at the end, I call the wizard.requestRepaintAll() to refresh the wizard.

The captions are indeed updated when the correct language.

Regards,

Alex

Original comment by alex.wei...@technolink.lu on 17 Apr 2012 at 2:27