Friday 15 June 2012

web applications - Display txt file in vaadin layout -


I have a txt file that contains some paragraphs of information (plain text) how I will be displayed in textarea so far Tried

  FileResource file = new FileResource (new file ("/ path / copy / file"); TextArea text = new TextArea (); text.setData (file);   

This did not work

wrong method call

Do not use the method, but instead refer to the method. TextArea in the subject.

For this The string is required, so you must read the text from a file in a string and then use setValue () on TextArea.

Set / getData () methods will give you "private" Allow data to be saved, which is not used by Wadine.

No comments:

Post a Comment