wood burning stoves
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
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Wicket In Action - checkComponentTag visibility" Watch "Wicket In Action - checkComponentTag visibility" New topic

Wicket In Action - checkComponentTag visibility

Eyal Golan

Joined: May 20, 2008
Posts: 21
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:
protected void onComponentTag(ComponentTag tag) {
checkComponentTag(tag, "button");
And in the behavior:
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?

Eelco Hillenius
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
It's not a secret anymore!