org.apache.struts2.components.Component Java Examples

The following examples show how to use org.apache.struts2.components.Component. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ParamMap.java    From entando-core with GNU Lesser General Public License v3.0 6 votes vote down vote up
@Override
public boolean end(Writer writer, String body) {
	Log log = LogFactory.getLog(ParamMap.class);
	Component component = this.findAncestor(Component.class);
	if (null == this.getMap()) {
		log.info("Attribute map is mandatory.");
		return super.end(writer, body);
	}
	Object object = this.findValue(this.getMap());
	if (null == object) {
		log.debug("Map not found in ValueStack");
		return super.end(writer, body);
	}
	if (!(object instanceof Map)) {
		log.warn("Error in JSP. Attribute map must evaluate to java.util.Map. Found type: " + object.getClass().getName());
		return super.end(writer, body);
	}
	component.addAllParameters((Map) object);
	return super.end(writer, body);
}
 
Example #2
Source File: TracerFactoryTag.java    From entando-core with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
public Component getBean(ValueStack valueStack, HttpServletRequest req,	HttpServletResponse res) {
	String langCode = this.getActualValue(this.getLang());
	ILangManager langManager = (ILangManager) ApsWebApplicationUtils.getBean(SystemConstants.LANGUAGE_MANAGER, req);
	Lang lang = langManager.getLang(langCode);
	TracerFactory tracerFactory = new TracerFactory(valueStack, lang);
	valueStack.getContext().put(this.getVar(), tracerFactory.getAttributeTracer());
	return tracerFactory;
}
 
Example #3
Source File: AnchorTag.java    From JavaEE-SSH-Template with MIT License 4 votes vote down vote up
public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
	return new Anchor(stack, req, res);
}
 
Example #4
Source File: AnchorTag.java    From SmartEducation with Apache License 2.0 4 votes vote down vote up
public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
	return new Anchor(stack, req, res);
}
 
Example #5
Source File: PropertyTag.java    From entando-core with GNU Lesser General Public License v3.0 4 votes vote down vote up
public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
	return new Property(stack);
}
 
Example #6
Source File: HiddenTag.java    From entando-core with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Override
  public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
return new com.agiletec.apsadmin.tags.util.Hidden(stack, req, res);
  }
 
Example #7
Source File: SubmitTag.java    From entando-core with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Override
  public Component getBean(ValueStack stack, HttpServletRequest request, HttpServletResponse response) {
return new Submit(stack, request, response);
  }
 
Example #8
Source File: RadioTag.java    From entando-core with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Override
  public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
return new RadioMap(stack, req, res, this.getChecked(), this.getCheckedVar());
  }
 
Example #9
Source File: ApsActionParamTag.java    From entando-core with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Override
public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse resp) {
	return new ApsActionParamComponent(stack, req);
}
 
Example #10
Source File: ParamMapTag.java    From entando-core with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Override
public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
	return new ParamMap(stack);
}
 
Example #11
Source File: ApsActionParamSubTag.java    From entando-core with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Override
public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse resp) {
	ApsActionParamTag parent = (ApsActionParamTag) findAncestorWithClass(this, ApsActionParamTag.class);
	return parent.getComponent();
}