This content has been marked as final.
Show 4 replies
-
1. Re: Prevent resource loading in a custom tag
nbelaevski Jan 6, 2009 8:37 AM (in response to factor5)Hello,
This should not happen. Please provide custom tag code. -
2. Re: Prevent resource loading in a custom tag
factor5 Jan 6, 2009 10:24 AM (in response to factor5)This is almost the whole part of the tag:
public class UICalendar extends UIComponentBase { private static final String RESOURCE_PATH_CAL = "resource:///path/calendar.js"; private static final String RESOURCE_PATH_JQUERY = "resource:///org/richfaces/renderkit/html/scripts/jquery/jquery.js"; @Override public void encodeBegin(FacesContext context) throws IOException { if (!(getParent() instanceof UIInput)) { throw new IllegalStateException( "The ecs:calendar tag should be nested inside inputText!"); } if (!Contexts.getEventContext().isSet(CALENDAR_SCRIPT)) { HtmlLoadScript jqueryLoader = new HtmlLoadScript(); jqueryLoader.setSrc(RESOURCE_PATH_JQUERY); getChildren().add(jqueryLoader); HtmlLoadScript script = new HtmlLoadScript(); script.setSrc(RESOURCE_PATH_CAL); getChildren().add(script); Contexts.getEventContext().set(CALENDAR_SCRIPT, "loaded"); } String query = "showCalendar(this)"; getParent().getAttributes().put(EVENT_TYPE, query); if (getParent().getAttributes().get(STYLE_CLASS) == null) { getParent().getAttributes().put(STYLE_CLASS, INTERACTIVE_FIELD_CLASS); } else { getParent().getAttributes().put( STYLE_CLASS, ((String) getParent().getAttributes().get(STYLE_CLASS)) .concat(" " + INTERACTIVE_FIELD_CLASS)); } } @Override public String getFamily() { return COMPONENT_FAMILY; } }
-
3. Re: Prevent resource loading in a custom tag
amitev Jan 7, 2009 7:17 AM (in response to factor5)Is it needed to extend AjaxRenderer
-
4. Re: Prevent resource loading in a custom tag
nbelaevski Jan 8, 2009 11:26 AM (in response to factor5)Can you please try 3.3.0.CR2?