package com.jaxfront.html.action;
import javax.servlet.http.HttpServletRequest;
import com.jaxfront.core.type.Type;
import com.jaxfront.html.plugins.AbstractPopUpAction;
/*--
Copyright (C) 2001-2003 by xcentric technology & consulting GmbH. All rights reserved.
This software is the confidential and proprietary information of xcentric technology &
consulting GmbH ("Confidential Information"). You shall not disclose such Confidential
Information and shall use it only in accordance with the terms of the license agreement
you entered into with xcentric.
www.jaxfront.com
*/
/**
* Shows how to implement your own PopUpAction.
*
* To write the value back to the dialog opener text box, use the javascript
* function 'onchange="setOpenerResult(text)"'.
*
*/
public class DefaultPopUpAction extends AbstractPopUpAction {
public StringBuffer getHTMLContent(Type holder, String typeAheadValue, HttpServletRequest request) {
String xpath = holder.getXPathLocation();
StringBuffer sb = new StringBuffer();
sb.append("<h1>Default PopUpAction </h1>");
sb.append("<p>");
sb.append("See class 'com.jaxfront.html.action.DefaultPopUpAction'");
sb.append("<form>");
sb.append("<p>");
sb.append("<select name=\"" + xpath + "\" id=\"" + xpath + "\" size=\"10\" onchange=\"setOpenerResult('" + xpath + "',this.options[this.options.selectedIndex].text);\">");
sb.append("<option>Heino</option>");
sb.append("<option>Michael Jackson</option>");
sb.append("<option>Tom Waits</option>");
sb.append("<option>Nina Hagen</option>");
sb.append("<option>Marianne Rosenberg</option>");
sb.append("</select>");
sb.append("</p>");
return sb;
}
}
|