• 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
  • Tim Cooke
  • Ron McLeod
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
Bartenders:

Check box and Container

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator



Hello

Hello, Im new to Java/Groovy Script. I have a checkbox in a form (tpme_med_supp_products) and if selected I want to hide a tab in a tab container. This code is not working . Any ideas


if(form.getValue('tpme_med_supp_products') == 'true' || form.getValue('tpme_med_supp_products') == 'true' ) {

 form.getTabContainer('onbd').HideTab('certification');
}
else {
form.getTabContainer('onbd').ShowTab('certification');
}


 

 
Sheriff
Posts: 7126
185
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch, enrique man!

My groovy skills are a little rusty, but tell me what type does this function return, a String or a boolean?
If it's a boolean, you should try == true (no quotes).
 
How do they get the deer to cross at the signs? Or to read this tiny ad?
The new gardening playing cards kickstarter is now live!
https://www.kickstarter.com/projects/paulwheaton/garden-cards
reply
    Bookmark Topic Watch Topic
  • New Topic