Vladimir Ivanov
Vladimir Ivanov

Reputation: 43098

Primefaces: inputMask inside dataTable

I have found a strange behavior in p:inputMask if it is located inside a row in p:dataTable. It doesn't apply the mask! I have posted a question on the forum, but obtained no answer. I wonder if anybody has met this problem and if there is any workaround for it?

Some code: Doesn't work:

            <p:column header="Order">
                <p:inputMask
                        id="printOrder"
                        required="false"
                        value="#{item.printOrder}"
                        mask="9" />
            </p:column>

But the same code perfectly works outside dataTable. Primefaces 2.0.2.

Upvotes: 2

Views: 3276

Answers (2)

martin
martin

Reputation: 64

I have a datatable defined with columns like this:

<p:column headerText="Mobile Nr." style="width:125px;text-align:center">  
      <p:cellEditor>  
         <f:facet name="output">  
           <h:outputText value="#{user.nrMobile}" />  
         </f:facet>  
         <f:facet name="input">  
            <p:inputMask mask="999999999" value="#{user.nrMobile}" style="width:100%" />  
         </f:facet>  
      </p:cellEditor>  
</p:column>

And works fine. Cheers!

Upvotes: 1

maple_shaft
maple_shaft

Reputation: 10463

You are using an older version of Primefaces that has a number of known issues with component dataTable integration as Matt Handy pointed out.

You can try updating your Primefaces release with either 2.1, 2.2 or 2.2.1 release to see if this issue has been resolved.

http://www.primefaces.org/downloads.html

I couldn't find this as a known issue but this doesn't mean it wasn't fixed with another dataTable fix. For future reference you can refer to known Primefaces issues here.

http://code.google.com/p/primefaces/issues/list

Upvotes: 2

Related Questions