0

Storing a product name value in DB,For example Product Name:AFTOVAXPUR DOE Injektionsvätska, emulsion För Får, Nöt ,Svin

The above product-name contains double space,I am searching for same product-name and displaying the search results in a JSF data-table , product-name value along with some other columns.

Issue: When rendering the product-name in data-table,JSF data-table is not displaying the exact product-name.

Actual Result:AFTOVAXPUR DOE Injektionsvätska, emulsion För Får, Nöt ,Svin

Note:- Product-Name is displaying by removing/trimming any consecutive space into one space.

Expected Result:AFTOVAXPUR DOE Injektionsvätska, emulsion För Får, Nöt ,Svin

Note:-It should display as it is stored in DB.

Question:Is that default behavior of JSF data-table to trim space if the value contains any consecutive sapce?

Here is DataTable Code to display Product Name:

<a:dataTable id="productDatatable" var="product" cellpadding="0" value="#{LookupMBean.productBySubstanceList}" style="width:100%;float:left"
                            frame="box" rules="none" border="0"  columnClasses="wid0pc,wid0pc,,,,,,,,,,,,,,,,,,,,"
                            rendered="#{!empty LookupMBean.productBySubstanceList}">
<a:column>
    <f:facet name="header">
        <a:sortCommandLink beanName="LookupMBean" property="PRODUCT_NAME" value="#{bundle.admin_productName_label_product}" />
    </f:facet>
    <a:outputText id="pid" value="#{product.productName}" styleClass="wrapText"/>
</a:column>      
<a:dataTable>
Mihir
  • 572
  • 1
  • 6
  • 24
  • 1
    *"JSF data-table trims space if the value contains any consecutive space"* How exactly did you come to this conclusion? Have you looked in the JSF-generated HTML output? (open page in browser, right click, "view source") – BalusC Sep 10 '15 at 09:07
  • @BalusC Exactly i don't know _how it is getting trimmed_ .I am using jsf data-table that's why i thought it may be _jsf data-table_ related.please correct me if i am wrong.How value is getting trimmed if it contains any consecutive space? – Mihir Sep 10 '15 at 09:13
  • 1
    I repeat: Have you looked in the JSF-generated HTML output? Is it trimmed there? Yes or No? The answer depends on that. – BalusC Sep 10 '15 at 09:15
  • 1
    I repeat (on behalf of): Have you looked in the JSF-generated HTML output? Is it trimmed there? Yes or No? The answer depends on that. – Kukeltje Nov 25 '16 at 12:16

0 Answers0