
org.icefaces.mobi.component.smallview.SmallViewHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of icefaces-mobi Show documentation
Show all versions of icefaces-mobi Show documentation
${icefaces.product.name} MOBI Component Library
/*
* Copyright 2004-2013 ICEsoft Technologies Canada Corp.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the
* License. You may obtain a copy of the License 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.
*/
package org.icefaces.mobi.component.smallview;
import javax.faces.component.UIComponent;
import javax.faces.view.facelets.ComponentConfig;
import javax.faces.view.facelets.ComponentHandler;
import javax.faces.view.facelets.FaceletContext;
import org.icefaces.mobi.util.MobiJSFUtils;
import org.icefaces.util.ClientDescriptor;
public class SmallViewHandler extends ComponentHandler {
public SmallViewHandler(ComponentConfig componentConfig) {
super(componentConfig);
}
@Override
public void onComponentCreated(FaceletContext ctx, UIComponent c, UIComponent parent) {
super.onComponentCreated(ctx, c, parent);
}
@Override
public void applyNextHandler(FaceletContext ctx, UIComponent c)
throws java.io.IOException, javax.faces.FacesException, javax.el.ELException {
ClientDescriptor client = MobiJSFUtils.getClientDescriptor();
if (c instanceof SmallView && client.isHandheldBrowser()) {
this.nextHandler.apply(ctx, c);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy