GuideTextBox.java 1.37 KB
/*
 * Decompiled with CFR 0_118.
 * 
 * Could not load the following classes:
 *  com.day.cq.wcm.foundation.forms.FormsHelper
 *  org.apache.sling.api.SlingHttpServletRequest
 *  org.apache.sling.api.resource.Resource
 *  org.apache.sling.api.resource.ValueMap
 */
package com.adobe.aemds.guide.common;

import com.adobe.aemds.guide.common.GuideField;
import com.day.cq.wcm.foundation.forms.FormsHelper;
import java.io.Serializable;
import org.apache.sling.api.SlingHttpServletRequest;
import org.apache.sling.api.resource.Resource;
import org.apache.sling.api.resource.ValueMap;

public class GuideTextBox
extends GuideField
implements Serializable {
    private static final int rows = 1;
    private static final int cols = 35;

    public Boolean getMultiLine() {
        return (Boolean)this.resourceProps.get("multiLine", (Object)false);
    }

    public int getRows() {
        return (Integer)this.resourceProps.get("rows", (Object)1);
    }

    public int getCols() {
        return (Integer)this.resourceProps.get("cols", (Object)35);
    }

    public String[] getValues() {
        String[] values = FormsHelper.getValues((SlingHttpServletRequest)this.slingRequest, (Resource)this.getResource());
        if (values == null) {
            values = new String[]{""};
        }
        return values;
    }

    public String getGuideFieldType() {
        return "guideTextBox";
    }
}