Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Help with commandLink {very basic}

 
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
No one can make you feel inferior without your consent - Eleanor Roosevelt. tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic