帮忙看下这种程序,如何能实现下拉菜单的方式!

04-11-05 yekong
package org.jbpm.workflow.delegation.impl.htmlformatter;

import java.text.ParseException;
import javax.servlet.http.HttpServletRequest;
import org.jbpm.workflow.delegation.*;

/**
* @author Tom Baeyens
*/
public class TextInput extends AbstractConfigurable implements HtmlFormatter {

public String objectToHtml( Object value, String parameterName, HttpServletRequest request) {
String html = null;

String size = "10";

if ( getConfiguration().containsKey("size") ) {
size = (String) getConfiguration().get("size");
}

String text = "";
if ( value != null ) text = (String) value;

html = "<input type=text size=" + size + " name=\"" + parameterName + "\" value=\"" + text + "\">";

return html;
}

public Object parseHttpParameter( String text, HttpServletRequest request ) throws ParseException {
return text;
}
}

猜你喜欢