Skip to content

Instantly share code, notes, and snippets.

@squarepegsys
Created August 6, 2014 19:57
Show Gist options
  • Select an option

  • Save squarepegsys/da3e69746ce8d98112e1 to your computer and use it in GitHub Desktop.

Select an option

Save squarepegsys/da3e69746ce8d98112e1 to your computer and use it in GitHub Desktop.
Groovy blank fields
/* Check if all fields are blank */
StringBuilder rInfoRows = new StringBuilder()
rInfoRows.append(params.get("field1")?.toString()?.trim())
rInfoRows.append(params.get("field2")?.toString()?.trim())
rInfoRows.append(params.get("field3")?.toString()?.trim())
Boolean isRInfoPresent = Boolean.FALSE
if(!"".equals(rInfoRows.toString())){
isRInfoPresent = Boolean.TRUE
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment