Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Query about disclosureListener attribute in <tr:showDetailItem>(Trinidad Tags)  RSS feed

 
Adithya Leburu Reddy
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible to send a parameter to the disclosureListener method? I wish to send a boolean value as the parameter through a javascript function to prevent the disclosure if the value passed is false.
 
Tim Holloway
Bartender
Posts: 18709
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Adithya Lr",

Welcome to the JavaRanch. We don't have many rules here at the JavaRanch, but we do insist that you use your Real Name and not some sort of "handle" or obvious alias. If you're not sure about this, see
http://www.javaranch.com/name.jsp .
 
Tim Holloway
Bartender
Posts: 18709
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks.

No, you cannot pass a parameter to the listener method. The contract that defines it requires a single parameter, which is the Disclosure event itself.

To obtain the context needed to make the decision, you would either have to query the Component that the event is for or you would have to obtain it externally. For example, as a property of the class that is implementing your DisclosureListener.

Likewise, the DisclosureListener doesn't actually have a way to suppress the event. The javax.faces.event.AbortProcessingException isn't really designed for that - it's like turning off the lights by taking an axe to the power mains.

There should be something that does what you want, but this doesn't look like it.
 
Adithya Leburu Reddy
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Tim
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!