primefaces - How to make an editable cell clickable in order to open a pop-up -


i have editable table:

<p:datatable id="mytable" ... editable="true"></p:datatable> 

there 1 line in table , want cell of line clickable in order open pop-up. tried solution given there

<p:column id="mycolumn" headertext="name" styleclass="align-center">    <p:celleditor>        <f:facet name="output">           <h:panelgrid update="@widgetvar(infosnameformdialog)" onclick="pf('infosnameformdialog').show();">              <h:outputtext value="#{element.name}" />           </h:panelgrid>         </f:facet>         <f:facet name="input">            <p:inputtext value="#{element.name}" />         </f:facet>     </p:celleditor> </p:column> 

this solution has problem: because of h:panelgrid have rectangle frames data of cell, not acceptable.

so tried p:link other solution

<p:column id="mycolumn" headertext="name" styleclass="align-center">    <p:celleditor>        <f:facet name="output">           <p:link update="@widgetvar(infosnameformdialog)" onclick="event.preventdefault(); pf('infosnameformdialog').show(); event.stopimmediatepropagation();">              <h:outputtext value="#{element.name}" />           </p:link>         </f:facet>         <f:facet name="input">            <p:inputtext value="#{element.name}" />         </f:facet>     </p:celleditor> </p:column> 

now can edit cell value want , link allows open pop-up. when there no data in cell, there can't link... , don't have ideas solve problem

i use primefaces 5.1


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -