Community
Participate
Working Groups
Build Identifier: M20110210-1200 I have a form as outline and on this form are two fields, a html field and a string field. The form is open in the outline and i change the main tab (menu on the desktop) i switch to another outline. If i switch back to the previous outline the form is shown again, but the html field is disappeard. Reproducible: Always Steps to Reproduce: See attached pictures: 1. Click on tab "Test other" 2. Click on tab "Test HTML" To reproduce the problem, include the classes in TestOutline.zip to the scout project and embed the class TestOutline.java into the Desktop.java. Note: The ModifyHandler in the class TestOutlineForm has a timeout of 50ms, otherwise the bug would not be reproducible.
Created attachment 207364 [details] Picture before bug
Created attachment 207365 [details] Picture with bug
Created attachment 207366 [details] Test classes for the described bug
Created attachment 208734 [details] Patch The bug is only reproducible when using "getConfiguredGridUseUiWidth(){ return true; }". Because the preferred height of the JTextPane is only calculated the when rendering for the first time, it will keep the value 0 and never show up again. The proposed patch includes a refresh of the preferred height every time the field's content changes. Thus the layout can dynamically change when setting a new content for the HTML field.
Comment on attachment 208734 [details] Patch reviewed and applied
23.12.2011 dwi [contributed by Remo Arpagaus, BSI Business Systems Integration AG] Bugzilla: 364473 Problem: Content of HTML field does not show up anymore after UI relayout happens E.g. if having a detail form (that contains a HTML field) on a table page and the user clicks on another view tab and back again, the HTML content does not show up anymore. Solution: Because the preferred height of the JTextPane is only calculated when rendering for the first time, it will keep the value 0 and never show up again. The proposed patch includes a refresh of the preferred height every time the field's content changes. Thus the layout can dynamically change when setting a new content for the HTML field. Migration: None
Created attachment 208776 [details] mylyn/context/zip
Comment on attachment 208734 [details] Patch Thank you for the great patch
Test OK
Created attachment 209387 [details] Proposed patch This new patch uses a different approach. The original patch led to a new issue: HTML content without an explicit line break failed to be automatically wrapped because the preferred width could be potentially too long.
Comment on attachment 209387 [details] Proposed patch Patch reviewed and applied
ticket closed. deliverd as part of eclipse scout 3.8.0 (juno release train)