Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/360.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/jsf/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/react-native/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java Primefaces:dataTable内的inputMask_Java_Jsf_Primefaces - Fatal编程技术网

Java Primefaces:dataTable内的inputMask

Java Primefaces:dataTable内的inputMask,java,jsf,primefaces,Java,Jsf,Primefaces,如果p:inputMask位于p:dataTable中的一行中,我在其中发现了一个奇怪的行为。 它不适用于面具!我在论坛上发布了一个问题,但没有得到答案。我想知道是否有人遇到过这个问题,是否有解决办法 一些代码: 不起作用: <p:column header="Order"> <p:inputMask id="printOrder"

如果p:inputMask位于p:dataTable中的一行中,我在其中发现了一个奇怪的行为。 它不适用于面具!我在论坛上发布了一个问题,但没有得到答案。我想知道是否有人遇到过这个问题,是否有解决办法

一些代码: 不起作用:

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

但同样的代码在dataTable之外也能完美地工作。
Primefaces 2.0.2。

正如Matt Handy所指出的,您使用的Primefaces的旧版本在组件数据表集成方面存在许多已知问题

您可以尝试使用2.1、2.2或2.2.1版本更新Primefaces版本,以查看此问题是否已得到解决

我找不到这是一个已知的问题,但这并不意味着它没有被另一个dataTable修复程序修复。为便于将来参考,您可以在此处参考已知问题


我有一个datatable,它定义了如下列:

<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>

而且效果很好。
干杯

这里和Primefaces论坛上都有一些提示,说明在
p:dataTable
中,某些组件无法按预期工作(通常怀疑的是
p:commandLink
p:commandButton
)。根据我的经验,有时使用
h:dataTable
会有所帮助(如果这是一个选项,因为您没有primefaces数据表的这些优秀功能)。如果只针对皮肤,很容易让
h:dataTable
看起来像
p:dataTable