This week's book giveaway is in the Programmer Certification forum.
We're giving away four copies of OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide: Exam 1Z0-815 and have Jeanne Boyarsky & Scott Selikoff on-line!
See this thread for details.
Win a copy of OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide: Exam 1Z0-815 this week in the Programmer Certification forum!
  • 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
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

Wicket In Action - checkComponentTag visibility

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
First' let me tell you that I really enjoy working with Wicket.
It's my first web framework (I was more of a "server guy" before).

My question is about the checkComponentTag method that belonges to a component.
The visibility is protected.
Because of that I can't use it in a behavior that implements onComponentTag.

What I did is on my component:
@Override
protected void onComponentTag(ComponentTag tag) {
checkComponentTag(tag, "button");
super.onComponentTag(tag);
}
And in the behavior:
@Override
public void onComponentTag(Component component, ComponentTag tag) {
// Here it would be nice:
//component.checkComponentTag(tag, "button");

tag.put("id", "btnObj_" + component.getMarkupId());
/// More stuff in here ...
//
}

Why is that? Why not public?
thanks

Eyal
 
author
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Such questions best go to the mailing lists and/ or as feature requests in our JIRA instance (http://issues.apache.org/jira/browse/WICKET)

I think it was made protected because we didn't anticipate at that time it might be called outside of the class.
 
Cob is sand, clay and sometimes straw. This tiny ad is made of cob:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!