Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Help with commandLink {very basic}

 
Vinicius Carvalho
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello there! We have a team developing a system using JSF here. They're facing some problems with commandLinks and selectBooleanCheckBox (I have a Tapestry background, please Im not here to argue pro or against technology, just explaining that I have no JSF background so ever).

What is happening is we have a master-detail form. The details links show all the possible selections. When the user selects a row, and triggers the event for it, it reloads the page, with the master form populated. Well, this is happening ok, problem is that the checkbox itself gets unchecked when the new pages is submited. What can be done to let the same checkbox checked when the page reloads?

Best Regards
[ May 25, 2006: Message edited by: Vinicius Carvalho ]
 
Vinicius Carvalho
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Little bit of more info:


There's another issue I forgot to mention. When the user clicks on the
commandButton, the method on the managedBean:


the listaUiData (the one bound to the component) does not has it's children boolean values changed (it should be marked as true...)

We're using myfaces-1.1.3 here

Regards
 
g madhava
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<h:commandButton id="ApagarSelecionados"image="resources/imagens/bt-apagar-selecionados.gif" action="#{manterEvento.excluir}" onKlick="excluir('form');" immediate="true"/>

What is the role of [immediate="true"] in this case ?

See whether this helps you.

http://radio.javaranch.com/gthought/2005/01/04/1104874993000.html
 
Vinicius Carvalho
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We have immediate set to true so, the form validation does not occur before the excluirEventos happens. Since it's a master detail, we have textFields that are empty when the user clicks on the remove link, and if the validation happens we get an error.
 
Skool. Stay in. Smartness. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!