⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 optgroup.java

📁 struts 2 核心包 的源码 有错误是难免的
💻 JAVA
字号:
// Decompiled by Jad v1.5.8e2. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://kpdus.tripod.com/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi space 
// Source File Name:   OptGroup.java

package org.apache.struts2.components;

import com.opensymphony.xwork2.inject.Container;
import com.opensymphony.xwork2.util.ValueStack;
import java.io.Writer;
import java.util.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

// Referenced classes of package org.apache.struts2.components:
//			Component, Select, ListUIBean

public class OptGroup extends Component
{

	public static final String INTERNAL_LIST_UI_BEAN_LIST_PARAMETER_KEY = "optGroupInternalListUiBeanList";
	private static Log _log = LogFactory.getLog(org/apache/struts2/components/OptGroup);
	protected HttpServletRequest req;
	protected HttpServletResponse res;
	protected ListUIBean internalUiBean;

	public OptGroup(ValueStack stack, HttpServletRequest req, HttpServletResponse res)
	{
		super(stack);
		this.req = req;
		this.res = res;
		internalUiBean = new ListUIBean(stack, req, res) {

			final OptGroup this$0;

			protected String getDefaultTemplate()
			{
				return "empty";
			}

			
			{
				this$0 = OptGroup.this;
				super(x0, x1, x2);
			}
		};
	}

	public void setContainer(Container container)
	{
		container.inject(internalUiBean);
	}

	public boolean end(Writer writer, String body)
	{
		Select select = (Select)findAncestor(org/apache/struts2/components/Select);
		if (select == null)
		{
			_log.error("incorrect use of OptGroup component, this component must be used within a Select component", new IllegalStateException("incorrect use of OptGroup component, this component must be used within a Select component"));
			return false;
		}
		internalUiBean.start(writer);
		internalUiBean.end(writer, body);
		List listUiBeans = (List)select.getParameters().get("optGroupInternalListUiBeanList");
		if (listUiBeans == null)
			listUiBeans = new ArrayList();
		listUiBeans.add(internalUiBean);
		select.addParameter("optGroupInternalListUiBeanList", listUiBeans);
		return false;
	}

	public void setLabel(String label)
	{
		internalUiBean.setLabel(label);
	}

	public void setDisabled(String disabled)
	{
		internalUiBean.setDisabled(disabled);
	}

	public void setList(String list)
	{
		internalUiBean.setList(list);
	}

	public void setListKey(String listKey)
	{
		internalUiBean.setListKey(listKey);
	}

	public void setListValue(String listValue)
	{
		internalUiBean.setListValue(listValue);
	}

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -