can't you just use \n in the properties file? 
(http://www.exampledepot.com/egs/java.util/Props.html)

once you have a new line in there, you may want to create a subclass of
feedbackpanel and override newMessageDisplayComponent:

        protected Component newMessageDisplayComponent(String id, 
FeedbackMessage
message)
        {
                Label label = new Label(id, message.getMessage().toString());
                
label.setEscapeModelStrings(FeedbackPanel.this.getEscapeModelStrings());
                return label;
        }

so it returns a MultiLineLabel.  also, btw, if you call
setEscapeModelStrings(false) in your
feedback panel subclass (i have a subclass of Label called HtmlLabel which
does exactly 
this for each constructor of Label), you can get html in your feedback as
well (although 
you need to be careful not to put any un-escaped user values into the
feedback by way 
of variable substitutions or you might wind up with strange formatting or
even security 
problems).


Dean Del Ponte wrote:
> 
> Hello everyone,
> 
> I'm new to Wicket and really enjoy it so far.  My question is:  How can
> I add a line break to a value in properties file?
> 
> For example, I'm displaying error messages on my page, and the text is
> retrieved from the associated properties file.  One of the values in the
> properties file is rather long, and I would simply like to display it on
> the page in two lines instead of one.  Any easy way to do this?
> 
> Thanks,
> 
> Dean
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-display-line-break-in-properties-file-tf4075186.html#a11582324
Sent from the Wicket - User mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to