protected void processBean(String var, Object bean) throws JellyTagException { super.processBean(var, bean); List list = getList(); // if the items variable is specified lets append all the items if (items != null) { Iterator iter = items.evaluateAsIterator(context); while (iter.hasNext()) { list.add( iter.next() ); } } }
protected void processBean(String var, Object bean) throws JellyTagException { super.processBean(var, bean); List list = getList(); // if the items variable is specified lets append all the items if (items != null) { Iterator iter = items.evaluateAsIterator(context); while (iter.hasNext()) { list.add( iter.next() ); } } }
protected void processBean(String var, Object bean) throws JellyTagException { super.processBean(var, bean); List list = getList(); // if the items variable is specified lets append all the items if (items != null) { Iterator iter = items.evaluateAsIterator(context); while (iter.hasNext()) { list.add( iter.next() ); } } }
protected void processBean(String var, Object bean) throws JellyTagException { super.processBean(var, bean); List list = getList(); // if the items variable is specified lets append all the items if (items != null) { Iterator iter = items.evaluateAsIterator(context); while (iter.hasNext()) { list.add( iter.next() ); } } }
/** * Processes the newly created bean. This method is called when a new bean * instance was created. This implementation invokes the * <code>passResults()</code> method after correct bean processing. * * @param var the value of the var attribute * @param bean the newly created bean * @throws JellyTagException if an error occurs */ @Override protected void processBean(String var, Object bean) throws JellyTagException { checkBeanClass(bean); super.processBean(var, bean); callPassResults(bean, var); }
public void doTag(XMLOutput output) throws JellyTagException { Map attributes = getAttributes(); String var = (String) attributes.get( "var" ); Object classObject = attributes.get( "class" ); addIgnoreProperty("class"); addIgnoreProperty("var"); try { // this method could return null in derived classes Class theClass = convertToClass(classObject); bean = newInstance(theClass, attributes, output); setBeanProperties(bean, attributes); // invoke body which could result in other properties being set invokeBody(output); processBean(var, bean); } catch (ClassNotFoundException e) { throw new JellyTagException(e); } }
public void doTag(XMLOutput output) throws JellyTagException { Map attributes = getAttributes(); String var = (String) attributes.get( "var" ); Object classObject = attributes.get( "class" ); addIgnoreProperty("class"); addIgnoreProperty("var"); try { // this method could return null in derived classes Class theClass = convertToClass(classObject); bean = newInstance(theClass, attributes, output); setBeanProperties(bean, attributes); // invoke body which could result in other properties being set invokeBody(output); processBean(var, bean); } catch (ClassNotFoundException e) { throw new JellyTagException(e); } }
public void doTag(XMLOutput output) throws JellyTagException { Map attributes = getAttributes(); String var = (String) attributes.get( "var" ); Object classObject = attributes.get( "class" ); addIgnoreProperty("class"); addIgnoreProperty("var"); try { // this method could return null in derived classes Class theClass = convertToClass(classObject); bean = newInstance(theClass, attributes, output); setBeanProperties(bean, attributes); // invoke body which could result in other properties being set invokeBody(output); processBean(var, bean); } catch (ClassNotFoundException e) { throw new JellyTagException(e); } }
public void doTag(XMLOutput output) throws JellyTagException { Map attributes = getAttributes(); String var = (String) attributes.get( "var" ); Object classObject = attributes.get( "class" ); addIgnoreProperty("class"); addIgnoreProperty("var"); try { // this method could return null in derived classes Class theClass = convertToClass(classObject); bean = newInstance(theClass, attributes, output); setBeanProperties(bean, attributes); // invoke body which could result in other properties being set invokeBody(output); processBean(var, bean); } catch (ClassNotFoundException e) { throw new JellyTagException(e); } }
/** * This method gets called if an existing bean should be used rather than * creating a new one. This implementation tries to obtain the bean either * from the jelly context or the current bean context. * * @param output the current output object * @throws JellyTagException if the bean cannot be found */ protected void useExistingBean(XMLOutput output) throws JellyTagException { Object bean = fetchBean(); if (bean == null) { throw new JellyTagException("Bean cannot be resolved!"); } checkBeanClass(bean); // invoke the tag's body; this may impact some of the properties invokeBody(output); String var = (String) getAttributes().get(ATTR_VAR); super.processBean(var, bean); callPassResults(bean, var); }