-
Notifications
You must be signed in to change notification settings - Fork 163
Helper
The Components.assertTag
helper method verifies that the given component tag matches the given tag name, if not a MarkupException will be thrown.
@Override
protected void onComponentTag(ComponentTag currentComponentTag) {
super.onComponentTag(tag);
Components.assertTag(this, currentComponentTag, "h1")
}
or you can use the overloaded methods of assertTag:
Components.assertTag(component, currentComponentTag, "h1", "h2")
Components.assertTag(component, currentComponentTag, Sets.newHashSet("h1","h2"))
Copyright 2012 AgileCoders.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this work except in compliance with the License. You may obtain a copy of the License in the LICENSE file, or at:
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.