Bookmark Topic Watch Topic
  • New Topic

how to display error message in h:messages tags with extra spce in middle of the text  RSS feed

 
rajeshkumargaru kumar
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi

as per the requirement, i need to display error message from properties file to h:messages tag.

ex: when user does not select any option then i need to display the below error message

"data required. please select values."

in .properties file
-----------
key= data required. please select values.(i need to display extra space also "required. please")

in.jsp
-----
i am using encoding is: iso-8859-1(while displaying error message the extra space not getting displayed)
i need to display the extra space also

h:messages showDetail="true" layout="table" showSummary="false"
style="font-weight: bold; color: brown;" />
<m:div style="width:98%;align:center">
<m:section>
<m:pod title="#{msg['label.a.b']}"
styleClass="otherbg">

<m:table width="100%">
<m:tr>
<m:td>
<m:table>
<m:tr>
<m:td>

<h:outputLabel value="#{msg['label.a.dcn']}" id="dcnTxt"
for="inputDCN" />
<m:br></m:br>
<h:inputText id="inputDCN" size="10" maxlength="17" styleClass="inputText"
value="#{BeanVO.dcnTcn}"></h:inputText>
</m:td>


Please help me to display extra space also.
is there any way to divide the message in 2 parts and display in browser with extra space in between them. please guide me to solve this issue

Thanks in advance
 
Paul Clapham
Sheriff
Posts: 22509
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Report post to moderator
I don't understand what "extra space" means. You do know that HTML will combine adjacent whitespace into a single space character, right? If you don't want that to happen then the way (in HTML) to avoid it is by using the &nbsp; non-breaking space character.

Sorry, if that's the answer to your question then I don't know how to make JSF do that.
 
Tim Holloway
Bartender
Posts: 18715
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Report post to moderator
This thread appears to be a duplicate. If you ask the same question in multiple places everyone gets confused. And you will not get answers any faster.

I'm locking this thread. Please use the other thread (http://www.coderanch.com/t/626025/JSF/java/messages-jsp-extra-spce-dispalying) instead.
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!