This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Other Application Frameworks and the fly likes Wicket In Action - checkComponentTag visibility Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Wicket In Action - checkComponentTag visibility" Watch "Wicket In Action - checkComponentTag visibility" New topic
Author

Wicket In Action - checkComponentTag visibility

Eyal Golan
Greenhorn

Joined: May 20, 2008
Posts: 21
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
Eelco Hillenius
author
Ranch Hand

Joined: Apr 23, 2008
Posts: 37
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Wicket In Action - checkComponentTag visibility