|Re: multi-page form editor lazy construct [message #551345 is a reply to message #551311]
||Fri, 06 August 2010 05:02
| Prakash G.R.
Registered: July 2009
On 06/08/10 2:56 AM, vlad crc wrote:|
> I develop a RAP appl (I know this is a RCP forum, but I think this is
> the appropriate place to post this issue) and I created a multi-page
> form editor. In each page I have some Text, tables and other controls.
> On "doSave" I go through all the controls in all pages to get their
> values for further processing.
Ideally approach would have been to have a model and update the model
elements when there are changes in the associated UI elements. Finally
when you save, you should be persisting the model.
> Now here comes the issue: if a user only opens let's say the 1st and the
> 2nd page to modify something, and he doesn't open the 3rd and the other
> pages (which is a common use case), then, when I try to get the values
> of the controls in the 3rd page I get a null pointer exception, because
> the pages are constructed lazily and the controls on 3rd page does not
A workaround is to show all the tabs before save (this has the side
effect of creating all the controls)
Platform UI Team, IBM
Powered by FUDForum
. Page generated in 0.14003 seconds