eazyui小窗口展示

来源:互联网 发布:炒股神经病 知乎 编辑:程序博客网 时间:2024/05/21 19:27

继承org.apache.struts2.views.jsp.ui

package com.haier.rrs.platform.taglib.ui;


import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;


import org.apache.struts2.components.Component;
import org.apache.struts2.views.jsp.ui.AbstractUITag;


import com.haier.rrs.platform.taglib.components.Lookup;
import com.opensymphony.xwork2.util.ValueStack;


public class LookupTag extends AbstractUITag {


    private static final long serialVersionUID = -350752809266337636L;
    protected String allowInput;
    protected String dialogTitle;
    protected String displayProperty;
    protected String displayName;
    protected String displayValue;
    protected String width;
    protected String height;
    protected String indexed;
    protected String iterateId;
    protected String lookupUrl;
    protected String lookupWidth;
    protected String onReturnFunc;


    public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
        return new Lookup(stack, req, res);
    }


    protected void populateParams() {
        super.populateParams();
        
        ((Lookup) component).setAllowInput(allowInput);
        ((Lookup) component).setDialogTitle(dialogTitle);
        ((Lookup) component).setDisplayProperty(displayProperty);
        ((Lookup) component).setDisplayName(displayName);
        ((Lookup) component).setDisplayValue(displayValue);
        ((Lookup) component).setHeight(height);
        ((Lookup) component).setIndexed(indexed);
        ((Lookup) component).setIterateId(iterateId);
        ((Lookup) component).setLookupUrl(lookupUrl);
        ((Lookup) component).setLookupWidth(lookupWidth);
        ((Lookup) component).setOnReturnFunc(onReturnFunc);
        ((Lookup) component).setWidth(width);
    }


public void setAllowInput(String allowInput) {
this.allowInput = allowInput;
}


public void setDialogTitle(String dialogTitle) {
this.dialogTitle = dialogTitle;
}


public void setDisabled(String disabled) {
this.disabled = disabled;
}


public void setDisplayProperty(String displayProperty) {
this.displayProperty = displayProperty;
}


public void setDisplayName(String displayName) {
this.displayName = displayName;
}


public void setDisplayValue(String displayValue) {
this.displayValue = displayValue;
}


public void setHeight(String height) {
this.height = height;
}


public void setIndexed(String indexed) {
this.indexed = indexed;
}


public void setIterateId(String iterateId) {
this.iterateId = iterateId;
}


public void setLookupUrl(String lookupUrl) {
this.lookupUrl = lookupUrl;
}


public void setLookupWidth(String lookupWidth) {
this.lookupWidth = lookupWidth;
}


public String getOnReturnFunc() {
return onReturnFunc;
}


public void setOnReturnFunc(String onReturnFunc) {
this.onReturnFunc = onReturnFunc;
}


public String getWidth() {
return width;
}


public void setWidth(String width) {
this.width = width;
}
    
    
}

tld标签

<?xml version="1.0" encoding="UTF-8" ?>
<taglib xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
    version="2.0">
  <description>rrs library</description>
  <display-name>rrs</display-name>
  <tlib-version>1.0</tlib-version>
  <short-name>rrs</short-name>
  <uri>/rrs-tags</uri>  

<tag>
    <description><![CDATA[Render HTML lookup tag.]]></description>
    <name>lookup</name>
    <tag-class>com.haier.rrs.platform.taglib.ui.LookupTag</tag-class>
    <body-content>JSP</body-content>
    <attribute>
      <description><![CDATA[HTML id attribute]]></description>
      <name>id</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
      <description><![CDATA[Set allowInput element]]></description>
      <name>allowInput</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
      <description><![CDATA[Set dialogTitle element]]></description>
      <name>dialogTitle</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
      <description><![CDATA[Set disabled  element]]></description>
      <name>disabled</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
      <description><![CDATA[Set displayProperty element]]></description>
      <name>displayProperty </name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
      <description><![CDATA[Set displayName element]]></description>
      <name>displayName</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
      <description><![CDATA[Set displayValue element]]></description>
      <name>displayValue</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
      <description><![CDATA[Set width element]]></description>
      <name>width</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
      <description><![CDATA[Set height element]]></description>
      <name>height</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
      <description><![CDATA[Set indexed  element]]></description>
      <name>indexed</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
      <description><![CDATA[Set iterateId  element]]></description>
      <name>iterateId</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
      <description><![CDATA[Set onReturnFunc  element]]></description>
      <name>onReturnFunc</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
    </attribute>
   <attribute>
      <description><![CDATA[Set left   element]]></description>
      <name>left</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
      <description><![CDATA[Set lookupUrl  element]]></description>
      <name>lookupUrl</name>
      <required>false</required>
      <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
      <description><![CDATA[Set lookupWidth  element]]></description>
      <name>lookupWidth</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
      <description><![CDATA[The css class to use for element]]></description>
      <name>cssClass</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
      <description><![CDATA[The name to set for element]]></description>
      <name>name</name>
      <required>true</required>
      <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
      <description><![CDATA[ Set the html onblur attribute on rendered html element]]></description>
      <name>onblur</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
      <description><![CDATA[Set the html onchange attribute on rendered html element]]></description>
      <name>onchange</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
      <description><![CDATA[Set the html onclick attribute on rendered html element]]></description>
      <name>onclick</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
      <description><![CDATA[Set the html ondblclick attribute on rendered html element]]></description>
      <name>ondblclick</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
      <description><![CDATA[Set the html onfocus attribute on rendered html element]]></description>
      <name>onfocus</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
      <description><![CDATA[Set the html onkeydown attribute on rendered html element]]></description>
      <name>onkeydown</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
      <description><![CDATA[Set the html onkeypress attribute on rendered html element]]></description>
      <name>onkeypress</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
      <description><![CDATA[Set the html onkeyup attribute on rendered html element]]></description>
      <name>onkeyup</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
      <description><![CDATA[Set the html onmousedown attribute on rendered html element]]></description>
      <name>onmousedown</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
      <description><![CDATA[Set the html onmousemove attribute on rendered html element]]></description>
      <name>onmousemove</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
      <description><![CDATA[Set the html onmouseout attribute on rendered html element]]></description>
      <name>onmouseout</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
      <description><![CDATA[Set the html onmouseover attribute on rendered html element]]></description>
      <name>onmouseover</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
      <description><![CDATA[Set the html onmouseup attribute on rendered html element]]></description>
      <name>onmouseup</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
      <description><![CDATA[Set the html onselect attribute on rendered html element]]></description>
      <name>onselect</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
      <description><![CDATA[Whether the lookup is readonly]]></description>
      <name>readonly</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
      <description><![CDATA[If set to true, the rendered element will indicate that input is required]]></description>
      <name>required</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
    </attribute>
    <dynamic-attributes>true</dynamic-attributes>
  </tag> 


jsp包含<%@ taglib prefix="r" uri="/WEB-INF/tlds/rrs.tld" %>

0 0
原创粉丝点击