0
Talk personal I have the following problem, I have these two buttons that make:
X : Removes the value of a chart + : Adds the value of a chart
I need it to look like this: When I click the X button
it switches to the +button as they have different functions as you can notice.
My view is like this currently:
<p:column width="30">
<p:commandButton id="valorSelect" value="x"
actionListener="#{statusView.selecionarView}" update=":novoform:grafico" >
<f:attribute name="projetoSelecionadoNaView" value="#{projeto}" />
</p:commandButton>
<p:commandButton value="+"
actionListener="#{statusView.addView}" update=":novoform:grafico" >
<f:attribute name="projetoSelecionadoNaView" value="#{projeto}" />
</p:commandButton>
</p:column>
For example: If I add a value there will disappear the other button only of that line ? I think he’s gonna disappear all the buttons from all the lines... ?
– Matheus Cardozo
yes, if you want to do this individually, you will need a little more code, for example, adjust the datable, Selection, Selection mode, rowKey, besides, you will need to use a <p:ajax that will capture the line with rowSelect event. these buttons, will not need to repeat themselves, just play them on the footer or header ja q they change only the q was selected. I believe q is that way.
– Nadinael Silva Teixeira