Package org.richfaces.sandbox.component.behavior

Examples of org.richfaces.sandbox.component.behavior.ToggleControl


@ResourceDependencies({ @ResourceDependency(name = "jquery.js"), @ResourceDependency(name = "richfaces.js") })
@JsfBehaviorRenderer(type = "org.richfaces.component.behavior.ToggleControl")
public class ToggleControlRenderer extends ClientBehaviorRenderer {
    @Override
    public String getScript(ClientBehaviorContext behaviorContext, ClientBehavior behavior) {
        ToggleControl control = (ToggleControl) behavior;

        StringBuilder builder = new StringBuilder();
        builder.append("RichFaces.$('").append(control.getPanelId(behaviorContext)).append("').switchToItem('")
            .append(control.getTargetItem()).append("'); return ").append(!control.getDisableDefault()).append(';');

        return builder.toString();
    }
View Full Code Here

TOP

Related Classes of org.richfaces.sandbox.component.behavior.ToggleControl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.