Problem with commandButton

Post Reply
eu.sergiogoncalves
Posts: 9
Joined: 12 Mar 2015, 15:30

03 Aug 2016, 23:03

When I click on commandbutton it's not work, do nothing :cry:

<h:form>
<div class="Card ui-fluid ShadowEffect">
<span class="DispBlock OvHidden FontLatoBold Fs16 Leaden">Novo no Alcançando? </span>
<div class="EmptyBox10"></div>
<div class="Container100">
<p:inputText placeholder="Nome Sobrenome" style="padding:15px !important;" value="#{inserirUsuarioBean.nomeUsuario}"/>
</div>
<div class="Container100">
<p:inputText placeholder="E-mail" style="padding:15px !important;" value="#{inserirUsuarioBean.login}"/>
</div>
<div class="Container100">
<p:password placeholder="Senha" style="padding:15px !important;" value="#{inserirUsuarioBean.senha}"/>
</div>

<div class="EmptyBox20"></div>
<div class="Container100">
<p:commandButton type="button" value="Cadastrar" ajax="false" styleClass="OrangeButton" action="#{inserirUsuarioBean.salvar()}"/>
</div>

<div class="EmptyBox10"></div>
<div class="Separator"></div>
<div class="EmptyBox10"></div>


</div>
</h:form>

User avatar
aragorn
Posts: 2659
Joined: 29 Jun 2013, 12:38

09 Aug 2016, 10:32

Please try it without Olympos Layout and Theme. I think it is not a Layout or Theme. Please use core forum; http://forum.primefaces.org/viewforum.php?f=3

User avatar
aragorn
Posts: 2659
Joined: 29 Jun 2013, 12:38

09 Aug 2016, 10:38

Also, I couldn't replicate this issue.

Code: Select all

...
<p:commandButton value="Cadastrar" styleClass="OrangeButton" action="#{testView.salvar}"/>
...

..
public String salvar() {
      return "data.xhtml?faces-redirect=true";
}

eu.sergiogoncalves
Posts: 9
Joined: 12 Mar 2015, 15:30

25 Aug 2016, 21:22

I tried without theme.. and the problem was that the commandbutton does't need the type atribute,
p:commandButton type="button" value="Cadastrar" ajax="false" styleClass="OrangeButton" action="#{inserirUsuarioBean.salvar()}"/>

I just take type="button" of .

User avatar
aragorn
Posts: 2659
Joined: 29 Jun 2013, 12:38

25 Nov 2016, 15:58

Thanks for the update!

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest