I have a LWUIT form1 and form2 ,form1 is displayed with list of titles from Rss File, 1)If the user clicks on any title on fom1,i am able to navigate to form2 ,where i am displaying a text area(Contains Paragraphs of text( Description) from Rss),if suppose the user keep on reading the text and user reached at the end of a line(Cursor remains at the end)(scroll down) on form2. After that user clicks back button on form2,then user able to navigate to form1, 2)Again user clicks on any title on form1,then user should be able to see the text area(he should be able to read the description) from starting but not in the middle or end on form2(Because in Previous case user read all the description till end on form2.
My Problem is: Each time user clicks on any title on form1,i am able to navigate form2,but the cursor should always point to start of my text area(To allow the user start reading the description from statring)But my code is not working
How to reset form values each time it is displayed?
Here my Code:
private void displayCompleteNewsScreen(News detailNews) {
//log.debug("displayCompleteNewsScreen");
form2.removeAll();
form2.repaint();
form2.addCommand(m_backCommand);
form2.addCommandListener(new ActionListener() {
public void actionPerformed(ActionEvent ae) {
form1.show();
}
});
Label pubDate = new Label(detailNews.getPubDate().substring(0, 16));
pubDate.getStyle().setFont(Font.createSystemFont(Font.FACE_SYSTEM, Font.STYLE_BOLD, Font.SIZE_SMALL));
form2.addComponent(pubDate);
textarea.setText(detailNews.getDescription());
form2.addComponent(textarea);
form2.show();
}