• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Check box and Container

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • 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: 7108
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
  • 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).
 
This is my favorite show. And this is my favorite tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic