This page was last modified 09:31, 14 September 2007.
KIJ000744 - LCDUI: CustomItem content remains blank when appended to a Form before setting the Form as current Displayable
From Forum Nokia Wiki
| ID | KIJ000744 | Creation date | September 14, 2007 |
| Platform | S60 3rd Edition, FP1 | Devices | |
| Category | Java | Subcategory | MIDP2.0 |
Overview
A Form containing a CustomItem object is set to be the current Displayable. CustomItem’s content remains blank although it should be visible.
Detailed description
The CustomItem.paint() method is not called when the Form becomes current the Displayable. However, the method will be called when any other paint event will be triggered after the Form gets displayed.
How to reproduce
Form form = new Form("CustomItem");
MyCustomItem myItem = new MyCustomItem();
form.append(myItem);
Display.getDisplay(this).setCurrent(form);
Solution
There is currently no solution. However, the issue can be avoided if Display.getDisplay() is called at least once during the MIDlet’s lifecycle before creating the CustomItem object, e.g. in the beginning of the MIDlet’s constructor.
Form form = new Form("CustomItem");
Display.getDisplay(this).setCurrent(form);
MyCustomItem myItem = new MyCustomItem();
form.append(myItem);
| Related Discussions | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Form Validation | divyas | Mobile Java General | 2 | 2006-05-23 12:06 |
| Form "dividing line" | mex | Mobile Java General | 2 | 2007-03-22 13:44 |
| Save and close form | kerfunkledbongle | Symbian User Interface | 1 | 2006-04-13 19:23 |
| Menu in Form Run-time Error | mubx2000 | Symbian User Interface | 52 | 2007-04-25 12:24 |
| how to display the content of the html file on my form | shiechie | Mobile Java General | 2 | 2006-01-21 11:20 |

