JBoss Rich Faces SVN: r1429 - in branches/refactor1: samples/useCases/src/main/java/org/ajax4jsf and 1 other directories.
                                
                                
                                
                                    
                                        by richfaces-svn-commits@lists.jboss.org
                                    
                                
                                
                                        Author: alexsmirnov
Date: 2007-06-29 20:13:26 -0400 (Fri, 29 Jun 2007)
New Revision: 1429
Modified:
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/UIDataAdaptor.java
   branches/refactor1/samples/useCases/src/main/java/org/ajax4jsf/RepeatData.java
   branches/refactor1/samples/useCases/src/main/webapp/pages/repeat.xhtml
Log:
Fix RF-250
Modified: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/UIDataAdaptor.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/UIDataAdaptor.java	2007-06-30 00:04:34 UTC (rev 1428)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/UIDataAdaptor.java	2007-06-30 00:13:26 UTC (rev 1429)
@@ -1,1323 +1,1328 @@
-/**
- * License Agreement.
- *
- * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- */
-
-package org.ajax4jsf.ajax.repeat;
-
-import java.io.IOException;
-import java.io.Serializable;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-
-import javax.faces.FacesException;
-import javax.faces.application.FacesMessage;
-import javax.faces.component.EditableValueHolder;
-import javax.faces.component.NamingContainer;
-import javax.faces.component.StateHolder;
-import javax.faces.component.UIComponent;
-import javax.faces.component.UIData;
-import javax.faces.context.FacesContext;
-import javax.faces.el.ValueBinding;
-import javax.faces.event.AbortProcessingException;
-import javax.faces.event.FacesEvent;
-import javax.faces.event.FacesListener;
-import javax.faces.event.PhaseId;
-import javax.faces.model.DataModel;
-import javax.faces.model.ListDataModel;
-import javax.faces.render.Renderer;
-
-import org.ajax4jsf.framework.renderer.AjaxChildrenRenderer;
-import org.ajax4jsf.framework.renderer.AjaxRenderer;
-
-/**
- * Base class for iterable components, like dataTable, Tomahawk dataList,
- * Facelets repeat, tree etc., with support for partial rendering on AJAX
- * responces for one or more selected iterations.
- * 
- * @author shura
- * 
- */
-public abstract class UIDataAdaptor extends UIData implements AjaxDataEncoder {
-
-    /**
-         * 
-         */
-    public static final String COMPONENT_STATE_ATTRIBUTE = "componentState";
-
-    public final static DataModel EMPTY_MODEL = new ListDataModel(
-	    Collections.EMPTY_LIST);
-
-    /**
-         * Base class for visit data model at phases decode, validation and
-         * update model
-         * 
-         * @author shura
-         * 
-         */
-    protected abstract class ComponentVisitor implements DataVisitor {
-
-	public void process(FacesContext context, Object rowKey, Object argument)
-		throws IOException {
-	    setRowKey(context, rowKey);
-	    if (isRowAvailable()) {
-		Iterator childIterator = dataChildren();
-		while (childIterator.hasNext()) {
-		    UIComponent component = (UIComponent) childIterator.next();
-		    processComponent(context, component, argument);
-		}
-
-	    }
-	}
-
-	public abstract void processComponent(FacesContext context,
-		UIComponent c, Object argument) throws IOException;
-
-    }
-
-    /**
-         * Visitor for process decode on children components.
-         */
-    protected ComponentVisitor decodeVisitor = new ComponentVisitor() {
-
-	public void processComponent(FacesContext context, UIComponent c,
-		Object argument) {
-	    c.processDecodes(context);
-	}
-
-    };
-
-    /**
-         * Visitor for process validation phase
-         */
-    protected ComponentVisitor validateVisitor = new ComponentVisitor() {
-
-	public void processComponent(FacesContext context, UIComponent c,
-		Object argument) {
-	    c.processValidators(context);
-	}
-
-    };
-
-    /**
-         * Visitor for process update model phase.
-         */
-    protected ComponentVisitor updateVisitor = new ComponentVisitor() {
-
-	public void processComponent(FacesContext context, UIComponent c,
-		Object argument) {
-	    c.processUpdates(context);
-	}
-
-    };
-
-    /**
-         * Base client id's of this component, for wich invoked encode...
-         * methods. Component will save state and serialisable models for this
-         * keys only.
-         */
-    private Set _encoded;
-
-    /**
-         * Storage for data model instances with different client id's of this
-         * component. In case of child for UIData component, this map will keep
-         * data models for different iterations between phases.
-         */
-    private Map _modelsMap = new HashMap();
-
-    /**
-         * Reference for curent data model
-         */
-    private ExtendedDataModel _currentModel = null;
-
-    /**
-         * States of this component for diferent iterations, same as for models.
-         */
-    private Map _statesMap = new HashMap();
-
-    /**
-         * Reference for current component state.
-         */
-    private DataComponentState _currentState = null;
-
-    /**
-         * Name of EL variable for current component state.
-         */
-    private String _stateVar;
-
-    private String _rowKeyVar;
-
-    /**
-         * Key for current value in model.
-         */
-    private Object _rowKey = null;
-
-    /**
-         * Values of row keys, encoded on ajax response rendering.
-         */
-    private Set _ajaxKeys = null;
-
-    private Object _ajaxRowKey = null;
-
-    private Map _ajaxRowKeysMap = new HashMap();
-
-    /**
-         * Get name of EL variable for component state.
-         * 
-         * @return the varState
-         */
-    public String getStateVar() {
-	return _stateVar;
-    }
-
-    /**
-         * @param varStatus
-         *                the varStatus to set
-         */
-    public void setStateVar(String varStatus) {
-	this._stateVar = varStatus;
-    }
-
-    /**
-         * @return the rowKeyVar
-         */
-    public String getRowKeyVar() {
-	return this._rowKeyVar;
-    }
-
-    /**
-         * @param rowKeyVar
-         *                the rowKeyVar to set
-         */
-    public void setRowKeyVar(String rowKeyVar) {
-	this._rowKeyVar = rowKeyVar;
-    }
-
-    /*
-         * (non-Javadoc)
-         * 
-         * @see javax.faces.component.UIData#getRowCount()
-         */
-    public int getRowCount() {
-	return getExtendedDataModel().getRowCount();
-    }
-
-    /*
-         * (non-Javadoc)
-         * 
-         * @see javax.faces.component.UIData#getRowData()
-         */
-    public Object getRowData() {
-	return getExtendedDataModel().getRowData();
-    }
-
-    /*
-         * (non-Javadoc)
-         * 
-         * @see javax.faces.component.UIData#isRowAvailable()
-         */
-    public boolean isRowAvailable() {
-	return this.getExtendedDataModel().isRowAvailable();
-    }
-
-    /*
-         * (non-Javadoc)
-         * 
-         * @see javax.faces.component.UIData#setRowIndex(int)
-         */
-    public void setRowIndex(int index) {
-	FacesContext faces = FacesContext.getCurrentInstance();
-	ExtendedDataModel localModel = getExtendedDataModel();
-	// if(key == localModel.getRowIndex()){
-	// return;
-	// }
-	// save child state
-	this.saveChildState(faces);
-	// Set current model row by int, but immediately get value from model.
-	// for compability, complex models must provide values map between
-	// integer and key value.
-	localModel.setRowIndex(index);
-	this._rowKey = localModel.getRowKey();
-	this._clientId = null;
-	boolean rowSelected = this._rowKey != null;
-
-	setupVariable(faces, localModel, rowSelected);
-	// restore child state
-	this.restoreChildState(faces);
-    }
-
-    /*
-         * (non-Javadoc)
-         * 
-         * @see javax.faces.component.UIData#getRowIndex()
-         */
-    public int getRowIndex() {
-	return getExtendedDataModel().getRowIndex();
-    }
-
-    /**
-         * Same as for int index, but for complex model key.
-         * 
-         * @return
-         */
-    public Object getRowKey() {
-	return this._rowKey;
-    }
-
-    public void setRowKey(Object key) {
-	setRowKey(FacesContext.getCurrentInstance(), key);
-    }
-
-    /**
-         * Setup current roy by key. Perform same functionality as
-         * {@link UIData#setRowIndex(int)}, but for key object - it may be not
-         * only row number in sequence data, but, for example - path to current
-         * node in tree.
-         * 
-         * @param faces -
-         *                current FacesContext
-         * @param key
-         *                new key value.
-         */
-    public void setRowKey(FacesContext faces, Object key) {
-	ExtendedDataModel localModel = getExtendedDataModel();
-	// save child state
-	this.saveChildState(faces);
-	this._rowKey = key;
-	this._clientId = null;
-	localModel.setRowKey(key);
-
-	boolean rowSelected = key != null;
-
-	setupVariable(faces, localModel, rowSelected);
-	// restore child state
-	this.restoreChildState(faces);
-
-    }
-
-    /*
-         * (non-Javadoc)
-         * 
-         * @see org.ajax4jsf.ajax.repeat.AjaxDataEncoder#getAjaxKeys()
-         */
-    public Set getAjaxKeys() {
-	Set keys = null;
-	if (this._ajaxKeys != null) {
-	    keys = (this._ajaxKeys);
-	} else {
-		ValueBinding vb = getValueBinding("ajaxKeys");
-		if (vb != null) {
-		    keys = (Set) (vb.getValue(getFacesContext()));
-		} else if(null != _ajaxRowKey){
-		    // If none of above exist , use row with submitted AjaxComponent
-		    keys = new HashSet(1);
-		    keys.add(_ajaxRowKey);
-		}
-	}
-	return keys;
-    }
-
-    /*
-         * (non-Javadoc)
-         * 
-         * @see org.ajax4jsf.ajax.repeat.AjaxDataEncoder#setAjaxKeys(java.util.Set)
-         */
-    public void setAjaxKeys(Set ajaxKeys) {
-	this._ajaxKeys = ajaxKeys;
-    }
-
-    /*
-         * (non-Javadoc)
-         * 
-         * @see org.ajax4jsf.framework.ajax.AjaxChildrenEncoder#encodeAjaxChild(javax.faces.context.FacesContext,
-         *      java.lang.String, java.util.Set, java.util.Set)
-         */
-    public void encodeAjaxChild(FacesContext context, String path,
-	    final Set ids, final Set renderedAreas) throws IOException {
-	resetDataModel();
-
-	Renderer renderer = getRenderer(context);
-	if (null != renderer && renderer instanceof AjaxRenderer) {
-	    // If renderer support partial encoding - call them.
-	    AjaxRenderer childrenRenderer = (AjaxRenderer) renderer;
-	    childrenRenderer.encodeAjaxChildren(context, this, path, ids,
-		    renderedAreas);
-	}
-	else {
-	    // Use simple ajax children encoding for iterate other keys.
-	    final AjaxRenderer childrenRenderer = getChildrenRenderer();
-	    final String childrenPath = path + getId() + NamingContainer.SEPARATOR_CHAR;
-	    ComponentVisitor ajaxVisitor = new ComponentVisitor() {
-
-		public void processComponent(FacesContext context,
-			UIComponent c, Object argument) throws IOException {
-		    childrenRenderer.encodeAjaxComponent(context, c, childrenPath,
-			    ids, renderedAreas);
-		}
-
-	    };
-	    Set ajaxKeys = getAjaxKeys();
-	    if (null != ajaxKeys) {
-		captureOrigValue();
-		Object savedKey = getRowKey();
-		setRowKey(context, null);
-		Iterator fixedChildren = fixedChildren();
-		while (fixedChildren.hasNext()) {
-		    UIComponent component = (UIComponent) fixedChildren.next();
-		    ajaxVisitor.processComponent(context, component, null);
-		}
-		for (Iterator iter = ajaxKeys.iterator(); iter.hasNext();) {
-		    Object key = (Object) iter.next();
-		    ajaxVisitor.process(context, key, null);
-		}
-		setRowKey(savedKey);
-		restoreOrigValue();
-	    } else {
-		iterate(context, ajaxVisitor, null);
-	    }
-	}
-    }
-
-    /**
-         * Instance of default renderer in ajax responses.
-         */
-    private AjaxRenderer _childrenRenderer = null;
-
-    /**
-         * getter for simple {@link AjaxChildrenRenderer} instance in case of
-         * ajax responses. If default renderer not support search of children
-         * for encode in ajax response, component will use this instance by
-         * default.
-         * 
-         * @return
-         */
-    protected AjaxRenderer getChildrenRenderer() {
-	if (_childrenRenderer == null) {
-	    _childrenRenderer = new AjaxChildrenRenderer() {
-
-		protected Class getComponentClass() {
-		    return UIDataAdaptor.class;
-		}
-
-	    };
-
-	}
-
-	return _childrenRenderer;
-    }
-
-    /**
-         * @return Set of values for clientId's of this component, for wich was
-         *         invoked "encode" methods.
-         */
-    protected Set getEncodedIds() {
-	if (_encoded == null) {
-	    _encoded = new HashSet();
-	}
-
-	return _encoded;
-    }
-
-    /**
-         * Setup EL variable for different iteration. Value of row data and
-         * component state will be put into request scope attributes with names
-         * given by "var" and "varState" bean properties.
-         * 
-         * @param faces
-         *                current faces context
-         * @param localModel
-         * @param rowSelected
-         */
-    protected void setupVariable(FacesContext faces, DataModel localModel,
-	    boolean rowSelected) {
-	Map attrs = faces.getExternalContext().getRequestMap();
-	if (rowSelected && isRowAvailable()) {
-	    // Current row data.
-	    setupVariable(getVar(), attrs, localModel.getRowData());
-	    // Component state variable.
-	    setupVariable(getStateVar(), attrs, getComponentState());
-	    // Row key Data variable.
-	    setupVariable(getRowKeyVar(), attrs, getRowKey());
-
-	} else {
-	    removeVariable(getVar(), attrs);
-	    removeVariable(getStateVar(), attrs);
-	    removeVariable(getRowKeyVar(), attrs);
-	}
-    }
-
-    /**
-         * @param var
-         * @param attrs
-         * @param rowData
-         */
-    private void setupVariable(String var, Map attrs, Object rowData) {
-	if (var != null) {
-	    attrs.put(var, rowData);
-	}
-    }
-
-    /**
-         * @param var
-         * @param attrs
-         * @param rowData
-         */
-    private void removeVariable(String var, Map attrs) {
-	if (var != null) {
-	    attrs.remove(var);
-	}
-    }
-
-    /**
-         * Reset data model. this method must be called twice per request -
-         * before decode phase and before component encoding.
-         */
-    protected void resetDataModel() {
-	this.setExtendedDataModel(null);
-    }
-
-    /**
-         * Set data model. Model value will be stored in Map with key as current
-         * clientId for this component, to keep models between phases for same
-         * iteration in case if this component child for other UIData
-         * 
-         * @param model
-         */
-    protected void setExtendedDataModel(ExtendedDataModel model) {
-	this._currentModel = model;
-	this._modelsMap.put(getBaseClientId(getFacesContext()), model);
-    }
-
-    /**
-         * Get current data model, or create it by {@link #createDataModel()}
-         * method. For different iterations in ancestor UIData ( if present )
-         * will be returned different models.
-         * 
-         * @return current data model.
-         */
-    protected ExtendedDataModel getExtendedDataModel() {
-	if (this._currentModel == null) {
-	    String baseClientId = getBaseClientId(getFacesContext());
-	    ExtendedDataModel model = (ExtendedDataModel) this._modelsMap
-		    .get(baseClientId);
-	    if (null == model) {
-		model = createDataModel();
-		this._modelsMap.put(baseClientId, model);
-	    }
-	    this._currentModel = model;
-	}
-	return this._currentModel;
-    }
-
-    /**
-         * Hook mathod for create data model in concrete implementations.
-         * 
-         * @return
-         */
-    protected abstract ExtendedDataModel createDataModel();
-
-    /**
-         * Set current state ( at most cases, visual representation ) of this
-         * component. Same as for DataModel, component will keep states for
-         * different iterations.
-         * 
-         * @param state
-         */
-    public void setComponentState(DataComponentState state) {
-	this._currentState = state;
-	this._statesMap.put(getBaseClientId(getFacesContext()),
-		this._currentState);
-    }
-
-    /**
-         * @return current state of this component.
-         */
-    public DataComponentState getComponentState() {
-	DataComponentState state = null;
-	if (this._currentState == null) {
-	    // Check for binding state to user bean.
-	    ValueBinding valueBinding = getValueBinding(UIDataAdaptor.COMPONENT_STATE_ATTRIBUTE);
-	    FacesContext facesContext = getFacesContext();
-	    if (null != valueBinding) {
-		state = (DataComponentState) valueBinding
-			.getValue(facesContext);
-		if (null == state) {
-		    // Create default state
-		    state = createComponentState();
-		    if (!valueBinding.isReadOnly(facesContext)) {
-			// Store created state in user bean.
-			valueBinding.setValue(facesContext, state);
-		    }
-		}
-	    } else {
-		// Check for stored state in map for parent iterations
-		String baseClientId = getBaseClientId(facesContext);
-		state = (DataComponentState) this._statesMap.get(baseClientId);
-		if (null == state) {
-		    // Create default component state
-		    state = createComponentState();
-		    this._statesMap.put(baseClientId, state);
-		}
-		this._currentState = state;
-	    }
-	} else {
-	    state = this._currentState;
-	}
-	return state;
-    }
-
-    /**
-         * Hook method for create default state in concrete implementations.
-         * 
-         * @return
-         */
-    protected abstract DataComponentState createComponentState();
-
-    private String _clientId = null;
-
-    public String getClientId(FacesContext faces) {
-	if (null == _clientId) {
-	    StringBuffer id = new StringBuffer(getBaseClientId(faces));
-	    Object rowKey = getRowKey();
-	    if (rowKey != null) {
-		id.append(NamingContainer.SEPARATOR_CHAR).append(
-			rowKey.toString());
-	    }
-	    Renderer renderer;
-	    if (null != (renderer = getRenderer(faces))) {
-		_clientId = renderer.convertClientId(faces, id.toString());
-	    } else {
-		_clientId = id.toString();
-	    }
-
-	}
-	return _clientId;
-    }
-
-    private String _baseClientId = null;
-
-    /**
-         * Get base clietntId of this component ( withowt iteration part )
-         * 
-         * @param faces
-         * @return
-         */
-    public String getBaseClientId(FacesContext faces) {
-	// Return any previously cached client identifier
-	if (_baseClientId == null) {
-
-	    // Search for an ancestor that is a naming container
-	    UIComponent ancestorContainer = this;
-	    StringBuffer parentIds = new StringBuffer();
-	    while (null != (ancestorContainer = ancestorContainer.getParent())) {
-		if (ancestorContainer instanceof NamingContainer) {
-		    parentIds.append(ancestorContainer.getClientId(faces))
-			    .append(NamingContainer.SEPARATOR_CHAR);
-		    break;
-		}
-	    }
-	    String id = getId();
-	    if (null != id) {
-		_baseClientId = parentIds.append(id).toString();
-	    } else {
-		_baseClientId = parentIds.append(
-			faces.getViewRoot().createUniqueId()).toString();
-	    }
-	}
-	return (_baseClientId);
-
-    }
-
-    /*
-         * (non-Javadoc)
-         * 
-         * @see javax.faces.component.UIComponentBase#setId(java.lang.String)
-         */
-    public void setId(String id) {
-	// If component created by restoring tree or JSP, initial Id is null.
-	boolean haveId = null != super.getId();
-	super.setId(id);
-	_baseClientId = null;
-	_clientId = null;
-	if (haveId) {
-	    // parent UIData ( if present ) will be set same Id at iteration
-	    // -
-	    // we use it for
-	    // switch to different model and state.
-	    String baseClientId = getBaseClientId(getFacesContext());
-	    this._currentState = (DataComponentState) this._statesMap
-		    .get(baseClientId);
-	    this._currentModel = (ExtendedDataModel) this._modelsMap
-		    .get(baseClientId);
-	    if (null != this._currentModel) {
-		this._rowKey = this._currentModel.getRowKey();
-		// restoreChildState();
-	    }
-	    // Restore value for row with submitted AjaxComponent.
-	    this._ajaxRowKey = _ajaxRowKeysMap.get(baseClientId);
-	}
-    }
-
-    private Object origValue;
-
-    /**
-         * Save current state of data variable.
-         */
-    public void captureOrigValue() {
-	captureOrigValue(FacesContext.getCurrentInstance());
-    }
-
-    /**
-         * Save current state of data variable.
-         * 
-         * @param faces
-         *                current faces context
-         */
-    public void captureOrigValue(FacesContext faces) {
-	String var = getVar();
-	if (var != null) {
-	    Map attrs = faces.getExternalContext().getRequestMap();
-	    this.origValue = attrs.get(var);
-	}
-    }
-
-    /**
-         * Restore value of data variable after processing phase.
-         */
-    public void restoreOrigValue() {
-	restoreOrigValue(FacesContext.getCurrentInstance());
-    }
-
-    /**
-         * Restore value of data variable after processing phase.
-         * 
-         * @param faces
-         *                current faces context
-         */
-    public void restoreOrigValue(FacesContext faces) {
-	String var = getVar();
-	if (var != null) {
-	    Map attrs = faces.getExternalContext().getRequestMap();
-	    if (this.origValue != null) {
-		attrs.put(var, this.origValue);
-	    } else {
-		attrs.remove(var);
-	    }
-	}
-    }
-
-    /**
-         * Saved values of {@link EditableValueHolder} fields per iterations.
-         */
-    private Map childState;
-
-    /**
-         * @param faces
-         * @return Saved values of {@link EditableValueHolder} fields per
-         *         iterations.
-         */
-    protected Map getChildState(FacesContext faces) {
-	if (this.childState == null) {
-	    this.childState = new HashMap();
-	}
-	String baseClientId = getBaseClientId(faces);
-	Map currentChildState = (Map) childState.get(baseClientId);
-	if (null == currentChildState) {
-	    currentChildState = new HashMap();
-	    childState.put(baseClientId, currentChildState);
-	}
-	return currentChildState;
-    }
-
-    /**
-         * Save values of {@link EditableValueHolder} fields before change
-         * current row.
-         * 
-         * @param faces
-         */
-    protected void saveChildState(FacesContext faces) {
-
-	Iterator itr = dataChildren();
-	while (itr.hasNext()) {
-	    Map childState = this.getChildState(faces);
-	    this.saveChildState(faces, (UIComponent) itr.next(), childState);
-	}
-    }
-
-    /**
-         * Recursive method for Iterate on children for save
-         * {@link EditableValueHolder} fields states.
-         * 
-         * @param faces
-         * @param c
-         * @param childState
-         */
-    private void saveChildState(FacesContext faces, UIComponent c,
-	    Map childState) {
-
-	if (c instanceof EditableValueHolder && !c.isTransient()) {
-	    String clientId = c.getClientId(faces);
-	    SavedState ss = (SavedState) childState.get(clientId);
-	    if (ss == null) {
-		ss = new SavedState();
-		childState.put(clientId, ss);
-	    }
-	    ss.populate((EditableValueHolder) c);
-	}
-
-	// continue hack
-	Iterator itr = c.getChildren().iterator();
-	while (itr.hasNext()) {
-	    saveChildState(faces, (UIComponent) itr.next(), childState);
-	}
-	itr = c.getFacets().values().iterator();
-	while (itr.hasNext()) {
-	    saveChildState(faces, (UIComponent) itr.next(), childState);
-	}
-    }
-
-    /**
-         * Restore values of {@link EditableValueHolder} fields after change
-         * current row.
-         * 
-         * @param faces
-         */
-    protected void restoreChildState(FacesContext faces) {
-
-	Iterator itr = dataChildren();
-	while (itr.hasNext()) {
-	    Map childState = this.getChildState(faces);
-	    this.restoreChildState(faces, (UIComponent) itr.next(), childState);
-	}
-    }
-
-    /**
-         * Recursive part of
-         * {@link #restoreChildState(FacesContext, UIComponent, Map)}
-         * 
-         * @param faces
-         * @param c
-         * @param childState
-         * 
-         */
-    private void restoreChildState(FacesContext faces, UIComponent c,
-	    Map childState) {
-	// reset id
-	String id = c.getId();
-	c.setId(id);
-
-	// hack
-	if (c instanceof EditableValueHolder) {
-	    EditableValueHolder evh = (EditableValueHolder) c;
-	    String clientId = c.getClientId(faces);
-	    SavedState ss = (SavedState) childState.get(clientId);
-	    if (ss != null) {
-		ss.apply(evh);
-	    } else {
-		NullState.apply(evh);
-	    }
-	}
-
-	// continue hack
-	Iterator itr = c.getChildren().iterator();
-	while (itr.hasNext()) {
-	    restoreChildState(faces, (UIComponent) itr.next(), childState);
-	}
-	itr = c.getFacets().values().iterator();
-	while (itr.hasNext()) {
-	    restoreChildState(faces, (UIComponent) itr.next(), childState);
-	}
-    }
-
-    /**
-         * Check for validation errors on children components. If true, saved
-         * values must be keep on render phase
-         * 
-         * @param context
-         * @return
-         */
-    private boolean keepSaved(FacesContext context) {
-
-	Iterator clientIds = this.getChildState(context).keySet().iterator();
-	while (clientIds.hasNext()) {
-	    String clientId = (String) clientIds.next();
-	    Iterator messages = context.getMessages(clientId);
-	    while (messages.hasNext()) {
-		FacesMessage message = (FacesMessage) messages.next();
-		if (message.getSeverity()
-			.compareTo(FacesMessage.SEVERITY_ERROR) >= 0) {
-		    return (true);
-		}
-	    }
-	}
-	return false;
-    }
-
-    /**
-         * Perform iteration on all children components and all data rows with
-         * given visitor.
-         * 
-         * @param faces
-         * @param visitor
-         */
-    protected void iterate(FacesContext faces, ComponentVisitor visitor,
-	    Object argument) {
-
-	// stop if not rendered
-	if (!this.isRendered()) {
-	    return;
-	}
-	// reset rowIndex
-	this.captureOrigValue(faces);
-	this.setRowKey(faces, null);
-	try {
-	    Iterator fixedChildren = fixedChildren();
-	    while (fixedChildren.hasNext()) {
-		UIComponent component = (UIComponent) fixedChildren.next();
-		visitor.processComponent(faces, component, argument);
-	    }
-
-	    walk(faces, visitor, argument);
-	} catch (Exception e) {
-	    throw new FacesException(e);
-	} finally {
-	    this.setRowKey(faces, null);
-	    this.restoreOrigValue(faces);
-	}
-    }
-
-    /**
-         * Walk ( visit ) this component on all data-avare children for each
-         * row.
-         * 
-         * @param faces
-         * @param visitor
-         * @throws IOException
-         */
-    public void walk(FacesContext faces, DataVisitor visitor, Object argument)
-	    throws IOException {
-	getExtendedDataModel().walk(faces, visitor,
-		getComponentState().getRange(), argument);
-    }
-
-    protected void processDecodes(FacesContext faces, Object argument) {
-	if (!this.isRendered())
-	    return;
-	this.resetComponent(faces);
-	this.iterate(faces, decodeVisitor, argument);
-	this.decode(faces);
-    }
-
-    /*
-         * (non-Javadoc)
-         * 
-         * @see javax.faces.component.UIData#processDecodes(javax.faces.context.FacesContext)
-         */
-    public void processDecodes(FacesContext faces) {
-	processDecodes(faces, null);
-    }
-
-    /**
-         * Reset per-request fields in component.
-         * 
-         * @param faces
-         * 
-         */
-    protected void resetComponent(FacesContext faces) {
-	// resetDataModel();
-	if (null != this.childState) {
-	    childState.remove(getBaseClientId(faces));
-	}
-	this._encoded = null;
-    }
-
-    protected void processUpdates(FacesContext faces, Object argument) {
-	if (!this.isRendered())
-	    return;
-	this.iterate(faces, updateVisitor, argument);
-	ExtendedDataModel dataModel = getExtendedDataModel();
-	// If no validation errors, update values for serializable model,
-	// restored from view.
-	if (dataModel instanceof SerializableDataModel && (!keepSaved(faces))) {
-	    SerializableDataModel serializableModel = (SerializableDataModel) dataModel;
-	    serializableModel.update();
-	}
-    }
-
-    public void processUpdates(FacesContext faces) {
-	processUpdates(faces, null);
-    }
-
-    protected void processValidators(FacesContext faces, Object argument) {
-	if (!this.isRendered())
-	    return;
-	this.iterate(faces, validateVisitor, argument);
-    }
-
-    public void processValidators(FacesContext faces) {
-	processValidators(faces, null);
-    }
-
-    public void encodeBegin(FacesContext context) throws IOException {
-	resetDataModel();
-	// if(!keepSaved(context)){
-	// childState.remove(getBaseClientId(context));
-	// }
-	// Mark component as used, if parent UIData change own range states not
-	// accessed at
-	// encode phase must be unsaved.
-	getEncodedIds().add(getBaseClientId(context));
-	// getComponentState().setUsed(true);
-	super.encodeBegin(context);
-    }
-
-    /**
-         * This method must create iterator for all non-data avare children of
-         * this component ( header/footer facets for components and columns in
-         * dataTable, facets for tree etc.
-         * 
-         * @return iterator for all components not sensitive for row data.
-         */
-    protected abstract Iterator fixedChildren();
-
-    /**
-         * This method must create iterator for all children components,
-         * processed "per row" It can be children of UIColumn in dataTable,
-         * nodes in tree
-         * 
-         * @return iterator for all components processed per row.
-         */
-    protected abstract Iterator dataChildren();
-
-    private final static SavedState NullState = new SavedState();
-
-    // from RI
-    /**
-         * This class keep values of {@link EditableValueHolder} row-sensitive
-         * fields.
-         * 
-         * @author shura
-         * 
-         */
-    private final static class SavedState implements Serializable {
-
-	private Object submittedValue;
-
-	private static final long serialVersionUID = 2920252657338389849L;
-
-	Object getSubmittedValue() {
-	    return (this.submittedValue);
-	}
-
-	void setSubmittedValue(Object submittedValue) {
-	    this.submittedValue = submittedValue;
-	}
-
-	private boolean valid = true;
-
-	boolean isValid() {
-	    return (this.valid);
-	}
-
-	void setValid(boolean valid) {
-	    this.valid = valid;
-	}
-
-	private Object value;
-
-	Object getValue() {
-	    return (this.value);
-	}
-
-	public void setValue(Object value) {
-	    this.value = value;
-	}
-
-	private boolean localValueSet;
-
-	boolean isLocalValueSet() {
-	    return (this.localValueSet);
-	}
-
-	public void setLocalValueSet(boolean localValueSet) {
-	    this.localValueSet = localValueSet;
-	}
-
-	public String toString() {
-	    return ("submittedValue: " + submittedValue + " value: " + value
-		    + " localValueSet: " + localValueSet);
-	}
-
-	public void populate(EditableValueHolder evh) {
-	    this.value = evh.getLocalValue();
-	    this.valid = evh.isValid();
-	    this.submittedValue = evh.getSubmittedValue();
-	    this.localValueSet = evh.isLocalValueSet();
-	}
-
-	public void apply(EditableValueHolder evh) {
-	    evh.setValue(this.value);
-	    evh.setValid(this.valid);
-	    evh.setSubmittedValue(this.submittedValue);
-	    evh.setLocalValueSet(this.localValueSet);
-	}
-
-    }
-
-    /*
-         * (non-Javadoc)
-         * 
-         * @see javax.faces.component.UIData#queueEvent(javax.faces.event.FacesEvent)
-         */
-    public void queueEvent(FacesEvent event) {
-	if (event.getComponent() != this) {
-	    event = new IndexedEvent(this, event, getRowKey());
-	}
-	// Send event directly to parent, to avoid wrapping in superclass.
-	UIComponent parent = getParent();
-	if (parent == null) {
-	    throw new IllegalStateException(
-		    "No parent component for queue event");
-	} else {
-	    parent.queueEvent(event);
-	}
-    }
-
-    public void broadcast(FacesEvent event) throws AbortProcessingException {
-
-	if (!(event instanceof IndexedEvent)) {
-	    if (!broadcastLocal(event)) {
-		super.broadcast(event);
-	    }
-	    return;
-	}
-
-	// Set up the correct context and fire our wrapped event
-	IndexedEvent revent = (IndexedEvent) event;
-	Object oldRowKey = getRowKey();
-	FacesContext faces = FacesContext.getCurrentInstance();
-	captureOrigValue(faces);
-	Object eventRowKey = revent.getKey();
-	setRowKey(faces, eventRowKey);
-	FacesEvent rowEvent = revent.getTarget();
-	rowEvent.getComponent().broadcast(rowEvent);
-	// For Ajax events, keep row value.
-	if (!(rowEvent.getPhaseId() == PhaseId.RENDER_RESPONSE)) {
-	    this._ajaxRowKey = eventRowKey;
-	    this._ajaxRowKeysMap.put(getBaseClientId(faces), eventRowKey);
-	}
-	setRowKey(faces, oldRowKey);
-	restoreOrigValue(faces);
-	// }
-	return;
-    }
-
-    /**
-         * Process events targetted for concrete implementation. Hook method
-         * called from {@link #broadcast(FacesEvent)}
-         * 
-         * @param event -
-         *                processed event.
-         * @return true if event processed, false if component must continue
-         *         processing.
-         */
-    protected boolean broadcastLocal(FacesEvent event) {
-	return false;
-    }
-
-    /**
-         * Wrapper for event from child component, with value of current row
-         * key.
-         * 
-         * @author shura
-         * 
-         */
-    protected static final class IndexedEvent extends FacesEvent {
-
-	private static final long serialVersionUID = -8318895390232552385L;
-
-	private final FacesEvent target;
-
-	private final Object key;
-
-	public IndexedEvent(UIDataAdaptor owner, FacesEvent target, Object key) {
-	    super(owner);
-	    this.target = target;
-	    this.key = key;
-	}
-
-	public PhaseId getPhaseId() {
-	    return (this.target.getPhaseId());
-	}
-
-	public void setPhaseId(PhaseId phaseId) {
-	    this.target.setPhaseId(phaseId);
-	}
-
-	public boolean isAppropriateListener(FacesListener listener) {
-	    return this.target.isAppropriateListener(listener);
-	}
-
-	public void processListener(FacesListener listener) {
-	    UIDataAdaptor owner = (UIDataAdaptor) this.getComponent();
-	    Object prevIndex = owner._rowKey;
-	    try {
-		owner.setRowKey(this.key);
-		this.target.processListener(listener);
-	    } finally {
-		owner.setRowKey(prevIndex);
-	    }
-	}
-
-	public Object getKey() {
-	    return key;
-	}
-
-	public FacesEvent getTarget() {
-	    return target;
-	}
-
-    }
-
-    /**
-         * "memento" pattern class for state of component.
-         * 
-         * @author shura
-         * 
-         */
-    private static class DataState implements Serializable {
-
-	/**
-         * 
-         */
-	private static final long serialVersionUID = 17070532L;
-
-	private Object superState;
-
-	private Map componentStates = new HashMap();
-
-	private Set ajaxKeys;
-
-	public String rowKeyVar;
-
-	public String stateVar;
-
-    }
-
-    /**
-         * Serialisable model and component state per iteration of parent
-         * UIData.
-         * 
-         * @author shura
-         * 
-         */
-    private static class PerIdState implements Serializable {
-	/**
-         * 
-         */
-	private static final long serialVersionUID = 9037454770537726418L;
-
-	/**
-         * Flag setted to true if componentState implements StateHolder
-         */
-	private boolean stateInHolder = false;
-
-	/**
-         * Serializable componentState or
-         */
-	private Object componentState;
-
-	private SerializableDataModel model;
-    }
-
-    public void restoreState(FacesContext faces, Object object) {
-	DataState state = (DataState) object;
-	super.restoreState(faces, state.superState);
-	this._ajaxKeys = state.ajaxKeys;
-	this._statesMap = new HashMap();
-	this._rowKeyVar = state.rowKeyVar;
-	this._stateVar = state.stateVar;
-	// Restore serializable models and component states for all rows of
-	// parent UIData ( single if this
-	// component not child of iterable )
-	for (Iterator iter = state.componentStates.entrySet().iterator(); iter
-		.hasNext();) {
-	    Map.Entry stateEntry = (Map.Entry) iter.next();
-	    PerIdState idState = (PerIdState) stateEntry.getValue();
-	    DataComponentState compState;
-	    if (idState.stateInHolder) {
-		// TODO - change RichFaces Tree component, for remove reference
-		// to component from state.
-		compState = createComponentState();
-		((StateHolder) compState).restoreState(faces,
-			idState.componentState);
-	    } else {
-		compState = (DataComponentState) idState.componentState;
-	    }
-	    Object key = stateEntry.getKey();
-	    this._statesMap.put(key, compState);
-	    this._modelsMap.put(key, idState.model);
-	}
-    }
-
-    public Object saveState(FacesContext faces) {
-	DataState state = new DataState();
-	state.superState = super.saveState(faces);
-	state.ajaxKeys = this._ajaxKeys;
-	state.rowKeyVar = this._rowKeyVar;
-	state.stateVar = this._stateVar;
-	Set encodedIds = getEncodedIds();
-	// Save all states of component and data model for all valies of
-	// clientId, encoded in this request.
-	for (Iterator iter = this._statesMap.entrySet().iterator(); iter
-		.hasNext();) {
-	    Map.Entry stateEntry = (Map.Entry) iter.next();
-	    DataComponentState dataComponentState = ((DataComponentState) stateEntry
-		    .getValue());
-	    Object stateKey = stateEntry.getKey();
-	    if (encodedIds.isEmpty() || encodedIds.contains(stateKey)) {
-		PerIdState idState = new PerIdState();
-		idState.model = getExtendedDataModel().getSerializableModel(
-			dataComponentState.getRange());
-		// Save component state , depended if implemented interfaces.
-		if (null == dataComponentState) {
-		    idState.componentState = null;
-		} else if (dataComponentState instanceof Serializable) {
-		    idState.componentState = dataComponentState;
-		} else if (dataComponentState instanceof StateHolder) {
-		    // TODO - change RichFaces Tree component, for remove
-		    // reference to component from state.
-		    // Change this code to reference for saveAttachedState.
-		    idState.componentState = ((StateHolder) dataComponentState)
-			    .saveState(faces);
-		    idState.stateInHolder = true;
-		}
-		if (null != idState.model || null != idState.componentState) {
-		    state.componentStates.put(stateKey, idState);
-		}
-	    }
-	}
-	return state;
-    }
-
-}
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.ajax.repeat;
+
+import java.io.IOException;
+import java.io.Serializable;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+
+import javax.faces.FacesException;
+import javax.faces.application.FacesMessage;
+import javax.faces.component.EditableValueHolder;
+import javax.faces.component.NamingContainer;
+import javax.faces.component.StateHolder;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIData;
+import javax.faces.context.FacesContext;
+import javax.faces.el.ValueBinding;
+import javax.faces.event.AbortProcessingException;
+import javax.faces.event.FacesEvent;
+import javax.faces.event.FacesListener;
+import javax.faces.event.PhaseId;
+import javax.faces.model.DataModel;
+import javax.faces.model.ListDataModel;
+import javax.faces.render.Renderer;
+
+import org.ajax4jsf.framework.renderer.AjaxChildrenRenderer;
+
+/**
+ * Base class for iterable components, like dataTable, Tomahawk dataList,
+ * Facelets repeat, tree etc., with support for partial rendering on AJAX
+ * responces for one or more selected iterations.
+ * 
+ * @author shura
+ * 
+ */
+public abstract class UIDataAdaptor extends UIData implements AjaxDataEncoder {
+
+    /**
+         * 
+         */
+    public static final String COMPONENT_STATE_ATTRIBUTE = "componentState";
+
+    public final static DataModel EMPTY_MODEL = new ListDataModel(
+	    Collections.EMPTY_LIST);
+
+    /**
+         * Base class for visit data model at phases decode, validation and
+         * update model
+         * 
+         * @author shura
+         * 
+         */
+    protected abstract class ComponentVisitor implements DataVisitor {
+
+	public void process(FacesContext context, Object rowKey, Object argument)
+		throws IOException {
+	    setRowKey(context, rowKey);
+	    if (isRowAvailable()) {
+		Iterator childIterator = dataChildren();
+		while (childIterator.hasNext()) {
+		    UIComponent component = (UIComponent) childIterator.next();
+		    processComponent(context, component, argument);
+		}
+
+	    }
+	}
+
+	public abstract void processComponent(FacesContext context,
+		UIComponent c, Object argument) throws IOException;
+
+    }
+
+    /**
+         * Visitor for process decode on children components.
+         */
+    protected ComponentVisitor decodeVisitor = new ComponentVisitor() {
+
+	public void processComponent(FacesContext context, UIComponent c,
+		Object argument) {
+	    c.processDecodes(context);
+	}
+
+    };
+
+    /**
+         * Visitor for process validation phase
+         */
+    protected ComponentVisitor validateVisitor = new ComponentVisitor() {
+
+	public void processComponent(FacesContext context, UIComponent c,
+		Object argument) {
+	    c.processValidators(context);
+	}
+
+    };
+
+    /**
+         * Visitor for process update model phase.
+         */
+    protected ComponentVisitor updateVisitor = new ComponentVisitor() {
+
+	public void processComponent(FacesContext context, UIComponent c,
+		Object argument) {
+	    c.processUpdates(context);
+	}
+
+    };
+
+    /**
+         * Base client id's of this component, for wich invoked encode...
+         * methods. Component will save state and serialisable models for this
+         * keys only.
+         */
+    private Set _encoded;
+
+    /**
+         * Storage for data model instances with different client id's of this
+         * component. In case of child for UIData component, this map will keep
+         * data models for different iterations between phases.
+         */
+    private Map _modelsMap = new HashMap();
+
+    /**
+         * Reference for curent data model
+         */
+    private ExtendedDataModel _currentModel = null;
+
+    /**
+         * States of this component for diferent iterations, same as for models.
+         */
+    private Map _statesMap = new HashMap();
+
+    /**
+         * Reference for current component state.
+         */
+    private DataComponentState _currentState = null;
+
+    /**
+         * Name of EL variable for current component state.
+         */
+    private String _stateVar;
+
+    private String _rowKeyVar;
+
+    /**
+         * Key for current value in model.
+         */
+    private Object _rowKey = null;
+
+    /**
+         * Values of row keys, encoded on ajax response rendering.
+         */
+    private Set _ajaxKeys = null;
+
+    private Object _ajaxRowKey = null;
+
+    private Map _ajaxRowKeysMap = new HashMap();
+
+    /**
+         * Get name of EL variable for component state.
+         * 
+         * @return the varState
+         */
+    public String getStateVar() {
+	return _stateVar;
+    }
+
+    /**
+         * @param varStatus
+         *                the varStatus to set
+         */
+    public void setStateVar(String varStatus) {
+	this._stateVar = varStatus;
+    }
+
+    /**
+         * @return the rowKeyVar
+         */
+    public String getRowKeyVar() {
+	return this._rowKeyVar;
+    }
+
+    /**
+         * @param rowKeyVar
+         *                the rowKeyVar to set
+         */
+    public void setRowKeyVar(String rowKeyVar) {
+	this._rowKeyVar = rowKeyVar;
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see javax.faces.component.UIData#getRowCount()
+         */
+    public int getRowCount() {
+	return getExtendedDataModel().getRowCount();
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see javax.faces.component.UIData#getRowData()
+         */
+    public Object getRowData() {
+	return getExtendedDataModel().getRowData();
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see javax.faces.component.UIData#isRowAvailable()
+         */
+    public boolean isRowAvailable() {
+	return this.getExtendedDataModel().isRowAvailable();
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see javax.faces.component.UIData#setRowIndex(int)
+         */
+    public void setRowIndex(int index) {
+	FacesContext faces = FacesContext.getCurrentInstance();
+	ExtendedDataModel localModel = getExtendedDataModel();
+	// if(key == localModel.getRowIndex()){
+	// return;
+	// }
+	// save child state
+	this.saveChildState(faces);
+	// Set current model row by int, but immediately get value from model.
+	// for compability, complex models must provide values map between
+	// integer and key value.
+	localModel.setRowIndex(index);
+	this._rowKey = localModel.getRowKey();
+	this._clientId = null;
+	boolean rowSelected = this._rowKey != null;
+
+	setupVariable(faces, localModel, rowSelected);
+	// restore child state
+	this.restoreChildState(faces);
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see javax.faces.component.UIData#getRowIndex()
+         */
+    public int getRowIndex() {
+	return getExtendedDataModel().getRowIndex();
+    }
+
+    /**
+         * Same as for int index, but for complex model key.
+         * 
+         * @return
+         */
+    public Object getRowKey() {
+	return this._rowKey;
+    }
+
+    public void setRowKey(Object key) {
+	setRowKey(FacesContext.getCurrentInstance(), key);
+    }
+
+    /**
+         * Setup current roy by key. Perform same functionality as
+         * {@link UIData#setRowIndex(int)}, but for key object - it may be not
+         * only row number in sequence data, but, for example - path to current
+         * node in tree.
+         * 
+         * @param faces -
+         *                current FacesContext
+         * @param key
+         *                new key value.
+         */
+    public void setRowKey(FacesContext faces, Object key) {
+	ExtendedDataModel localModel = getExtendedDataModel();
+	// save child state
+	this.saveChildState(faces);
+	this._rowKey = key;
+	this._clientId = null;
+	localModel.setRowKey(key);
+
+	boolean rowSelected = key != null;
+
+	setupVariable(faces, localModel, rowSelected);
+	// restore child state
+	this.restoreChildState(faces);
+
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see org.ajax4jsf.ajax.repeat.AjaxDataEncoder#getAjaxKeys()
+         */
+    public Set getAjaxKeys() {
+	Set keys = null;
+	if (this._ajaxKeys != null) {
+	    keys = (this._ajaxKeys);
+	} else {
+		ValueBinding vb = getValueBinding("ajaxKeys");
+		if (vb != null) {
+		    keys = (Set) (vb.getValue(getFacesContext()));
+		} else if(null != _ajaxRowKey){
+		    // If none of above exist , use row with submitted AjaxComponent
+		    keys = new HashSet(1);
+		    keys.add(_ajaxRowKey);
+		}
+	}
+	return keys;
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see org.ajax4jsf.ajax.repeat.AjaxDataEncoder#setAjaxKeys(java.util.Set)
+         */
+    public void setAjaxKeys(Set ajaxKeys) {
+	this._ajaxKeys = ajaxKeys;
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see org.ajax4jsf.framework.ajax.AjaxChildrenEncoder#encodeAjaxChild(javax.faces.context.FacesContext,
+         *      java.lang.String, java.util.Set, java.util.Set)
+         */
+    public void encodeAjaxChild(FacesContext context, String path,
+	    final Set ids, final Set renderedAreas) throws IOException {
+	resetDataModel();
+
+	Renderer renderer = getRenderer(context);
+	if (null != renderer && renderer instanceof AjaxChildrenRenderer) {
+	    // If renderer support partial encoding - call them.
+	    AjaxChildrenRenderer childrenRenderer = (AjaxChildrenRenderer) renderer;
+	    childrenRenderer.encodeAjaxChildren(context, this, path, ids,
+		    renderedAreas);
+	} else {
+	    // Use simple ajax children encoding for iterate other keys.
+	    final AjaxChildrenRenderer childrenRenderer = getChildrenRenderer();
+	    final String childrenPath = path + getId() + NamingContainer.SEPARATOR_CHAR;
+	    ComponentVisitor ajaxVisitor = new ComponentVisitor() {
+
+		public void processComponent(FacesContext context,
+			UIComponent c, Object argument) throws IOException {
+		    childrenRenderer.encodeAjaxComponent(context, c, childrenPath,
+			    ids, renderedAreas);
+		}
+
+	    };
+	    Set ajaxKeys = getAjaxKeys();
+	    if (null != ajaxKeys) {
+		captureOrigValue();
+		Object savedKey = getRowKey();
+		setRowKey(context, null);
+		Iterator fixedChildren = fixedChildren();
+		while (fixedChildren.hasNext()) {
+		    UIComponent component = (UIComponent) fixedChildren.next();
+		    ajaxVisitor.processComponent(context, component, null);
+		}
+		for (Iterator iter = ajaxKeys.iterator(); iter.hasNext();) {
+		    Object key = (Object) iter.next();
+		    ajaxVisitor.process(context, key, null);
+		}
+		setRowKey(savedKey);
+		restoreOrigValue();
+	    } else {
+		iterate(context, ajaxVisitor, null);
+	    }
+	}
+    }
+
+    /**
+         * Instance of default renderer in ajax responses.
+         */
+    private AjaxChildrenRenderer _childrenRenderer = null;
+
+    /**
+         * getter for simple {@link AjaxChildrenRenderer} instance in case of
+         * ajax responses. If default renderer not support search of children
+         * for encode in ajax response, component will use this instance by
+         * default.
+         * 
+         * @return
+         */
+    protected AjaxChildrenRenderer getChildrenRenderer() {
+	if (_childrenRenderer == null) {
+	    _childrenRenderer = new AjaxChildrenRenderer() {
+
+		protected Class getComponentClass() {
+		    return UIDataAdaptor.class;
+		}
+
+	    };
+
+	}
+
+	return _childrenRenderer;
+    }
+
+    /**
+         * @return Set of values for clientId's of this component, for wich was
+         *         invoked "encode" methods.
+         */
+    protected Set getEncodedIds() {
+	if (_encoded == null) {
+	    _encoded = new HashSet();
+	}
+
+	return _encoded;
+    }
+
+    /**
+         * Setup EL variable for different iteration. Value of row data and
+         * component state will be put into request scope attributes with names
+         * given by "var" and "varState" bean properties.
+         * 
+         * @param faces
+         *                current faces context
+         * @param localModel
+         * @param rowSelected
+         */
+    protected void setupVariable(FacesContext faces, DataModel localModel,
+	    boolean rowSelected) {
+	Map attrs = faces.getExternalContext().getRequestMap();
+	if (rowSelected && isRowAvailable()) {
+	    // Current row data.
+	    setupVariable(getVar(), attrs, localModel.getRowData());
+	    // Component state variable.
+	    setupVariable(getStateVar(), attrs, getComponentState());
+	    // Row key Data variable.
+	    setupVariable(getRowKeyVar(), attrs, getRowKey());
+
+	} else {
+	    removeVariable(getVar(), attrs);
+	    removeVariable(getStateVar(), attrs);
+	    removeVariable(getRowKeyVar(), attrs);
+	}
+    }
+
+    /**
+         * @param var
+         * @param attrs
+         * @param rowData
+         */
+    private void setupVariable(String var, Map attrs, Object rowData) {
+	if (var != null) {
+	    attrs.put(var, rowData);
+	}
+    }
+
+    /**
+         * @param var
+         * @param attrs
+         * @param rowData
+         */
+    private void removeVariable(String var, Map attrs) {
+	if (var != null) {
+	    attrs.remove(var);
+	}
+    }
+
+    /**
+         * Reset data model. this method must be called twice per request -
+         * before decode phase and before component encoding.
+         */
+    protected void resetDataModel() {
+	this.setExtendedDataModel(null);
+    }
+
+    /**
+         * Set data model. Model value will be stored in Map with key as current
+         * clientId for this component, to keep models between phases for same
+         * iteration in case if this component child for other UIData
+         * 
+         * @param model
+         */
+    protected void setExtendedDataModel(ExtendedDataModel model) {
+	this._currentModel = model;
+	this._modelsMap.put(getBaseClientId(getFacesContext()), model);
+    }
+
+    /**
+         * Get current data model, or create it by {@link #createDataModel()}
+         * method. For different iterations in ancestor UIData ( if present )
+         * will be returned different models.
+         * 
+         * @return current data model.
+         */
+    protected ExtendedDataModel getExtendedDataModel() {
+	if (this._currentModel == null) {
+	    String baseClientId = getBaseClientId(getFacesContext());
+	    ExtendedDataModel model = (ExtendedDataModel) this._modelsMap
+		    .get(baseClientId);
+	    if (null == model) {
+		model = createDataModel();
+		this._modelsMap.put(baseClientId, model);
+	    }
+	    this._currentModel = model;
+	}
+	return this._currentModel;
+    }
+
+    /**
+         * Hook mathod for create data model in concrete implementations.
+         * 
+         * @return
+         */
+    protected abstract ExtendedDataModel createDataModel();
+
+    /**
+         * Set current state ( at most cases, visual representation ) of this
+         * component. Same as for DataModel, component will keep states for
+         * different iterations.
+         * 
+         * @param state
+         */
+    public void setComponentState(DataComponentState state) {
+	this._currentState = state;
+	this._statesMap.put(getBaseClientId(getFacesContext()),
+		this._currentState);
+    }
+
+    /**
+         * @return current state of this component.
+         */
+    public DataComponentState getComponentState() {
+	DataComponentState state = null;
+	if (this._currentState == null) {
+	    // Check for binding state to user bean.
+	    ValueBinding valueBinding = getValueBinding(UIDataAdaptor.COMPONENT_STATE_ATTRIBUTE);
+	    FacesContext facesContext = getFacesContext();
+	    if (null != valueBinding) {
+		state = (DataComponentState) valueBinding
+			.getValue(facesContext);
+		if (null == state) {
+		    // Create default state
+		    state = createComponentState();
+		    if (!valueBinding.isReadOnly(facesContext)) {
+			// Store created state in user bean.
+			valueBinding.setValue(facesContext, state);
+		    }
+		}
+	    } else {
+		// Check for stored state in map for parent iterations
+		String baseClientId = getBaseClientId(facesContext);
+		state = (DataComponentState) this._statesMap.get(baseClientId);
+		if (null == state) {
+		    // Create default component state
+		    state = createComponentState();
+		    this._statesMap.put(baseClientId, state);
+		}
+		this._currentState = state;
+	    }
+	} else {
+	    state = this._currentState;
+	}
+	return state;
+    }
+
+    /**
+         * Hook method for create default state in concrete implementations.
+         * 
+         * @return
+         */
+    protected abstract DataComponentState createComponentState();
+
+    private String _clientId = null;
+
+    public String getClientId(FacesContext faces) {
+	if (null == _clientId) {
+	    StringBuffer id = new StringBuffer(getBaseClientId(faces));
+	    Object rowKey = getRowKey();
+	    if (rowKey != null) {
+		id.append(NamingContainer.SEPARATOR_CHAR).append(
+			rowKey.toString());
+	    }
+	    Renderer renderer;
+	    if (null != (renderer = getRenderer(faces))) {
+		_clientId = renderer.convertClientId(faces, id.toString());
+	    } else {
+		_clientId = id.toString();
+	    }
+
+	}
+	return _clientId;
+    }
+
+    private String _baseClientId = null;
+
+    /**
+         * Get base clietntId of this component ( withowt iteration part )
+         * 
+         * @param faces
+         * @return
+         */
+    public String getBaseClientId(FacesContext faces) {
+	// Return any previously cached client identifier
+	if (_baseClientId == null) {
+
+	    // Search for an ancestor that is a naming container
+	    UIComponent ancestorContainer = this;
+	    StringBuffer parentIds = new StringBuffer();
+	    while (null != (ancestorContainer = ancestorContainer.getParent())) {
+		if (ancestorContainer instanceof NamingContainer) {
+		    parentIds.append(ancestorContainer.getClientId(faces))
+			    .append(NamingContainer.SEPARATOR_CHAR);
+		    break;
+		}
+	    }
+	    String id = getId();
+	    if (null != id) {
+		_baseClientId = parentIds.append(id).toString();
+	    } else {
+		_baseClientId = parentIds.append(
+			faces.getViewRoot().createUniqueId()).toString();
+	    }
+	}
+	return (_baseClientId);
+
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see javax.faces.component.UIComponentBase#setId(java.lang.String)
+         */
+    public void setId(String id) {
+	// If component created by restoring tree or JSP, initial Id is null.
+	boolean haveId = null != super.getId();
+	super.setId(id);
+	_baseClientId = null;
+	_clientId = null;
+	if (haveId) {
+	    // parent UIData ( if present ) will be set same Id at iteration
+	    // -
+	    // we use it for
+	    // switch to different model and state.
+	    String baseClientId = getBaseClientId(getFacesContext());
+	    this._currentState = (DataComponentState) this._statesMap
+		    .get(baseClientId);
+	    this._currentModel = (ExtendedDataModel) this._modelsMap
+		    .get(baseClientId);
+	    if (null != this._currentModel) {
+		this._rowKey = this._currentModel.getRowKey();
+		// restoreChildState();
+	    }
+	    // Restore value for row with submitted AjaxComponent.
+	    this._ajaxRowKey = _ajaxRowKeysMap.get(baseClientId);
+	}
+    }
+
+    private Object origValue;
+
+    /**
+         * Save current state of data variable.
+         */
+    public void captureOrigValue() {
+	captureOrigValue(FacesContext.getCurrentInstance());
+    }
+
+    /**
+         * Save current state of data variable.
+         * 
+         * @param faces
+         *                current faces context
+         */
+    public void captureOrigValue(FacesContext faces) {
+	String var = getVar();
+	if (var != null) {
+	    Map attrs = faces.getExternalContext().getRequestMap();
+	    this.origValue = attrs.get(var);
+	}
+    }
+
+    /**
+         * Restore value of data variable after processing phase.
+         */
+    public void restoreOrigValue() {
+	restoreOrigValue(FacesContext.getCurrentInstance());
+    }
+
+    /**
+         * Restore value of data variable after processing phase.
+         * 
+         * @param faces
+         *                current faces context
+         */
+    public void restoreOrigValue(FacesContext faces) {
+	String var = getVar();
+	if (var != null) {
+	    Map attrs = faces.getExternalContext().getRequestMap();
+	    if (this.origValue != null) {
+		attrs.put(var, this.origValue);
+	    } else {
+		attrs.remove(var);
+	    }
+	}
+    }
+
+    /**
+         * Saved values of {@link EditableValueHolder} fields per iterations.
+         */
+    private Map childState;
+
+    /**
+         * @param faces
+         * @return Saved values of {@link EditableValueHolder} fields per
+         *         iterations.
+         */
+    protected Map getChildState(FacesContext faces) {
+	if (this.childState == null) {
+	    this.childState = new HashMap();
+	}
+	String baseClientId = getBaseClientId(faces);
+	Map currentChildState = (Map) childState.get(baseClientId);
+	if (null == currentChildState) {
+	    currentChildState = new HashMap();
+	    childState.put(baseClientId, currentChildState);
+	}
+	return currentChildState;
+    }
+
+    /**
+         * Save values of {@link EditableValueHolder} fields before change
+         * current row.
+         * 
+         * @param faces
+         */
+    protected void saveChildState(FacesContext faces) {
+
+	Iterator itr = dataChildren();
+	while (itr.hasNext()) {
+	    Map childState = this.getChildState(faces);
+	    this.saveChildState(faces, (UIComponent) itr.next(), childState);
+	}
+    }
+
+    /**
+         * Recursive method for Iterate on children for save
+         * {@link EditableValueHolder} fields states.
+         * 
+         * @param faces
+         * @param c
+         * @param childState
+         */
+    private void saveChildState(FacesContext faces, UIComponent c,
+	    Map childState) {
+
+	if (c instanceof EditableValueHolder && !c.isTransient()) {
+	    String clientId = c.getClientId(faces);
+	    SavedState ss = (SavedState) childState.get(clientId);
+	    if (ss == null) {
+		ss = new SavedState();
+		childState.put(clientId, ss);
+	    }
+	    ss.populate((EditableValueHolder) c);
+	}
+
+	// continue hack
+	Iterator itr = c.getChildren().iterator();
+	while (itr.hasNext()) {
+	    saveChildState(faces, (UIComponent) itr.next(), childState);
+	}
+	itr = c.getFacets().values().iterator();
+	while (itr.hasNext()) {
+	    saveChildState(faces, (UIComponent) itr.next(), childState);
+	}
+    }
+
+    /**
+         * Restore values of {@link EditableValueHolder} fields after change
+         * current row.
+         * 
+         * @param faces
+         */
+    protected void restoreChildState(FacesContext faces) {
+
+	Iterator itr = dataChildren();
+	while (itr.hasNext()) {
+	    Map childState = this.getChildState(faces);
+	    this.restoreChildState(faces, (UIComponent) itr.next(), childState);
+	}
+    }
+
+    /**
+         * Recursive part of
+         * {@link #restoreChildState(FacesContext, UIComponent, Map)}
+         * 
+         * @param faces
+         * @param c
+         * @param childState
+         * 
+         */
+    private void restoreChildState(FacesContext faces, UIComponent c,
+	    Map childState) {
+	// reset id
+	String id = c.getId();
+	c.setId(id);
+
+	// hack
+	if (c instanceof EditableValueHolder) {
+	    EditableValueHolder evh = (EditableValueHolder) c;
+	    String clientId = c.getClientId(faces);
+	    SavedState ss = (SavedState) childState.get(clientId);
+	    if (ss != null) {
+		ss.apply(evh);
+	    } else {
+		NullState.apply(evh);
+	    }
+	}
+
+	// continue hack
+	Iterator itr = c.getChildren().iterator();
+	while (itr.hasNext()) {
+	    restoreChildState(faces, (UIComponent) itr.next(), childState);
+	}
+	itr = c.getFacets().values().iterator();
+	while (itr.hasNext()) {
+	    restoreChildState(faces, (UIComponent) itr.next(), childState);
+	}
+    }
+
+    /**
+         * Check for validation errors on children components. If true, saved
+         * values must be keep on render phase
+         * 
+         * @param context
+         * @return
+         */
+    private boolean keepSaved(FacesContext context) {
+
+	Iterator clientIds = this.getChildState(context).keySet().iterator();
+	while (clientIds.hasNext()) {
+	    String clientId = (String) clientIds.next();
+	    Iterator messages = context.getMessages(clientId);
+	    while (messages.hasNext()) {
+		FacesMessage message = (FacesMessage) messages.next();
+		if (message.getSeverity()
+			.compareTo(FacesMessage.SEVERITY_ERROR) >= 0) {
+		    return (true);
+		}
+	    }
+	}
+	return false;
+    }
+
+    /**
+         * Perform iteration on all children components and all data rows with
+         * given visitor.
+         * 
+         * @param faces
+         * @param visitor
+         */
+    protected void iterate(FacesContext faces, ComponentVisitor visitor,
+	    Object argument) {
+
+	// stop if not rendered
+	if (!this.isRendered()) {
+	    return;
+	}
+	// reset rowIndex
+	this.captureOrigValue(faces);
+	this.setRowKey(faces, null);
+	try {
+	    Iterator fixedChildren = fixedChildren();
+	    while (fixedChildren.hasNext()) {
+		UIComponent component = (UIComponent) fixedChildren.next();
+		visitor.processComponent(faces, component, argument);
+	    }
+
+	    walk(faces, visitor, argument);
+	} catch (Exception e) {
+	    throw new FacesException(e);
+	} finally {
+	    this.setRowKey(faces, null);
+	    this.restoreOrigValue(faces);
+	}
+    }
+
+    /**
+         * Walk ( visit ) this component on all data-avare children for each
+         * row.
+         * 
+         * @param faces
+         * @param visitor
+         * @throws IOException
+         */
+    public void walk(FacesContext faces, DataVisitor visitor, Object argument)
+	    throws IOException {
+	getExtendedDataModel().walk(faces, visitor,
+		getComponentState().getRange(), argument);
+    }
+
+    protected void processDecodes(FacesContext faces, Object argument) {
+	if (!this.isRendered())
+	    return;
+	this.resetComponent(faces);
+	this.iterate(faces, decodeVisitor, argument);
+	this.decode(faces);
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see javax.faces.component.UIData#processDecodes(javax.faces.context.FacesContext)
+         */
+    public void processDecodes(FacesContext faces) {
+	processDecodes(faces, null);
+    }
+
+    /**
+         * Reset per-request fields in component.
+         * 
+         * @param faces
+         * 
+         */
+    protected void resetComponent(FacesContext faces) {
+	// resetDataModel();
+	if (null != this.childState) {
+	    childState.remove(getBaseClientId(faces));
+	}
+	this._encoded = null;
+    }
+
+    protected void processUpdates(FacesContext faces, Object argument) {
+	if (!this.isRendered())
+	    return;
+	this.iterate(faces, updateVisitor, argument);
+	ExtendedDataModel dataModel = getExtendedDataModel();
+	// If no validation errors, update values for serializable model,
+	// restored from view.
+	if (dataModel instanceof SerializableDataModel && (!keepSaved(faces))) {
+	    SerializableDataModel serializableModel = (SerializableDataModel) dataModel;
+	    serializableModel.update();
+	}
+    }
+
+    public void processUpdates(FacesContext faces) {
+	processUpdates(faces, null);
+    }
+
+    protected void processValidators(FacesContext faces, Object argument) {
+	if (!this.isRendered())
+	    return;
+	this.iterate(faces, validateVisitor, argument);
+    }
+
+    public void processValidators(FacesContext faces) {
+	processValidators(faces, null);
+    }
+
+    public void encodeBegin(FacesContext context) throws IOException {
+	resetDataModel();
+	// if(!keepSaved(context)){
+	// childState.remove(getBaseClientId(context));
+	// }
+	// Mark component as used, if parent UIData change own range states not
+	// accessed at
+	// encode phase must be unsaved.
+	getEncodedIds().add(getBaseClientId(context));
+	// getComponentState().setUsed(true);
+	super.encodeBegin(context);
+    }
+
+    /**
+         * This method must create iterator for all non-data avare children of
+         * this component ( header/footer facets for components and columns in
+         * dataTable, facets for tree etc.
+         * 
+         * @return iterator for all components not sensitive for row data.
+         */
+    protected abstract Iterator fixedChildren();
+
+    /**
+         * This method must create iterator for all children components,
+         * processed "per row" It can be children of UIColumn in dataTable,
+         * nodes in tree
+         * 
+         * @return iterator for all components processed per row.
+         */
+    protected abstract Iterator dataChildren();
+
+    private final static SavedState NullState = new SavedState();
+
+    // from RI
+    /**
+         * This class keep values of {@link EditableValueHolder} row-sensitive
+         * fields.
+         * 
+         * @author shura
+         * 
+         */
+    private final static class SavedState implements Serializable {
+
+	private Object submittedValue;
+
+	private static final long serialVersionUID = 2920252657338389849L;
+
+	Object getSubmittedValue() {
+	    return (this.submittedValue);
+	}
+
+	void setSubmittedValue(Object submittedValue) {
+	    this.submittedValue = submittedValue;
+	}
+
+	private boolean valid = true;
+
+	boolean isValid() {
+	    return (this.valid);
+	}
+
+	void setValid(boolean valid) {
+	    this.valid = valid;
+	}
+
+	private Object value;
+
+	Object getValue() {
+	    return (this.value);
+	}
+
+	public void setValue(Object value) {
+	    this.value = value;
+	}
+
+	private boolean localValueSet;
+
+	boolean isLocalValueSet() {
+	    return (this.localValueSet);
+	}
+
+	public void setLocalValueSet(boolean localValueSet) {
+	    this.localValueSet = localValueSet;
+	}
+
+	public String toString() {
+	    return ("submittedValue: " + submittedValue + " value: " + value
+		    + " localValueSet: " + localValueSet);
+	}
+
+	public void populate(EditableValueHolder evh) {
+	    this.value = evh.getLocalValue();
+	    this.valid = evh.isValid();
+	    this.submittedValue = evh.getSubmittedValue();
+	    this.localValueSet = evh.isLocalValueSet();
+	}
+
+	public void apply(EditableValueHolder evh) {
+	    evh.setValue(this.value);
+	    evh.setValid(this.valid);
+	    evh.setSubmittedValue(this.submittedValue);
+	    evh.setLocalValueSet(this.localValueSet);
+	}
+
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see javax.faces.component.UIData#queueEvent(javax.faces.event.FacesEvent)
+         */
+    public void queueEvent(FacesEvent event) {
+	if (event.getComponent() != this) {
+	    event = new IndexedEvent(this, event, getRowKey());
+	}
+	// Send event directly to parent, to avoid wrapping in superclass.
+	UIComponent parent = getParent();
+	if (parent == null) {
+	    throw new IllegalStateException(
+		    "No parent component for queue event");
+	} else {
+	    parent.queueEvent(event);
+	}
+    }
+
+    public void broadcast(FacesEvent event) throws AbortProcessingException {
+
+	if (!(event instanceof IndexedEvent)) {
+	    if (!broadcastLocal(event)) {
+		super.broadcast(event);
+	    }
+	    return;
+	}
+
+	// Set up the correct context and fire our wrapped event
+	IndexedEvent revent = (IndexedEvent) event;
+	Object oldRowKey = getRowKey();
+	FacesContext faces = FacesContext.getCurrentInstance();
+	captureOrigValue(faces);
+	Object eventRowKey = revent.getKey();
+	setRowKey(faces, eventRowKey);
+	FacesEvent rowEvent = revent.getTarget();
+	rowEvent.getComponent().broadcast(rowEvent);
+	// For Ajax events, keep row value.
+	if (!(rowEvent.getPhaseId() == PhaseId.RENDER_RESPONSE)) {
+	    this._ajaxRowKey = eventRowKey;
+	    this._ajaxRowKeysMap.put(getBaseClientId(faces), eventRowKey);
+	}
+	setRowKey(faces, oldRowKey);
+	restoreOrigValue(faces);
+	// }
+	return;
+    }
+
+    /**
+         * Process events targetted for concrete implementation. Hook method
+         * called from {@link #broadcast(FacesEvent)}
+         * 
+         * @param event -
+         *                processed event.
+         * @return true if event processed, false if component must continue
+         *         processing.
+         */
+    protected boolean broadcastLocal(FacesEvent event) {
+	return false;
+    }
+
+    /**
+         * Wrapper for event from child component, with value of current row
+         * key.
+         * 
+         * @author shura
+         * 
+         */
+    protected static final class IndexedEvent extends FacesEvent {
+
+	private static final long serialVersionUID = -8318895390232552385L;
+
+	private final FacesEvent target;
+
+	private final Object key;
+
+	public IndexedEvent(UIDataAdaptor owner, FacesEvent target, Object key) {
+	    super(owner);
+	    this.target = target;
+	    this.key = key;
+	}
+
+	public PhaseId getPhaseId() {
+	    return (this.target.getPhaseId());
+	}
+
+	public void setPhaseId(PhaseId phaseId) {
+	    this.target.setPhaseId(phaseId);
+	}
+
+	public boolean isAppropriateListener(FacesListener listener) {
+	    return this.target.isAppropriateListener(listener);
+	}
+
+	public void processListener(FacesListener listener) {
+	    UIDataAdaptor owner = (UIDataAdaptor) this.getComponent();
+	    Object prevIndex = owner._rowKey;
+	    try {
+		owner.setRowKey(this.key);
+		this.target.processListener(listener);
+	    } finally {
+		owner.setRowKey(prevIndex);
+	    }
+	}
+
+	public Object getKey() {
+	    return key;
+	}
+
+	public FacesEvent getTarget() {
+	    return target;
+	}
+
+    }
+
+    /**
+         * "memento" pattern class for state of component.
+         * 
+         * @author shura
+         * 
+         */
+    private static class DataState implements Serializable {
+
+	/**
+         * 
+         */
+	private static final long serialVersionUID = 17070532L;
+
+	private Object superState;
+
+	private Map componentStates = new HashMap();
+
+	private Set ajaxKeys;
+
+	public String rowKeyVar;
+
+	public String stateVar;
+
+    }
+
+    /**
+         * Serialisable model and component state per iteration of parent
+         * UIData.
+         * 
+         * @author shura
+         * 
+         */
+    private static class PerIdState implements Serializable {
+	/**
+         * 
+         */
+	private static final long serialVersionUID = 9037454770537726418L;
+
+	/**
+         * Flag setted to true if componentState implements StateHolder
+         */
+	private boolean stateInHolder = false;
+
+	/**
+         * Serializable componentState or
+         */
+	private Object componentState;
+
+	private SerializableDataModel model;
+    }
+
+    public void restoreState(FacesContext faces, Object object) {
+	DataState state = (DataState) object;
+	super.restoreState(faces, state.superState);
+	this._ajaxKeys = state.ajaxKeys;
+	this._statesMap = new HashMap();
+	this._rowKeyVar = state.rowKeyVar;
+	this._stateVar = state.stateVar;
+	// Restore serializable models and component states for all rows of
+	// parent UIData ( single if this
+	// component not child of iterable )
+	for (Iterator iter = state.componentStates.entrySet().iterator(); iter
+		.hasNext();) {
+	    Map.Entry stateEntry = (Map.Entry) iter.next();
+	    PerIdState idState = (PerIdState) stateEntry.getValue();
+	    DataComponentState compState;
+	    if (idState.stateInHolder) {
+		// TODO - change RichFaces Tree component, for remove reference
+		// to component from state.
+		compState = createComponentState();
+		((StateHolder) compState).restoreState(faces,
+			idState.componentState);
+	    } else {
+		compState = (DataComponentState) idState.componentState;
+	    }
+	    Object key = stateEntry.getKey();
+	    this._statesMap.put(key, compState);
+	    this._modelsMap.put(key, idState.model);
+	}
+    }
+
+    public Object saveState(FacesContext faces) {
+	DataState state = new DataState();
+	state.superState = super.saveState(faces);
+	state.ajaxKeys = this._ajaxKeys;
+	state.rowKeyVar = this._rowKeyVar;
+	state.stateVar = this._stateVar;
+	Set encodedIds = getEncodedIds();
+	// Save all states of component and data model for all valies of
+	// clientId, encoded in this request.
+	for (Iterator iter = this._statesMap.entrySet().iterator(); iter
+		.hasNext();) {
+	    Map.Entry stateEntry = (Map.Entry) iter.next();
+	    DataComponentState dataComponentState = ((DataComponentState) stateEntry
+		    .getValue());
+	    Object stateKey = stateEntry.getKey();
+	    if (encodedIds.isEmpty() || encodedIds.contains(stateKey)) {
+		PerIdState idState = new PerIdState();
+		idState.model = getExtendedDataModel().getSerializableModel(
+			dataComponentState.getRange());
+		// Save component state , depended if implemented interfaces.
+		if (null == dataComponentState) {
+		    idState.componentState = null;
+		} else if (dataComponentState instanceof Serializable) {
+		    idState.componentState = dataComponentState;
+		} else if (dataComponentState instanceof StateHolder) {
+		    // TODO - change RichFaces Tree component, for remove
+		    // reference to component from state.
+		    // Change this code to reference for saveAttachedState.
+		    idState.componentState = ((StateHolder) dataComponentState)
+			    .saveState(faces);
+		    idState.stateInHolder = true;
+		}
+		if (null != idState.model || null != idState.componentState) {
+		    state.componentStates.put(stateKey, idState);
+		}
+	    }
+	}
+	return state;
+    }
+
+    public void setParent(UIComponent parent) {
+	    super.setParent(parent);
+	    this._clientId = null;
+	    this._baseClientId = null;
+    }
+
+
+}
Modified: branches/refactor1/samples/useCases/src/main/java/org/ajax4jsf/RepeatData.java
===================================================================
--- branches/refactor1/samples/useCases/src/main/java/org/ajax4jsf/RepeatData.java	2007-06-30 00:04:34 UTC (rev 1428)
+++ branches/refactor1/samples/useCases/src/main/java/org/ajax4jsf/RepeatData.java	2007-06-30 00:13:26 UTC (rev 1429)
@@ -39,6 +39,11 @@
 	}
     }
 
+    public String ok(){
+		System.out.println("Row command pressed");
+		return null;
+	    }
+
     /**
      * @return the data
      */
Modified: branches/refactor1/samples/useCases/src/main/webapp/pages/repeat.xhtml
===================================================================
--- branches/refactor1/samples/useCases/src/main/webapp/pages/repeat.xhtml	2007-06-30 00:04:34 UTC (rev 1428)
+++ branches/refactor1/samples/useCases/src/main/webapp/pages/repeat.xhtml	2007-06-30 00:13:26 UTC (rev 1429)
@@ -31,8 +31,8 @@
 				<ol>
 					<a4j:repeat value="#{row.data}" var="row1" id="r1">
 						<li><h:inputText value="#{row1.text}"></h:inputText> <h:outputText
-							id="text1" value="#{row1.text}"></h:outputText> <a4j:commandButton
-							value="Up" reRender="text1"></a4j:commandButton></li>
+							id="text1" value="#{row1.text}"></h:outputText> <a4j:commandLink
+							value="Up" action="#{row1.ok}" reRender="text1"></a4j:commandLink></li>
 					</a4j:repeat>
 				</ol>
 				</li>
                                
                         
                        
                                
                                18 years, 4 months
                        
                        
                 
         
 
        
            
        
        
        
                
                        
                                
                                
                                        
                                
                         
                        
                                
                                
                                        
                                                
                                        
                                        
                                        JBoss Rich Faces SVN: r1428 - branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat.
                                
                                
                                
                                    
                                        by richfaces-svn-commits@lists.jboss.org
                                    
                                
                                
                                        Author: alexsmirnov
Date: 2007-06-29 20:04:34 -0400 (Fri, 29 Jun 2007)
New Revision: 1428
Modified:
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/UIDataAdaptor.java
Log:
restore UIDataAdaptor ajax functions
Modified: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/UIDataAdaptor.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/UIDataAdaptor.java	2007-06-30 00:03:04 UTC (rev 1427)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/UIDataAdaptor.java	2007-06-30 00:04:34 UTC (rev 1428)
@@ -47,6 +47,7 @@
 import javax.faces.model.ListDataModel;
 import javax.faces.render.Renderer;
 
+import org.ajax4jsf.framework.renderer.AjaxChildrenRenderer;
 import org.ajax4jsf.framework.renderer.AjaxRenderer;
 
 /**
@@ -362,7 +363,7 @@
 	    childrenRenderer.encodeAjaxChildren(context, this, path, ids,
 		    renderedAreas);
 	}
-	/*else {
+	else {
 	    // Use simple ajax children encoding for iterate other keys.
 	    final AjaxRenderer childrenRenderer = getChildrenRenderer();
 	    final String childrenPath = path + getId() + NamingContainer.SEPARATOR_CHAR;
@@ -394,7 +395,7 @@
 	    } else {
 		iterate(context, ajaxVisitor, null);
 	    }
-	}*/
+	}
     }
 
     /**
@@ -410,21 +411,21 @@
          * 
          * @return
          */
-//    protected AjaxRenderer getChildrenRenderer() {
-//	if (_childrenRenderer == null) {
-//	    _childrenRenderer = new AjaxChildrenRenderer() {
-//
-//		protected Class getComponentClass() {
-//		    return UIDataAdaptor.class;
-//		}
-//
-//	    };
-//
-//	}
-//
-//	return _childrenRenderer;
-//    }
+    protected AjaxRenderer getChildrenRenderer() {
+	if (_childrenRenderer == null) {
+	    _childrenRenderer = new AjaxChildrenRenderer() {
 
+		protected Class getComponentClass() {
+		    return UIDataAdaptor.class;
+		}
+
+	    };
+
+	}
+
+	return _childrenRenderer;
+    }
+
     /**
          * @return Set of values for clientId's of this component, for wich was
          *         invoked "encode" methods.
                                
                         
                        
                                
                                18 years, 4 months
                        
                        
                 
         
 
        
            
        
        
        
                
                        
                                
                                
                                        
                                
                         
                        
                                
                                
                                        
                                                
                                        
                                        
                                        JBoss Rich Faces SVN: r1427 - in branches/refactor1: framework/impl/src/main/java/org/ajax4jsf/ajax/repeat and 1 other directories.
                                
                                
                                
                                    
                                        by richfaces-svn-commits@lists.jboss.org
                                    
                                
                                
                                        Author: alexsmirnov
Date: 2007-06-29 20:03:04 -0400 (Fri, 29 Jun 2007)
New Revision: 1427
Added:
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/UIDataAdaptor.java
Removed:
   branches/refactor1/framework/api/src/main/java/org/ajax4jsf/ajax/repeat/UIDataAdaptor.java
Modified:
   branches/refactor1/ui/core/src/main/java/org/ajax4jsf/renderkit/html/RepeatRenderer.java
Log:
move UIDataAdaptor into implementation project
Deleted: branches/refactor1/framework/api/src/main/java/org/ajax4jsf/ajax/repeat/UIDataAdaptor.java
===================================================================
--- branches/refactor1/framework/api/src/main/java/org/ajax4jsf/ajax/repeat/UIDataAdaptor.java	2007-06-29 23:59:08 UTC (rev 1426)
+++ branches/refactor1/framework/api/src/main/java/org/ajax4jsf/ajax/repeat/UIDataAdaptor.java	2007-06-30 00:03:04 UTC (rev 1427)
@@ -1,1322 +0,0 @@
-/**
- * License Agreement.
- *
- * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- */
-
-package org.ajax4jsf.ajax.repeat;
-
-import java.io.IOException;
-import java.io.Serializable;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-
-import javax.faces.FacesException;
-import javax.faces.application.FacesMessage;
-import javax.faces.component.EditableValueHolder;
-import javax.faces.component.NamingContainer;
-import javax.faces.component.StateHolder;
-import javax.faces.component.UIComponent;
-import javax.faces.component.UIData;
-import javax.faces.context.FacesContext;
-import javax.faces.el.ValueBinding;
-import javax.faces.event.AbortProcessingException;
-import javax.faces.event.FacesEvent;
-import javax.faces.event.FacesListener;
-import javax.faces.event.PhaseId;
-import javax.faces.model.DataModel;
-import javax.faces.model.ListDataModel;
-import javax.faces.render.Renderer;
-
-import org.ajax4jsf.framework.renderer.AjaxRenderer;
-
-/**
- * Base class for iterable components, like dataTable, Tomahawk dataList,
- * Facelets repeat, tree etc., with support for partial rendering on AJAX
- * responces for one or more selected iterations.
- * 
- * @author shura
- * 
- */
-public abstract class UIDataAdaptor extends UIData implements AjaxDataEncoder {
-
-    /**
-         * 
-         */
-    public static final String COMPONENT_STATE_ATTRIBUTE = "componentState";
-
-    public final static DataModel EMPTY_MODEL = new ListDataModel(
-	    Collections.EMPTY_LIST);
-
-    /**
-         * Base class for visit data model at phases decode, validation and
-         * update model
-         * 
-         * @author shura
-         * 
-         */
-    protected abstract class ComponentVisitor implements DataVisitor {
-
-	public void process(FacesContext context, Object rowKey, Object argument)
-		throws IOException {
-	    setRowKey(context, rowKey);
-	    if (isRowAvailable()) {
-		Iterator childIterator = dataChildren();
-		while (childIterator.hasNext()) {
-		    UIComponent component = (UIComponent) childIterator.next();
-		    processComponent(context, component, argument);
-		}
-
-	    }
-	}
-
-	public abstract void processComponent(FacesContext context,
-		UIComponent c, Object argument) throws IOException;
-
-    }
-
-    /**
-         * Visitor for process decode on children components.
-         */
-    protected ComponentVisitor decodeVisitor = new ComponentVisitor() {
-
-	public void processComponent(FacesContext context, UIComponent c,
-		Object argument) {
-	    c.processDecodes(context);
-	}
-
-    };
-
-    /**
-         * Visitor for process validation phase
-         */
-    protected ComponentVisitor validateVisitor = new ComponentVisitor() {
-
-	public void processComponent(FacesContext context, UIComponent c,
-		Object argument) {
-	    c.processValidators(context);
-	}
-
-    };
-
-    /**
-         * Visitor for process update model phase.
-         */
-    protected ComponentVisitor updateVisitor = new ComponentVisitor() {
-
-	public void processComponent(FacesContext context, UIComponent c,
-		Object argument) {
-	    c.processUpdates(context);
-	}
-
-    };
-
-    /**
-         * Base client id's of this component, for wich invoked encode...
-         * methods. Component will save state and serialisable models for this
-         * keys only.
-         */
-    private Set _encoded;
-
-    /**
-         * Storage for data model instances with different client id's of this
-         * component. In case of child for UIData component, this map will keep
-         * data models for different iterations between phases.
-         */
-    private Map _modelsMap = new HashMap();
-
-    /**
-         * Reference for curent data model
-         */
-    private ExtendedDataModel _currentModel = null;
-
-    /**
-         * States of this component for diferent iterations, same as for models.
-         */
-    private Map _statesMap = new HashMap();
-
-    /**
-         * Reference for current component state.
-         */
-    private DataComponentState _currentState = null;
-
-    /**
-         * Name of EL variable for current component state.
-         */
-    private String _stateVar;
-
-    private String _rowKeyVar;
-
-    /**
-         * Key for current value in model.
-         */
-    private Object _rowKey = null;
-
-    /**
-         * Values of row keys, encoded on ajax response rendering.
-         */
-    private Set _ajaxKeys = null;
-
-    private Object _ajaxRowKey = null;
-
-    private Map _ajaxRowKeysMap = new HashMap();
-
-    /**
-         * Get name of EL variable for component state.
-         * 
-         * @return the varState
-         */
-    public String getStateVar() {
-	return _stateVar;
-    }
-
-    /**
-         * @param varStatus
-         *                the varStatus to set
-         */
-    public void setStateVar(String varStatus) {
-	this._stateVar = varStatus;
-    }
-
-    /**
-         * @return the rowKeyVar
-         */
-    public String getRowKeyVar() {
-	return this._rowKeyVar;
-    }
-
-    /**
-         * @param rowKeyVar
-         *                the rowKeyVar to set
-         */
-    public void setRowKeyVar(String rowKeyVar) {
-	this._rowKeyVar = rowKeyVar;
-    }
-
-    /*
-         * (non-Javadoc)
-         * 
-         * @see javax.faces.component.UIData#getRowCount()
-         */
-    public int getRowCount() {
-	return getExtendedDataModel().getRowCount();
-    }
-
-    /*
-         * (non-Javadoc)
-         * 
-         * @see javax.faces.component.UIData#getRowData()
-         */
-    public Object getRowData() {
-	return getExtendedDataModel().getRowData();
-    }
-
-    /*
-         * (non-Javadoc)
-         * 
-         * @see javax.faces.component.UIData#isRowAvailable()
-         */
-    public boolean isRowAvailable() {
-	return this.getExtendedDataModel().isRowAvailable();
-    }
-
-    /*
-         * (non-Javadoc)
-         * 
-         * @see javax.faces.component.UIData#setRowIndex(int)
-         */
-    public void setRowIndex(int index) {
-	FacesContext faces = FacesContext.getCurrentInstance();
-	ExtendedDataModel localModel = getExtendedDataModel();
-	// if(key == localModel.getRowIndex()){
-	// return;
-	// }
-	// save child state
-	this.saveChildState(faces);
-	// Set current model row by int, but immediately get value from model.
-	// for compability, complex models must provide values map between
-	// integer and key value.
-	localModel.setRowIndex(index);
-	this._rowKey = localModel.getRowKey();
-	this._clientId = null;
-	boolean rowSelected = this._rowKey != null;
-
-	setupVariable(faces, localModel, rowSelected);
-	// restore child state
-	this.restoreChildState(faces);
-    }
-
-    /*
-         * (non-Javadoc)
-         * 
-         * @see javax.faces.component.UIData#getRowIndex()
-         */
-    public int getRowIndex() {
-	return getExtendedDataModel().getRowIndex();
-    }
-
-    /**
-         * Same as for int index, but for complex model key.
-         * 
-         * @return
-         */
-    public Object getRowKey() {
-	return this._rowKey;
-    }
-
-    public void setRowKey(Object key) {
-	setRowKey(FacesContext.getCurrentInstance(), key);
-    }
-
-    /**
-         * Setup current roy by key. Perform same functionality as
-         * {@link UIData#setRowIndex(int)}, but for key object - it may be not
-         * only row number in sequence data, but, for example - path to current
-         * node in tree.
-         * 
-         * @param faces -
-         *                current FacesContext
-         * @param key
-         *                new key value.
-         */
-    public void setRowKey(FacesContext faces, Object key) {
-	ExtendedDataModel localModel = getExtendedDataModel();
-	// save child state
-	this.saveChildState(faces);
-	this._rowKey = key;
-	this._clientId = null;
-	localModel.setRowKey(key);
-
-	boolean rowSelected = key != null;
-
-	setupVariable(faces, localModel, rowSelected);
-	// restore child state
-	this.restoreChildState(faces);
-
-    }
-
-    /*
-         * (non-Javadoc)
-         * 
-         * @see org.ajax4jsf.ajax.repeat.AjaxDataEncoder#getAjaxKeys()
-         */
-    public Set getAjaxKeys() {
-	Set keys = null;
-	if (this._ajaxKeys != null) {
-	    keys = (this._ajaxKeys);
-	} else {
-		ValueBinding vb = getValueBinding("ajaxKeys");
-		if (vb != null) {
-		    keys = (Set) (vb.getValue(getFacesContext()));
-		} else if(null != _ajaxRowKey){
-		    // If none of above exist , use row with submitted AjaxComponent
-		    keys = new HashSet(1);
-		    keys.add(_ajaxRowKey);
-		}
-	}
-	return keys;
-    }
-
-    /*
-         * (non-Javadoc)
-         * 
-         * @see org.ajax4jsf.ajax.repeat.AjaxDataEncoder#setAjaxKeys(java.util.Set)
-         */
-    public void setAjaxKeys(Set ajaxKeys) {
-	this._ajaxKeys = ajaxKeys;
-    }
-
-    /*
-         * (non-Javadoc)
-         * 
-         * @see org.ajax4jsf.framework.ajax.AjaxChildrenEncoder#encodeAjaxChild(javax.faces.context.FacesContext,
-         *      java.lang.String, java.util.Set, java.util.Set)
-         */
-    public void encodeAjaxChild(FacesContext context, String path,
-	    final Set ids, final Set renderedAreas) throws IOException {
-	resetDataModel();
-
-	Renderer renderer = getRenderer(context);
-	if (null != renderer && renderer instanceof AjaxRenderer) {
-	    // If renderer support partial encoding - call them.
-	    AjaxRenderer childrenRenderer = (AjaxRenderer) renderer;
-	    childrenRenderer.encodeAjaxChildren(context, this, path, ids,
-		    renderedAreas);
-	}
-	/*else {
-	    // Use simple ajax children encoding for iterate other keys.
-	    final AjaxRenderer childrenRenderer = getChildrenRenderer();
-	    final String childrenPath = path + getId() + NamingContainer.SEPARATOR_CHAR;
-	    ComponentVisitor ajaxVisitor = new ComponentVisitor() {
-
-		public void processComponent(FacesContext context,
-			UIComponent c, Object argument) throws IOException {
-		    childrenRenderer.encodeAjaxComponent(context, c, childrenPath,
-			    ids, renderedAreas);
-		}
-
-	    };
-	    Set ajaxKeys = getAjaxKeys();
-	    if (null != ajaxKeys) {
-		captureOrigValue();
-		Object savedKey = getRowKey();
-		setRowKey(context, null);
-		Iterator fixedChildren = fixedChildren();
-		while (fixedChildren.hasNext()) {
-		    UIComponent component = (UIComponent) fixedChildren.next();
-		    ajaxVisitor.processComponent(context, component, null);
-		}
-		for (Iterator iter = ajaxKeys.iterator(); iter.hasNext();) {
-		    Object key = (Object) iter.next();
-		    ajaxVisitor.process(context, key, null);
-		}
-		setRowKey(savedKey);
-		restoreOrigValue();
-	    } else {
-		iterate(context, ajaxVisitor, null);
-	    }
-	}*/
-    }
-
-    /**
-         * Instance of default renderer in ajax responses.
-         */
-    private AjaxRenderer _childrenRenderer = null;
-
-    /**
-         * getter for simple {@link AjaxChildrenRenderer} instance in case of
-         * ajax responses. If default renderer not support search of children
-         * for encode in ajax response, component will use this instance by
-         * default.
-         * 
-         * @return
-         */
-//    protected AjaxRenderer getChildrenRenderer() {
-//	if (_childrenRenderer == null) {
-//	    _childrenRenderer = new AjaxChildrenRenderer() {
-//
-//		protected Class getComponentClass() {
-//		    return UIDataAdaptor.class;
-//		}
-//
-//	    };
-//
-//	}
-//
-//	return _childrenRenderer;
-//    }
-
-    /**
-         * @return Set of values for clientId's of this component, for wich was
-         *         invoked "encode" methods.
-         */
-    protected Set getEncodedIds() {
-	if (_encoded == null) {
-	    _encoded = new HashSet();
-	}
-
-	return _encoded;
-    }
-
-    /**
-         * Setup EL variable for different iteration. Value of row data and
-         * component state will be put into request scope attributes with names
-         * given by "var" and "varState" bean properties.
-         * 
-         * @param faces
-         *                current faces context
-         * @param localModel
-         * @param rowSelected
-         */
-    protected void setupVariable(FacesContext faces, DataModel localModel,
-	    boolean rowSelected) {
-	Map attrs = faces.getExternalContext().getRequestMap();
-	if (rowSelected && isRowAvailable()) {
-	    // Current row data.
-	    setupVariable(getVar(), attrs, localModel.getRowData());
-	    // Component state variable.
-	    setupVariable(getStateVar(), attrs, getComponentState());
-	    // Row key Data variable.
-	    setupVariable(getRowKeyVar(), attrs, getRowKey());
-
-	} else {
-	    removeVariable(getVar(), attrs);
-	    removeVariable(getStateVar(), attrs);
-	    removeVariable(getRowKeyVar(), attrs);
-	}
-    }
-
-    /**
-         * @param var
-         * @param attrs
-         * @param rowData
-         */
-    private void setupVariable(String var, Map attrs, Object rowData) {
-	if (var != null) {
-	    attrs.put(var, rowData);
-	}
-    }
-
-    /**
-         * @param var
-         * @param attrs
-         * @param rowData
-         */
-    private void removeVariable(String var, Map attrs) {
-	if (var != null) {
-	    attrs.remove(var);
-	}
-    }
-
-    /**
-         * Reset data model. this method must be called twice per request -
-         * before decode phase and before component encoding.
-         */
-    protected void resetDataModel() {
-	this.setExtendedDataModel(null);
-    }
-
-    /**
-         * Set data model. Model value will be stored in Map with key as current
-         * clientId for this component, to keep models between phases for same
-         * iteration in case if this component child for other UIData
-         * 
-         * @param model
-         */
-    protected void setExtendedDataModel(ExtendedDataModel model) {
-	this._currentModel = model;
-	this._modelsMap.put(getBaseClientId(getFacesContext()), model);
-    }
-
-    /**
-         * Get current data model, or create it by {@link #createDataModel()}
-         * method. For different iterations in ancestor UIData ( if present )
-         * will be returned different models.
-         * 
-         * @return current data model.
-         */
-    protected ExtendedDataModel getExtendedDataModel() {
-	if (this._currentModel == null) {
-	    String baseClientId = getBaseClientId(getFacesContext());
-	    ExtendedDataModel model = (ExtendedDataModel) this._modelsMap
-		    .get(baseClientId);
-	    if (null == model) {
-		model = createDataModel();
-		this._modelsMap.put(baseClientId, model);
-	    }
-	    this._currentModel = model;
-	}
-	return this._currentModel;
-    }
-
-    /**
-         * Hook mathod for create data model in concrete implementations.
-         * 
-         * @return
-         */
-    protected abstract ExtendedDataModel createDataModel();
-
-    /**
-         * Set current state ( at most cases, visual representation ) of this
-         * component. Same as for DataModel, component will keep states for
-         * different iterations.
-         * 
-         * @param state
-         */
-    public void setComponentState(DataComponentState state) {
-	this._currentState = state;
-	this._statesMap.put(getBaseClientId(getFacesContext()),
-		this._currentState);
-    }
-
-    /**
-         * @return current state of this component.
-         */
-    public DataComponentState getComponentState() {
-	DataComponentState state = null;
-	if (this._currentState == null) {
-	    // Check for binding state to user bean.
-	    ValueBinding valueBinding = getValueBinding(UIDataAdaptor.COMPONENT_STATE_ATTRIBUTE);
-	    FacesContext facesContext = getFacesContext();
-	    if (null != valueBinding) {
-		state = (DataComponentState) valueBinding
-			.getValue(facesContext);
-		if (null == state) {
-		    // Create default state
-		    state = createComponentState();
-		    if (!valueBinding.isReadOnly(facesContext)) {
-			// Store created state in user bean.
-			valueBinding.setValue(facesContext, state);
-		    }
-		}
-	    } else {
-		// Check for stored state in map for parent iterations
-		String baseClientId = getBaseClientId(facesContext);
-		state = (DataComponentState) this._statesMap.get(baseClientId);
-		if (null == state) {
-		    // Create default component state
-		    state = createComponentState();
-		    this._statesMap.put(baseClientId, state);
-		}
-		this._currentState = state;
-	    }
-	} else {
-	    state = this._currentState;
-	}
-	return state;
-    }
-
-    /**
-         * Hook method for create default state in concrete implementations.
-         * 
-         * @return
-         */
-    protected abstract DataComponentState createComponentState();
-
-    private String _clientId = null;
-
-    public String getClientId(FacesContext faces) {
-	if (null == _clientId) {
-	    StringBuffer id = new StringBuffer(getBaseClientId(faces));
-	    Object rowKey = getRowKey();
-	    if (rowKey != null) {
-		id.append(NamingContainer.SEPARATOR_CHAR).append(
-			rowKey.toString());
-	    }
-	    Renderer renderer;
-	    if (null != (renderer = getRenderer(faces))) {
-		_clientId = renderer.convertClientId(faces, id.toString());
-	    } else {
-		_clientId = id.toString();
-	    }
-
-	}
-	return _clientId;
-    }
-
-    private String _baseClientId = null;
-
-    /**
-         * Get base clietntId of this component ( withowt iteration part )
-         * 
-         * @param faces
-         * @return
-         */
-    public String getBaseClientId(FacesContext faces) {
-	// Return any previously cached client identifier
-	if (_baseClientId == null) {
-
-	    // Search for an ancestor that is a naming container
-	    UIComponent ancestorContainer = this;
-	    StringBuffer parentIds = new StringBuffer();
-	    while (null != (ancestorContainer = ancestorContainer.getParent())) {
-		if (ancestorContainer instanceof NamingContainer) {
-		    parentIds.append(ancestorContainer.getClientId(faces))
-			    .append(NamingContainer.SEPARATOR_CHAR);
-		    break;
-		}
-	    }
-	    String id = getId();
-	    if (null != id) {
-		_baseClientId = parentIds.append(id).toString();
-	    } else {
-		_baseClientId = parentIds.append(
-			faces.getViewRoot().createUniqueId()).toString();
-	    }
-	}
-	return (_baseClientId);
-
-    }
-
-    /*
-         * (non-Javadoc)
-         * 
-         * @see javax.faces.component.UIComponentBase#setId(java.lang.String)
-         */
-    public void setId(String id) {
-	// If component created by restoring tree or JSP, initial Id is null.
-	boolean haveId = null != super.getId();
-	super.setId(id);
-	_baseClientId = null;
-	_clientId = null;
-	if (haveId) {
-	    // parent UIData ( if present ) will be set same Id at iteration
-	    // -
-	    // we use it for
-	    // switch to different model and state.
-	    String baseClientId = getBaseClientId(getFacesContext());
-	    this._currentState = (DataComponentState) this._statesMap
-		    .get(baseClientId);
-	    this._currentModel = (ExtendedDataModel) this._modelsMap
-		    .get(baseClientId);
-	    if (null != this._currentModel) {
-		this._rowKey = this._currentModel.getRowKey();
-		// restoreChildState();
-	    }
-	    // Restore value for row with submitted AjaxComponent.
-	    this._ajaxRowKey = _ajaxRowKeysMap.get(baseClientId);
-	}
-    }
-
-    private Object origValue;
-
-    /**
-         * Save current state of data variable.
-         */
-    public void captureOrigValue() {
-	captureOrigValue(FacesContext.getCurrentInstance());
-    }
-
-    /**
-         * Save current state of data variable.
-         * 
-         * @param faces
-         *                current faces context
-         */
-    public void captureOrigValue(FacesContext faces) {
-	String var = getVar();
-	if (var != null) {
-	    Map attrs = faces.getExternalContext().getRequestMap();
-	    this.origValue = attrs.get(var);
-	}
-    }
-
-    /**
-         * Restore value of data variable after processing phase.
-         */
-    public void restoreOrigValue() {
-	restoreOrigValue(FacesContext.getCurrentInstance());
-    }
-
-    /**
-         * Restore value of data variable after processing phase.
-         * 
-         * @param faces
-         *                current faces context
-         */
-    public void restoreOrigValue(FacesContext faces) {
-	String var = getVar();
-	if (var != null) {
-	    Map attrs = faces.getExternalContext().getRequestMap();
-	    if (this.origValue != null) {
-		attrs.put(var, this.origValue);
-	    } else {
-		attrs.remove(var);
-	    }
-	}
-    }
-
-    /**
-         * Saved values of {@link EditableValueHolder} fields per iterations.
-         */
-    private Map childState;
-
-    /**
-         * @param faces
-         * @return Saved values of {@link EditableValueHolder} fields per
-         *         iterations.
-         */
-    protected Map getChildState(FacesContext faces) {
-	if (this.childState == null) {
-	    this.childState = new HashMap();
-	}
-	String baseClientId = getBaseClientId(faces);
-	Map currentChildState = (Map) childState.get(baseClientId);
-	if (null == currentChildState) {
-	    currentChildState = new HashMap();
-	    childState.put(baseClientId, currentChildState);
-	}
-	return currentChildState;
-    }
-
-    /**
-         * Save values of {@link EditableValueHolder} fields before change
-         * current row.
-         * 
-         * @param faces
-         */
-    protected void saveChildState(FacesContext faces) {
-
-	Iterator itr = dataChildren();
-	while (itr.hasNext()) {
-	    Map childState = this.getChildState(faces);
-	    this.saveChildState(faces, (UIComponent) itr.next(), childState);
-	}
-    }
-
-    /**
-         * Recursive method for Iterate on children for save
-         * {@link EditableValueHolder} fields states.
-         * 
-         * @param faces
-         * @param c
-         * @param childState
-         */
-    private void saveChildState(FacesContext faces, UIComponent c,
-	    Map childState) {
-
-	if (c instanceof EditableValueHolder && !c.isTransient()) {
-	    String clientId = c.getClientId(faces);
-	    SavedState ss = (SavedState) childState.get(clientId);
-	    if (ss == null) {
-		ss = new SavedState();
-		childState.put(clientId, ss);
-	    }
-	    ss.populate((EditableValueHolder) c);
-	}
-
-	// continue hack
-	Iterator itr = c.getChildren().iterator();
-	while (itr.hasNext()) {
-	    saveChildState(faces, (UIComponent) itr.next(), childState);
-	}
-	itr = c.getFacets().values().iterator();
-	while (itr.hasNext()) {
-	    saveChildState(faces, (UIComponent) itr.next(), childState);
-	}
-    }
-
-    /**
-         * Restore values of {@link EditableValueHolder} fields after change
-         * current row.
-         * 
-         * @param faces
-         */
-    protected void restoreChildState(FacesContext faces) {
-
-	Iterator itr = dataChildren();
-	while (itr.hasNext()) {
-	    Map childState = this.getChildState(faces);
-	    this.restoreChildState(faces, (UIComponent) itr.next(), childState);
-	}
-    }
-
-    /**
-         * Recursive part of
-         * {@link #restoreChildState(FacesContext, UIComponent, Map)}
-         * 
-         * @param faces
-         * @param c
-         * @param childState
-         * 
-         */
-    private void restoreChildState(FacesContext faces, UIComponent c,
-	    Map childState) {
-	// reset id
-	String id = c.getId();
-	c.setId(id);
-
-	// hack
-	if (c instanceof EditableValueHolder) {
-	    EditableValueHolder evh = (EditableValueHolder) c;
-	    String clientId = c.getClientId(faces);
-	    SavedState ss = (SavedState) childState.get(clientId);
-	    if (ss != null) {
-		ss.apply(evh);
-	    } else {
-		NullState.apply(evh);
-	    }
-	}
-
-	// continue hack
-	Iterator itr = c.getChildren().iterator();
-	while (itr.hasNext()) {
-	    restoreChildState(faces, (UIComponent) itr.next(), childState);
-	}
-	itr = c.getFacets().values().iterator();
-	while (itr.hasNext()) {
-	    restoreChildState(faces, (UIComponent) itr.next(), childState);
-	}
-    }
-
-    /**
-         * Check for validation errors on children components. If true, saved
-         * values must be keep on render phase
-         * 
-         * @param context
-         * @return
-         */
-    private boolean keepSaved(FacesContext context) {
-
-	Iterator clientIds = this.getChildState(context).keySet().iterator();
-	while (clientIds.hasNext()) {
-	    String clientId = (String) clientIds.next();
-	    Iterator messages = context.getMessages(clientId);
-	    while (messages.hasNext()) {
-		FacesMessage message = (FacesMessage) messages.next();
-		if (message.getSeverity()
-			.compareTo(FacesMessage.SEVERITY_ERROR) >= 0) {
-		    return (true);
-		}
-	    }
-	}
-	return false;
-    }
-
-    /**
-         * Perform iteration on all children components and all data rows with
-         * given visitor.
-         * 
-         * @param faces
-         * @param visitor
-         */
-    protected void iterate(FacesContext faces, ComponentVisitor visitor,
-	    Object argument) {
-
-	// stop if not rendered
-	if (!this.isRendered()) {
-	    return;
-	}
-	// reset rowIndex
-	this.captureOrigValue(faces);
-	this.setRowKey(faces, null);
-	try {
-	    Iterator fixedChildren = fixedChildren();
-	    while (fixedChildren.hasNext()) {
-		UIComponent component = (UIComponent) fixedChildren.next();
-		visitor.processComponent(faces, component, argument);
-	    }
-
-	    walk(faces, visitor, argument);
-	} catch (Exception e) {
-	    throw new FacesException(e);
-	} finally {
-	    this.setRowKey(faces, null);
-	    this.restoreOrigValue(faces);
-	}
-    }
-
-    /**
-         * Walk ( visit ) this component on all data-avare children for each
-         * row.
-         * 
-         * @param faces
-         * @param visitor
-         * @throws IOException
-         */
-    public void walk(FacesContext faces, DataVisitor visitor, Object argument)
-	    throws IOException {
-	getExtendedDataModel().walk(faces, visitor,
-		getComponentState().getRange(), argument);
-    }
-
-    protected void processDecodes(FacesContext faces, Object argument) {
-	if (!this.isRendered())
-	    return;
-	this.resetComponent(faces);
-	this.iterate(faces, decodeVisitor, argument);
-	this.decode(faces);
-    }
-
-    /*
-         * (non-Javadoc)
-         * 
-         * @see javax.faces.component.UIData#processDecodes(javax.faces.context.FacesContext)
-         */
-    public void processDecodes(FacesContext faces) {
-	processDecodes(faces, null);
-    }
-
-    /**
-         * Reset per-request fields in component.
-         * 
-         * @param faces
-         * 
-         */
-    protected void resetComponent(FacesContext faces) {
-	// resetDataModel();
-	if (null != this.childState) {
-	    childState.remove(getBaseClientId(faces));
-	}
-	this._encoded = null;
-    }
-
-    protected void processUpdates(FacesContext faces, Object argument) {
-	if (!this.isRendered())
-	    return;
-	this.iterate(faces, updateVisitor, argument);
-	ExtendedDataModel dataModel = getExtendedDataModel();
-	// If no validation errors, update values for serializable model,
-	// restored from view.
-	if (dataModel instanceof SerializableDataModel && (!keepSaved(faces))) {
-	    SerializableDataModel serializableModel = (SerializableDataModel) dataModel;
-	    serializableModel.update();
-	}
-    }
-
-    public void processUpdates(FacesContext faces) {
-	processUpdates(faces, null);
-    }
-
-    protected void processValidators(FacesContext faces, Object argument) {
-	if (!this.isRendered())
-	    return;
-	this.iterate(faces, validateVisitor, argument);
-    }
-
-    public void processValidators(FacesContext faces) {
-	processValidators(faces, null);
-    }
-
-    public void encodeBegin(FacesContext context) throws IOException {
-	resetDataModel();
-	// if(!keepSaved(context)){
-	// childState.remove(getBaseClientId(context));
-	// }
-	// Mark component as used, if parent UIData change own range states not
-	// accessed at
-	// encode phase must be unsaved.
-	getEncodedIds().add(getBaseClientId(context));
-	// getComponentState().setUsed(true);
-	super.encodeBegin(context);
-    }
-
-    /**
-         * This method must create iterator for all non-data avare children of
-         * this component ( header/footer facets for components and columns in
-         * dataTable, facets for tree etc.
-         * 
-         * @return iterator for all components not sensitive for row data.
-         */
-    protected abstract Iterator fixedChildren();
-
-    /**
-         * This method must create iterator for all children components,
-         * processed "per row" It can be children of UIColumn in dataTable,
-         * nodes in tree
-         * 
-         * @return iterator for all components processed per row.
-         */
-    protected abstract Iterator dataChildren();
-
-    private final static SavedState NullState = new SavedState();
-
-    // from RI
-    /**
-         * This class keep values of {@link EditableValueHolder} row-sensitive
-         * fields.
-         * 
-         * @author shura
-         * 
-         */
-    private final static class SavedState implements Serializable {
-
-	private Object submittedValue;
-
-	private static final long serialVersionUID = 2920252657338389849L;
-
-	Object getSubmittedValue() {
-	    return (this.submittedValue);
-	}
-
-	void setSubmittedValue(Object submittedValue) {
-	    this.submittedValue = submittedValue;
-	}
-
-	private boolean valid = true;
-
-	boolean isValid() {
-	    return (this.valid);
-	}
-
-	void setValid(boolean valid) {
-	    this.valid = valid;
-	}
-
-	private Object value;
-
-	Object getValue() {
-	    return (this.value);
-	}
-
-	public void setValue(Object value) {
-	    this.value = value;
-	}
-
-	private boolean localValueSet;
-
-	boolean isLocalValueSet() {
-	    return (this.localValueSet);
-	}
-
-	public void setLocalValueSet(boolean localValueSet) {
-	    this.localValueSet = localValueSet;
-	}
-
-	public String toString() {
-	    return ("submittedValue: " + submittedValue + " value: " + value
-		    + " localValueSet: " + localValueSet);
-	}
-
-	public void populate(EditableValueHolder evh) {
-	    this.value = evh.getLocalValue();
-	    this.valid = evh.isValid();
-	    this.submittedValue = evh.getSubmittedValue();
-	    this.localValueSet = evh.isLocalValueSet();
-	}
-
-	public void apply(EditableValueHolder evh) {
-	    evh.setValue(this.value);
-	    evh.setValid(this.valid);
-	    evh.setSubmittedValue(this.submittedValue);
-	    evh.setLocalValueSet(this.localValueSet);
-	}
-
-    }
-
-    /*
-         * (non-Javadoc)
-         * 
-         * @see javax.faces.component.UIData#queueEvent(javax.faces.event.FacesEvent)
-         */
-    public void queueEvent(FacesEvent event) {
-	if (event.getComponent() != this) {
-	    event = new IndexedEvent(this, event, getRowKey());
-	}
-	// Send event directly to parent, to avoid wrapping in superclass.
-	UIComponent parent = getParent();
-	if (parent == null) {
-	    throw new IllegalStateException(
-		    "No parent component for queue event");
-	} else {
-	    parent.queueEvent(event);
-	}
-    }
-
-    public void broadcast(FacesEvent event) throws AbortProcessingException {
-
-	if (!(event instanceof IndexedEvent)) {
-	    if (!broadcastLocal(event)) {
-		super.broadcast(event);
-	    }
-	    return;
-	}
-
-	// Set up the correct context and fire our wrapped event
-	IndexedEvent revent = (IndexedEvent) event;
-	Object oldRowKey = getRowKey();
-	FacesContext faces = FacesContext.getCurrentInstance();
-	captureOrigValue(faces);
-	Object eventRowKey = revent.getKey();
-	setRowKey(faces, eventRowKey);
-	FacesEvent rowEvent = revent.getTarget();
-	rowEvent.getComponent().broadcast(rowEvent);
-	// For Ajax events, keep row value.
-	if (!(rowEvent.getPhaseId() == PhaseId.RENDER_RESPONSE)) {
-	    this._ajaxRowKey = eventRowKey;
-	    this._ajaxRowKeysMap.put(getBaseClientId(faces), eventRowKey);
-	}
-	setRowKey(faces, oldRowKey);
-	restoreOrigValue(faces);
-	// }
-	return;
-    }
-
-    /**
-         * Process events targetted for concrete implementation. Hook method
-         * called from {@link #broadcast(FacesEvent)}
-         * 
-         * @param event -
-         *                processed event.
-         * @return true if event processed, false if component must continue
-         *         processing.
-         */
-    protected boolean broadcastLocal(FacesEvent event) {
-	return false;
-    }
-
-    /**
-         * Wrapper for event from child component, with value of current row
-         * key.
-         * 
-         * @author shura
-         * 
-         */
-    protected static final class IndexedEvent extends FacesEvent {
-
-	private static final long serialVersionUID = -8318895390232552385L;
-
-	private final FacesEvent target;
-
-	private final Object key;
-
-	public IndexedEvent(UIDataAdaptor owner, FacesEvent target, Object key) {
-	    super(owner);
-	    this.target = target;
-	    this.key = key;
-	}
-
-	public PhaseId getPhaseId() {
-	    return (this.target.getPhaseId());
-	}
-
-	public void setPhaseId(PhaseId phaseId) {
-	    this.target.setPhaseId(phaseId);
-	}
-
-	public boolean isAppropriateListener(FacesListener listener) {
-	    return this.target.isAppropriateListener(listener);
-	}
-
-	public void processListener(FacesListener listener) {
-	    UIDataAdaptor owner = (UIDataAdaptor) this.getComponent();
-	    Object prevIndex = owner._rowKey;
-	    try {
-		owner.setRowKey(this.key);
-		this.target.processListener(listener);
-	    } finally {
-		owner.setRowKey(prevIndex);
-	    }
-	}
-
-	public Object getKey() {
-	    return key;
-	}
-
-	public FacesEvent getTarget() {
-	    return target;
-	}
-
-    }
-
-    /**
-         * "memento" pattern class for state of component.
-         * 
-         * @author shura
-         * 
-         */
-    private static class DataState implements Serializable {
-
-	/**
-         * 
-         */
-	private static final long serialVersionUID = 17070532L;
-
-	private Object superState;
-
-	private Map componentStates = new HashMap();
-
-	private Set ajaxKeys;
-
-	public String rowKeyVar;
-
-	public String stateVar;
-
-    }
-
-    /**
-         * Serialisable model and component state per iteration of parent
-         * UIData.
-         * 
-         * @author shura
-         * 
-         */
-    private static class PerIdState implements Serializable {
-	/**
-         * 
-         */
-	private static final long serialVersionUID = 9037454770537726418L;
-
-	/**
-         * Flag setted to true if componentState implements StateHolder
-         */
-	private boolean stateInHolder = false;
-
-	/**
-         * Serializable componentState or
-         */
-	private Object componentState;
-
-	private SerializableDataModel model;
-    }
-
-    public void restoreState(FacesContext faces, Object object) {
-	DataState state = (DataState) object;
-	super.restoreState(faces, state.superState);
-	this._ajaxKeys = state.ajaxKeys;
-	this._statesMap = new HashMap();
-	this._rowKeyVar = state.rowKeyVar;
-	this._stateVar = state.stateVar;
-	// Restore serializable models and component states for all rows of
-	// parent UIData ( single if this
-	// component not child of iterable )
-	for (Iterator iter = state.componentStates.entrySet().iterator(); iter
-		.hasNext();) {
-	    Map.Entry stateEntry = (Map.Entry) iter.next();
-	    PerIdState idState = (PerIdState) stateEntry.getValue();
-	    DataComponentState compState;
-	    if (idState.stateInHolder) {
-		// TODO - change RichFaces Tree component, for remove reference
-		// to component from state.
-		compState = createComponentState();
-		((StateHolder) compState).restoreState(faces,
-			idState.componentState);
-	    } else {
-		compState = (DataComponentState) idState.componentState;
-	    }
-	    Object key = stateEntry.getKey();
-	    this._statesMap.put(key, compState);
-	    this._modelsMap.put(key, idState.model);
-	}
-    }
-
-    public Object saveState(FacesContext faces) {
-	DataState state = new DataState();
-	state.superState = super.saveState(faces);
-	state.ajaxKeys = this._ajaxKeys;
-	state.rowKeyVar = this._rowKeyVar;
-	state.stateVar = this._stateVar;
-	Set encodedIds = getEncodedIds();
-	// Save all states of component and data model for all valies of
-	// clientId, encoded in this request.
-	for (Iterator iter = this._statesMap.entrySet().iterator(); iter
-		.hasNext();) {
-	    Map.Entry stateEntry = (Map.Entry) iter.next();
-	    DataComponentState dataComponentState = ((DataComponentState) stateEntry
-		    .getValue());
-	    Object stateKey = stateEntry.getKey();
-	    if (encodedIds.isEmpty() || encodedIds.contains(stateKey)) {
-		PerIdState idState = new PerIdState();
-		idState.model = getExtendedDataModel().getSerializableModel(
-			dataComponentState.getRange());
-		// Save component state , depended if implemented interfaces.
-		if (null == dataComponentState) {
-		    idState.componentState = null;
-		} else if (dataComponentState instanceof Serializable) {
-		    idState.componentState = dataComponentState;
-		} else if (dataComponentState instanceof StateHolder) {
-		    // TODO - change RichFaces Tree component, for remove
-		    // reference to component from state.
-		    // Change this code to reference for saveAttachedState.
-		    idState.componentState = ((StateHolder) dataComponentState)
-			    .saveState(faces);
-		    idState.stateInHolder = true;
-		}
-		if (null != idState.model || null != idState.componentState) {
-		    state.componentStates.put(stateKey, idState);
-		}
-	    }
-	}
-	return state;
-    }
-
-}
Copied: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/UIDataAdaptor.java (from rev 1415, branches/refactor1/framework/api/src/main/java/org/ajax4jsf/ajax/repeat/UIDataAdaptor.java)
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/UIDataAdaptor.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/UIDataAdaptor.java	2007-06-30 00:03:04 UTC (rev 1427)
@@ -0,0 +1,1322 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.ajax.repeat;
+
+import java.io.IOException;
+import java.io.Serializable;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+
+import javax.faces.FacesException;
+import javax.faces.application.FacesMessage;
+import javax.faces.component.EditableValueHolder;
+import javax.faces.component.NamingContainer;
+import javax.faces.component.StateHolder;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIData;
+import javax.faces.context.FacesContext;
+import javax.faces.el.ValueBinding;
+import javax.faces.event.AbortProcessingException;
+import javax.faces.event.FacesEvent;
+import javax.faces.event.FacesListener;
+import javax.faces.event.PhaseId;
+import javax.faces.model.DataModel;
+import javax.faces.model.ListDataModel;
+import javax.faces.render.Renderer;
+
+import org.ajax4jsf.framework.renderer.AjaxRenderer;
+
+/**
+ * Base class for iterable components, like dataTable, Tomahawk dataList,
+ * Facelets repeat, tree etc., with support for partial rendering on AJAX
+ * responces for one or more selected iterations.
+ * 
+ * @author shura
+ * 
+ */
+public abstract class UIDataAdaptor extends UIData implements AjaxDataEncoder {
+
+    /**
+         * 
+         */
+    public static final String COMPONENT_STATE_ATTRIBUTE = "componentState";
+
+    public final static DataModel EMPTY_MODEL = new ListDataModel(
+	    Collections.EMPTY_LIST);
+
+    /**
+         * Base class for visit data model at phases decode, validation and
+         * update model
+         * 
+         * @author shura
+         * 
+         */
+    protected abstract class ComponentVisitor implements DataVisitor {
+
+	public void process(FacesContext context, Object rowKey, Object argument)
+		throws IOException {
+	    setRowKey(context, rowKey);
+	    if (isRowAvailable()) {
+		Iterator childIterator = dataChildren();
+		while (childIterator.hasNext()) {
+		    UIComponent component = (UIComponent) childIterator.next();
+		    processComponent(context, component, argument);
+		}
+
+	    }
+	}
+
+	public abstract void processComponent(FacesContext context,
+		UIComponent c, Object argument) throws IOException;
+
+    }
+
+    /**
+         * Visitor for process decode on children components.
+         */
+    protected ComponentVisitor decodeVisitor = new ComponentVisitor() {
+
+	public void processComponent(FacesContext context, UIComponent c,
+		Object argument) {
+	    c.processDecodes(context);
+	}
+
+    };
+
+    /**
+         * Visitor for process validation phase
+         */
+    protected ComponentVisitor validateVisitor = new ComponentVisitor() {
+
+	public void processComponent(FacesContext context, UIComponent c,
+		Object argument) {
+	    c.processValidators(context);
+	}
+
+    };
+
+    /**
+         * Visitor for process update model phase.
+         */
+    protected ComponentVisitor updateVisitor = new ComponentVisitor() {
+
+	public void processComponent(FacesContext context, UIComponent c,
+		Object argument) {
+	    c.processUpdates(context);
+	}
+
+    };
+
+    /**
+         * Base client id's of this component, for wich invoked encode...
+         * methods. Component will save state and serialisable models for this
+         * keys only.
+         */
+    private Set _encoded;
+
+    /**
+         * Storage for data model instances with different client id's of this
+         * component. In case of child for UIData component, this map will keep
+         * data models for different iterations between phases.
+         */
+    private Map _modelsMap = new HashMap();
+
+    /**
+         * Reference for curent data model
+         */
+    private ExtendedDataModel _currentModel = null;
+
+    /**
+         * States of this component for diferent iterations, same as for models.
+         */
+    private Map _statesMap = new HashMap();
+
+    /**
+         * Reference for current component state.
+         */
+    private DataComponentState _currentState = null;
+
+    /**
+         * Name of EL variable for current component state.
+         */
+    private String _stateVar;
+
+    private String _rowKeyVar;
+
+    /**
+         * Key for current value in model.
+         */
+    private Object _rowKey = null;
+
+    /**
+         * Values of row keys, encoded on ajax response rendering.
+         */
+    private Set _ajaxKeys = null;
+
+    private Object _ajaxRowKey = null;
+
+    private Map _ajaxRowKeysMap = new HashMap();
+
+    /**
+         * Get name of EL variable for component state.
+         * 
+         * @return the varState
+         */
+    public String getStateVar() {
+	return _stateVar;
+    }
+
+    /**
+         * @param varStatus
+         *                the varStatus to set
+         */
+    public void setStateVar(String varStatus) {
+	this._stateVar = varStatus;
+    }
+
+    /**
+         * @return the rowKeyVar
+         */
+    public String getRowKeyVar() {
+	return this._rowKeyVar;
+    }
+
+    /**
+         * @param rowKeyVar
+         *                the rowKeyVar to set
+         */
+    public void setRowKeyVar(String rowKeyVar) {
+	this._rowKeyVar = rowKeyVar;
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see javax.faces.component.UIData#getRowCount()
+         */
+    public int getRowCount() {
+	return getExtendedDataModel().getRowCount();
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see javax.faces.component.UIData#getRowData()
+         */
+    public Object getRowData() {
+	return getExtendedDataModel().getRowData();
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see javax.faces.component.UIData#isRowAvailable()
+         */
+    public boolean isRowAvailable() {
+	return this.getExtendedDataModel().isRowAvailable();
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see javax.faces.component.UIData#setRowIndex(int)
+         */
+    public void setRowIndex(int index) {
+	FacesContext faces = FacesContext.getCurrentInstance();
+	ExtendedDataModel localModel = getExtendedDataModel();
+	// if(key == localModel.getRowIndex()){
+	// return;
+	// }
+	// save child state
+	this.saveChildState(faces);
+	// Set current model row by int, but immediately get value from model.
+	// for compability, complex models must provide values map between
+	// integer and key value.
+	localModel.setRowIndex(index);
+	this._rowKey = localModel.getRowKey();
+	this._clientId = null;
+	boolean rowSelected = this._rowKey != null;
+
+	setupVariable(faces, localModel, rowSelected);
+	// restore child state
+	this.restoreChildState(faces);
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see javax.faces.component.UIData#getRowIndex()
+         */
+    public int getRowIndex() {
+	return getExtendedDataModel().getRowIndex();
+    }
+
+    /**
+         * Same as for int index, but for complex model key.
+         * 
+         * @return
+         */
+    public Object getRowKey() {
+	return this._rowKey;
+    }
+
+    public void setRowKey(Object key) {
+	setRowKey(FacesContext.getCurrentInstance(), key);
+    }
+
+    /**
+         * Setup current roy by key. Perform same functionality as
+         * {@link UIData#setRowIndex(int)}, but for key object - it may be not
+         * only row number in sequence data, but, for example - path to current
+         * node in tree.
+         * 
+         * @param faces -
+         *                current FacesContext
+         * @param key
+         *                new key value.
+         */
+    public void setRowKey(FacesContext faces, Object key) {
+	ExtendedDataModel localModel = getExtendedDataModel();
+	// save child state
+	this.saveChildState(faces);
+	this._rowKey = key;
+	this._clientId = null;
+	localModel.setRowKey(key);
+
+	boolean rowSelected = key != null;
+
+	setupVariable(faces, localModel, rowSelected);
+	// restore child state
+	this.restoreChildState(faces);
+
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see org.ajax4jsf.ajax.repeat.AjaxDataEncoder#getAjaxKeys()
+         */
+    public Set getAjaxKeys() {
+	Set keys = null;
+	if (this._ajaxKeys != null) {
+	    keys = (this._ajaxKeys);
+	} else {
+		ValueBinding vb = getValueBinding("ajaxKeys");
+		if (vb != null) {
+		    keys = (Set) (vb.getValue(getFacesContext()));
+		} else if(null != _ajaxRowKey){
+		    // If none of above exist , use row with submitted AjaxComponent
+		    keys = new HashSet(1);
+		    keys.add(_ajaxRowKey);
+		}
+	}
+	return keys;
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see org.ajax4jsf.ajax.repeat.AjaxDataEncoder#setAjaxKeys(java.util.Set)
+         */
+    public void setAjaxKeys(Set ajaxKeys) {
+	this._ajaxKeys = ajaxKeys;
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see org.ajax4jsf.framework.ajax.AjaxChildrenEncoder#encodeAjaxChild(javax.faces.context.FacesContext,
+         *      java.lang.String, java.util.Set, java.util.Set)
+         */
+    public void encodeAjaxChild(FacesContext context, String path,
+	    final Set ids, final Set renderedAreas) throws IOException {
+	resetDataModel();
+
+	Renderer renderer = getRenderer(context);
+	if (null != renderer && renderer instanceof AjaxRenderer) {
+	    // If renderer support partial encoding - call them.
+	    AjaxRenderer childrenRenderer = (AjaxRenderer) renderer;
+	    childrenRenderer.encodeAjaxChildren(context, this, path, ids,
+		    renderedAreas);
+	}
+	/*else {
+	    // Use simple ajax children encoding for iterate other keys.
+	    final AjaxRenderer childrenRenderer = getChildrenRenderer();
+	    final String childrenPath = path + getId() + NamingContainer.SEPARATOR_CHAR;
+	    ComponentVisitor ajaxVisitor = new ComponentVisitor() {
+
+		public void processComponent(FacesContext context,
+			UIComponent c, Object argument) throws IOException {
+		    childrenRenderer.encodeAjaxComponent(context, c, childrenPath,
+			    ids, renderedAreas);
+		}
+
+	    };
+	    Set ajaxKeys = getAjaxKeys();
+	    if (null != ajaxKeys) {
+		captureOrigValue();
+		Object savedKey = getRowKey();
+		setRowKey(context, null);
+		Iterator fixedChildren = fixedChildren();
+		while (fixedChildren.hasNext()) {
+		    UIComponent component = (UIComponent) fixedChildren.next();
+		    ajaxVisitor.processComponent(context, component, null);
+		}
+		for (Iterator iter = ajaxKeys.iterator(); iter.hasNext();) {
+		    Object key = (Object) iter.next();
+		    ajaxVisitor.process(context, key, null);
+		}
+		setRowKey(savedKey);
+		restoreOrigValue();
+	    } else {
+		iterate(context, ajaxVisitor, null);
+	    }
+	}*/
+    }
+
+    /**
+         * Instance of default renderer in ajax responses.
+         */
+    private AjaxRenderer _childrenRenderer = null;
+
+    /**
+         * getter for simple {@link AjaxChildrenRenderer} instance in case of
+         * ajax responses. If default renderer not support search of children
+         * for encode in ajax response, component will use this instance by
+         * default.
+         * 
+         * @return
+         */
+//    protected AjaxRenderer getChildrenRenderer() {
+//	if (_childrenRenderer == null) {
+//	    _childrenRenderer = new AjaxChildrenRenderer() {
+//
+//		protected Class getComponentClass() {
+//		    return UIDataAdaptor.class;
+//		}
+//
+//	    };
+//
+//	}
+//
+//	return _childrenRenderer;
+//    }
+
+    /**
+         * @return Set of values for clientId's of this component, for wich was
+         *         invoked "encode" methods.
+         */
+    protected Set getEncodedIds() {
+	if (_encoded == null) {
+	    _encoded = new HashSet();
+	}
+
+	return _encoded;
+    }
+
+    /**
+         * Setup EL variable for different iteration. Value of row data and
+         * component state will be put into request scope attributes with names
+         * given by "var" and "varState" bean properties.
+         * 
+         * @param faces
+         *                current faces context
+         * @param localModel
+         * @param rowSelected
+         */
+    protected void setupVariable(FacesContext faces, DataModel localModel,
+	    boolean rowSelected) {
+	Map attrs = faces.getExternalContext().getRequestMap();
+	if (rowSelected && isRowAvailable()) {
+	    // Current row data.
+	    setupVariable(getVar(), attrs, localModel.getRowData());
+	    // Component state variable.
+	    setupVariable(getStateVar(), attrs, getComponentState());
+	    // Row key Data variable.
+	    setupVariable(getRowKeyVar(), attrs, getRowKey());
+
+	} else {
+	    removeVariable(getVar(), attrs);
+	    removeVariable(getStateVar(), attrs);
+	    removeVariable(getRowKeyVar(), attrs);
+	}
+    }
+
+    /**
+         * @param var
+         * @param attrs
+         * @param rowData
+         */
+    private void setupVariable(String var, Map attrs, Object rowData) {
+	if (var != null) {
+	    attrs.put(var, rowData);
+	}
+    }
+
+    /**
+         * @param var
+         * @param attrs
+         * @param rowData
+         */
+    private void removeVariable(String var, Map attrs) {
+	if (var != null) {
+	    attrs.remove(var);
+	}
+    }
+
+    /**
+         * Reset data model. this method must be called twice per request -
+         * before decode phase and before component encoding.
+         */
+    protected void resetDataModel() {
+	this.setExtendedDataModel(null);
+    }
+
+    /**
+         * Set data model. Model value will be stored in Map with key as current
+         * clientId for this component, to keep models between phases for same
+         * iteration in case if this component child for other UIData
+         * 
+         * @param model
+         */
+    protected void setExtendedDataModel(ExtendedDataModel model) {
+	this._currentModel = model;
+	this._modelsMap.put(getBaseClientId(getFacesContext()), model);
+    }
+
+    /**
+         * Get current data model, or create it by {@link #createDataModel()}
+         * method. For different iterations in ancestor UIData ( if present )
+         * will be returned different models.
+         * 
+         * @return current data model.
+         */
+    protected ExtendedDataModel getExtendedDataModel() {
+	if (this._currentModel == null) {
+	    String baseClientId = getBaseClientId(getFacesContext());
+	    ExtendedDataModel model = (ExtendedDataModel) this._modelsMap
+		    .get(baseClientId);
+	    if (null == model) {
+		model = createDataModel();
+		this._modelsMap.put(baseClientId, model);
+	    }
+	    this._currentModel = model;
+	}
+	return this._currentModel;
+    }
+
+    /**
+         * Hook mathod for create data model in concrete implementations.
+         * 
+         * @return
+         */
+    protected abstract ExtendedDataModel createDataModel();
+
+    /**
+         * Set current state ( at most cases, visual representation ) of this
+         * component. Same as for DataModel, component will keep states for
+         * different iterations.
+         * 
+         * @param state
+         */
+    public void setComponentState(DataComponentState state) {
+	this._currentState = state;
+	this._statesMap.put(getBaseClientId(getFacesContext()),
+		this._currentState);
+    }
+
+    /**
+         * @return current state of this component.
+         */
+    public DataComponentState getComponentState() {
+	DataComponentState state = null;
+	if (this._currentState == null) {
+	    // Check for binding state to user bean.
+	    ValueBinding valueBinding = getValueBinding(UIDataAdaptor.COMPONENT_STATE_ATTRIBUTE);
+	    FacesContext facesContext = getFacesContext();
+	    if (null != valueBinding) {
+		state = (DataComponentState) valueBinding
+			.getValue(facesContext);
+		if (null == state) {
+		    // Create default state
+		    state = createComponentState();
+		    if (!valueBinding.isReadOnly(facesContext)) {
+			// Store created state in user bean.
+			valueBinding.setValue(facesContext, state);
+		    }
+		}
+	    } else {
+		// Check for stored state in map for parent iterations
+		String baseClientId = getBaseClientId(facesContext);
+		state = (DataComponentState) this._statesMap.get(baseClientId);
+		if (null == state) {
+		    // Create default component state
+		    state = createComponentState();
+		    this._statesMap.put(baseClientId, state);
+		}
+		this._currentState = state;
+	    }
+	} else {
+	    state = this._currentState;
+	}
+	return state;
+    }
+
+    /**
+         * Hook method for create default state in concrete implementations.
+         * 
+         * @return
+         */
+    protected abstract DataComponentState createComponentState();
+
+    private String _clientId = null;
+
+    public String getClientId(FacesContext faces) {
+	if (null == _clientId) {
+	    StringBuffer id = new StringBuffer(getBaseClientId(faces));
+	    Object rowKey = getRowKey();
+	    if (rowKey != null) {
+		id.append(NamingContainer.SEPARATOR_CHAR).append(
+			rowKey.toString());
+	    }
+	    Renderer renderer;
+	    if (null != (renderer = getRenderer(faces))) {
+		_clientId = renderer.convertClientId(faces, id.toString());
+	    } else {
+		_clientId = id.toString();
+	    }
+
+	}
+	return _clientId;
+    }
+
+    private String _baseClientId = null;
+
+    /**
+         * Get base clietntId of this component ( withowt iteration part )
+         * 
+         * @param faces
+         * @return
+         */
+    public String getBaseClientId(FacesContext faces) {
+	// Return any previously cached client identifier
+	if (_baseClientId == null) {
+
+	    // Search for an ancestor that is a naming container
+	    UIComponent ancestorContainer = this;
+	    StringBuffer parentIds = new StringBuffer();
+	    while (null != (ancestorContainer = ancestorContainer.getParent())) {
+		if (ancestorContainer instanceof NamingContainer) {
+		    parentIds.append(ancestorContainer.getClientId(faces))
+			    .append(NamingContainer.SEPARATOR_CHAR);
+		    break;
+		}
+	    }
+	    String id = getId();
+	    if (null != id) {
+		_baseClientId = parentIds.append(id).toString();
+	    } else {
+		_baseClientId = parentIds.append(
+			faces.getViewRoot().createUniqueId()).toString();
+	    }
+	}
+	return (_baseClientId);
+
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see javax.faces.component.UIComponentBase#setId(java.lang.String)
+         */
+    public void setId(String id) {
+	// If component created by restoring tree or JSP, initial Id is null.
+	boolean haveId = null != super.getId();
+	super.setId(id);
+	_baseClientId = null;
+	_clientId = null;
+	if (haveId) {
+	    // parent UIData ( if present ) will be set same Id at iteration
+	    // -
+	    // we use it for
+	    // switch to different model and state.
+	    String baseClientId = getBaseClientId(getFacesContext());
+	    this._currentState = (DataComponentState) this._statesMap
+		    .get(baseClientId);
+	    this._currentModel = (ExtendedDataModel) this._modelsMap
+		    .get(baseClientId);
+	    if (null != this._currentModel) {
+		this._rowKey = this._currentModel.getRowKey();
+		// restoreChildState();
+	    }
+	    // Restore value for row with submitted AjaxComponent.
+	    this._ajaxRowKey = _ajaxRowKeysMap.get(baseClientId);
+	}
+    }
+
+    private Object origValue;
+
+    /**
+         * Save current state of data variable.
+         */
+    public void captureOrigValue() {
+	captureOrigValue(FacesContext.getCurrentInstance());
+    }
+
+    /**
+         * Save current state of data variable.
+         * 
+         * @param faces
+         *                current faces context
+         */
+    public void captureOrigValue(FacesContext faces) {
+	String var = getVar();
+	if (var != null) {
+	    Map attrs = faces.getExternalContext().getRequestMap();
+	    this.origValue = attrs.get(var);
+	}
+    }
+
+    /**
+         * Restore value of data variable after processing phase.
+         */
+    public void restoreOrigValue() {
+	restoreOrigValue(FacesContext.getCurrentInstance());
+    }
+
+    /**
+         * Restore value of data variable after processing phase.
+         * 
+         * @param faces
+         *                current faces context
+         */
+    public void restoreOrigValue(FacesContext faces) {
+	String var = getVar();
+	if (var != null) {
+	    Map attrs = faces.getExternalContext().getRequestMap();
+	    if (this.origValue != null) {
+		attrs.put(var, this.origValue);
+	    } else {
+		attrs.remove(var);
+	    }
+	}
+    }
+
+    /**
+         * Saved values of {@link EditableValueHolder} fields per iterations.
+         */
+    private Map childState;
+
+    /**
+         * @param faces
+         * @return Saved values of {@link EditableValueHolder} fields per
+         *         iterations.
+         */
+    protected Map getChildState(FacesContext faces) {
+	if (this.childState == null) {
+	    this.childState = new HashMap();
+	}
+	String baseClientId = getBaseClientId(faces);
+	Map currentChildState = (Map) childState.get(baseClientId);
+	if (null == currentChildState) {
+	    currentChildState = new HashMap();
+	    childState.put(baseClientId, currentChildState);
+	}
+	return currentChildState;
+    }
+
+    /**
+         * Save values of {@link EditableValueHolder} fields before change
+         * current row.
+         * 
+         * @param faces
+         */
+    protected void saveChildState(FacesContext faces) {
+
+	Iterator itr = dataChildren();
+	while (itr.hasNext()) {
+	    Map childState = this.getChildState(faces);
+	    this.saveChildState(faces, (UIComponent) itr.next(), childState);
+	}
+    }
+
+    /**
+         * Recursive method for Iterate on children for save
+         * {@link EditableValueHolder} fields states.
+         * 
+         * @param faces
+         * @param c
+         * @param childState
+         */
+    private void saveChildState(FacesContext faces, UIComponent c,
+	    Map childState) {
+
+	if (c instanceof EditableValueHolder && !c.isTransient()) {
+	    String clientId = c.getClientId(faces);
+	    SavedState ss = (SavedState) childState.get(clientId);
+	    if (ss == null) {
+		ss = new SavedState();
+		childState.put(clientId, ss);
+	    }
+	    ss.populate((EditableValueHolder) c);
+	}
+
+	// continue hack
+	Iterator itr = c.getChildren().iterator();
+	while (itr.hasNext()) {
+	    saveChildState(faces, (UIComponent) itr.next(), childState);
+	}
+	itr = c.getFacets().values().iterator();
+	while (itr.hasNext()) {
+	    saveChildState(faces, (UIComponent) itr.next(), childState);
+	}
+    }
+
+    /**
+         * Restore values of {@link EditableValueHolder} fields after change
+         * current row.
+         * 
+         * @param faces
+         */
+    protected void restoreChildState(FacesContext faces) {
+
+	Iterator itr = dataChildren();
+	while (itr.hasNext()) {
+	    Map childState = this.getChildState(faces);
+	    this.restoreChildState(faces, (UIComponent) itr.next(), childState);
+	}
+    }
+
+    /**
+         * Recursive part of
+         * {@link #restoreChildState(FacesContext, UIComponent, Map)}
+         * 
+         * @param faces
+         * @param c
+         * @param childState
+         * 
+         */
+    private void restoreChildState(FacesContext faces, UIComponent c,
+	    Map childState) {
+	// reset id
+	String id = c.getId();
+	c.setId(id);
+
+	// hack
+	if (c instanceof EditableValueHolder) {
+	    EditableValueHolder evh = (EditableValueHolder) c;
+	    String clientId = c.getClientId(faces);
+	    SavedState ss = (SavedState) childState.get(clientId);
+	    if (ss != null) {
+		ss.apply(evh);
+	    } else {
+		NullState.apply(evh);
+	    }
+	}
+
+	// continue hack
+	Iterator itr = c.getChildren().iterator();
+	while (itr.hasNext()) {
+	    restoreChildState(faces, (UIComponent) itr.next(), childState);
+	}
+	itr = c.getFacets().values().iterator();
+	while (itr.hasNext()) {
+	    restoreChildState(faces, (UIComponent) itr.next(), childState);
+	}
+    }
+
+    /**
+         * Check for validation errors on children components. If true, saved
+         * values must be keep on render phase
+         * 
+         * @param context
+         * @return
+         */
+    private boolean keepSaved(FacesContext context) {
+
+	Iterator clientIds = this.getChildState(context).keySet().iterator();
+	while (clientIds.hasNext()) {
+	    String clientId = (String) clientIds.next();
+	    Iterator messages = context.getMessages(clientId);
+	    while (messages.hasNext()) {
+		FacesMessage message = (FacesMessage) messages.next();
+		if (message.getSeverity()
+			.compareTo(FacesMessage.SEVERITY_ERROR) >= 0) {
+		    return (true);
+		}
+	    }
+	}
+	return false;
+    }
+
+    /**
+         * Perform iteration on all children components and all data rows with
+         * given visitor.
+         * 
+         * @param faces
+         * @param visitor
+         */
+    protected void iterate(FacesContext faces, ComponentVisitor visitor,
+	    Object argument) {
+
+	// stop if not rendered
+	if (!this.isRendered()) {
+	    return;
+	}
+	// reset rowIndex
+	this.captureOrigValue(faces);
+	this.setRowKey(faces, null);
+	try {
+	    Iterator fixedChildren = fixedChildren();
+	    while (fixedChildren.hasNext()) {
+		UIComponent component = (UIComponent) fixedChildren.next();
+		visitor.processComponent(faces, component, argument);
+	    }
+
+	    walk(faces, visitor, argument);
+	} catch (Exception e) {
+	    throw new FacesException(e);
+	} finally {
+	    this.setRowKey(faces, null);
+	    this.restoreOrigValue(faces);
+	}
+    }
+
+    /**
+         * Walk ( visit ) this component on all data-avare children for each
+         * row.
+         * 
+         * @param faces
+         * @param visitor
+         * @throws IOException
+         */
+    public void walk(FacesContext faces, DataVisitor visitor, Object argument)
+	    throws IOException {
+	getExtendedDataModel().walk(faces, visitor,
+		getComponentState().getRange(), argument);
+    }
+
+    protected void processDecodes(FacesContext faces, Object argument) {
+	if (!this.isRendered())
+	    return;
+	this.resetComponent(faces);
+	this.iterate(faces, decodeVisitor, argument);
+	this.decode(faces);
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see javax.faces.component.UIData#processDecodes(javax.faces.context.FacesContext)
+         */
+    public void processDecodes(FacesContext faces) {
+	processDecodes(faces, null);
+    }
+
+    /**
+         * Reset per-request fields in component.
+         * 
+         * @param faces
+         * 
+         */
+    protected void resetComponent(FacesContext faces) {
+	// resetDataModel();
+	if (null != this.childState) {
+	    childState.remove(getBaseClientId(faces));
+	}
+	this._encoded = null;
+    }
+
+    protected void processUpdates(FacesContext faces, Object argument) {
+	if (!this.isRendered())
+	    return;
+	this.iterate(faces, updateVisitor, argument);
+	ExtendedDataModel dataModel = getExtendedDataModel();
+	// If no validation errors, update values for serializable model,
+	// restored from view.
+	if (dataModel instanceof SerializableDataModel && (!keepSaved(faces))) {
+	    SerializableDataModel serializableModel = (SerializableDataModel) dataModel;
+	    serializableModel.update();
+	}
+    }
+
+    public void processUpdates(FacesContext faces) {
+	processUpdates(faces, null);
+    }
+
+    protected void processValidators(FacesContext faces, Object argument) {
+	if (!this.isRendered())
+	    return;
+	this.iterate(faces, validateVisitor, argument);
+    }
+
+    public void processValidators(FacesContext faces) {
+	processValidators(faces, null);
+    }
+
+    public void encodeBegin(FacesContext context) throws IOException {
+	resetDataModel();
+	// if(!keepSaved(context)){
+	// childState.remove(getBaseClientId(context));
+	// }
+	// Mark component as used, if parent UIData change own range states not
+	// accessed at
+	// encode phase must be unsaved.
+	getEncodedIds().add(getBaseClientId(context));
+	// getComponentState().setUsed(true);
+	super.encodeBegin(context);
+    }
+
+    /**
+         * This method must create iterator for all non-data avare children of
+         * this component ( header/footer facets for components and columns in
+         * dataTable, facets for tree etc.
+         * 
+         * @return iterator for all components not sensitive for row data.
+         */
+    protected abstract Iterator fixedChildren();
+
+    /**
+         * This method must create iterator for all children components,
+         * processed "per row" It can be children of UIColumn in dataTable,
+         * nodes in tree
+         * 
+         * @return iterator for all components processed per row.
+         */
+    protected abstract Iterator dataChildren();
+
+    private final static SavedState NullState = new SavedState();
+
+    // from RI
+    /**
+         * This class keep values of {@link EditableValueHolder} row-sensitive
+         * fields.
+         * 
+         * @author shura
+         * 
+         */
+    private final static class SavedState implements Serializable {
+
+	private Object submittedValue;
+
+	private static final long serialVersionUID = 2920252657338389849L;
+
+	Object getSubmittedValue() {
+	    return (this.submittedValue);
+	}
+
+	void setSubmittedValue(Object submittedValue) {
+	    this.submittedValue = submittedValue;
+	}
+
+	private boolean valid = true;
+
+	boolean isValid() {
+	    return (this.valid);
+	}
+
+	void setValid(boolean valid) {
+	    this.valid = valid;
+	}
+
+	private Object value;
+
+	Object getValue() {
+	    return (this.value);
+	}
+
+	public void setValue(Object value) {
+	    this.value = value;
+	}
+
+	private boolean localValueSet;
+
+	boolean isLocalValueSet() {
+	    return (this.localValueSet);
+	}
+
+	public void setLocalValueSet(boolean localValueSet) {
+	    this.localValueSet = localValueSet;
+	}
+
+	public String toString() {
+	    return ("submittedValue: " + submittedValue + " value: " + value
+		    + " localValueSet: " + localValueSet);
+	}
+
+	public void populate(EditableValueHolder evh) {
+	    this.value = evh.getLocalValue();
+	    this.valid = evh.isValid();
+	    this.submittedValue = evh.getSubmittedValue();
+	    this.localValueSet = evh.isLocalValueSet();
+	}
+
+	public void apply(EditableValueHolder evh) {
+	    evh.setValue(this.value);
+	    evh.setValid(this.valid);
+	    evh.setSubmittedValue(this.submittedValue);
+	    evh.setLocalValueSet(this.localValueSet);
+	}
+
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see javax.faces.component.UIData#queueEvent(javax.faces.event.FacesEvent)
+         */
+    public void queueEvent(FacesEvent event) {
+	if (event.getComponent() != this) {
+	    event = new IndexedEvent(this, event, getRowKey());
+	}
+	// Send event directly to parent, to avoid wrapping in superclass.
+	UIComponent parent = getParent();
+	if (parent == null) {
+	    throw new IllegalStateException(
+		    "No parent component for queue event");
+	} else {
+	    parent.queueEvent(event);
+	}
+    }
+
+    public void broadcast(FacesEvent event) throws AbortProcessingException {
+
+	if (!(event instanceof IndexedEvent)) {
+	    if (!broadcastLocal(event)) {
+		super.broadcast(event);
+	    }
+	    return;
+	}
+
+	// Set up the correct context and fire our wrapped event
+	IndexedEvent revent = (IndexedEvent) event;
+	Object oldRowKey = getRowKey();
+	FacesContext faces = FacesContext.getCurrentInstance();
+	captureOrigValue(faces);
+	Object eventRowKey = revent.getKey();
+	setRowKey(faces, eventRowKey);
+	FacesEvent rowEvent = revent.getTarget();
+	rowEvent.getComponent().broadcast(rowEvent);
+	// For Ajax events, keep row value.
+	if (!(rowEvent.getPhaseId() == PhaseId.RENDER_RESPONSE)) {
+	    this._ajaxRowKey = eventRowKey;
+	    this._ajaxRowKeysMap.put(getBaseClientId(faces), eventRowKey);
+	}
+	setRowKey(faces, oldRowKey);
+	restoreOrigValue(faces);
+	// }
+	return;
+    }
+
+    /**
+         * Process events targetted for concrete implementation. Hook method
+         * called from {@link #broadcast(FacesEvent)}
+         * 
+         * @param event -
+         *                processed event.
+         * @return true if event processed, false if component must continue
+         *         processing.
+         */
+    protected boolean broadcastLocal(FacesEvent event) {
+	return false;
+    }
+
+    /**
+         * Wrapper for event from child component, with value of current row
+         * key.
+         * 
+         * @author shura
+         * 
+         */
+    protected static final class IndexedEvent extends FacesEvent {
+
+	private static final long serialVersionUID = -8318895390232552385L;
+
+	private final FacesEvent target;
+
+	private final Object key;
+
+	public IndexedEvent(UIDataAdaptor owner, FacesEvent target, Object key) {
+	    super(owner);
+	    this.target = target;
+	    this.key = key;
+	}
+
+	public PhaseId getPhaseId() {
+	    return (this.target.getPhaseId());
+	}
+
+	public void setPhaseId(PhaseId phaseId) {
+	    this.target.setPhaseId(phaseId);
+	}
+
+	public boolean isAppropriateListener(FacesListener listener) {
+	    return this.target.isAppropriateListener(listener);
+	}
+
+	public void processListener(FacesListener listener) {
+	    UIDataAdaptor owner = (UIDataAdaptor) this.getComponent();
+	    Object prevIndex = owner._rowKey;
+	    try {
+		owner.setRowKey(this.key);
+		this.target.processListener(listener);
+	    } finally {
+		owner.setRowKey(prevIndex);
+	    }
+	}
+
+	public Object getKey() {
+	    return key;
+	}
+
+	public FacesEvent getTarget() {
+	    return target;
+	}
+
+    }
+
+    /**
+         * "memento" pattern class for state of component.
+         * 
+         * @author shura
+         * 
+         */
+    private static class DataState implements Serializable {
+
+	/**
+         * 
+         */
+	private static final long serialVersionUID = 17070532L;
+
+	private Object superState;
+
+	private Map componentStates = new HashMap();
+
+	private Set ajaxKeys;
+
+	public String rowKeyVar;
+
+	public String stateVar;
+
+    }
+
+    /**
+         * Serialisable model and component state per iteration of parent
+         * UIData.
+         * 
+         * @author shura
+         * 
+         */
+    private static class PerIdState implements Serializable {
+	/**
+         * 
+         */
+	private static final long serialVersionUID = 9037454770537726418L;
+
+	/**
+         * Flag setted to true if componentState implements StateHolder
+         */
+	private boolean stateInHolder = false;
+
+	/**
+         * Serializable componentState or
+         */
+	private Object componentState;
+
+	private SerializableDataModel model;
+    }
+
+    public void restoreState(FacesContext faces, Object object) {
+	DataState state = (DataState) object;
+	super.restoreState(faces, state.superState);
+	this._ajaxKeys = state.ajaxKeys;
+	this._statesMap = new HashMap();
+	this._rowKeyVar = state.rowKeyVar;
+	this._stateVar = state.stateVar;
+	// Restore serializable models and component states for all rows of
+	// parent UIData ( single if this
+	// component not child of iterable )
+	for (Iterator iter = state.componentStates.entrySet().iterator(); iter
+		.hasNext();) {
+	    Map.Entry stateEntry = (Map.Entry) iter.next();
+	    PerIdState idState = (PerIdState) stateEntry.getValue();
+	    DataComponentState compState;
+	    if (idState.stateInHolder) {
+		// TODO - change RichFaces Tree component, for remove reference
+		// to component from state.
+		compState = createComponentState();
+		((StateHolder) compState).restoreState(faces,
+			idState.componentState);
+	    } else {
+		compState = (DataComponentState) idState.componentState;
+	    }
+	    Object key = stateEntry.getKey();
+	    this._statesMap.put(key, compState);
+	    this._modelsMap.put(key, idState.model);
+	}
+    }
+
+    public Object saveState(FacesContext faces) {
+	DataState state = new DataState();
+	state.superState = super.saveState(faces);
+	state.ajaxKeys = this._ajaxKeys;
+	state.rowKeyVar = this._rowKeyVar;
+	state.stateVar = this._stateVar;
+	Set encodedIds = getEncodedIds();
+	// Save all states of component and data model for all valies of
+	// clientId, encoded in this request.
+	for (Iterator iter = this._statesMap.entrySet().iterator(); iter
+		.hasNext();) {
+	    Map.Entry stateEntry = (Map.Entry) iter.next();
+	    DataComponentState dataComponentState = ((DataComponentState) stateEntry
+		    .getValue());
+	    Object stateKey = stateEntry.getKey();
+	    if (encodedIds.isEmpty() || encodedIds.contains(stateKey)) {
+		PerIdState idState = new PerIdState();
+		idState.model = getExtendedDataModel().getSerializableModel(
+			dataComponentState.getRange());
+		// Save component state , depended if implemented interfaces.
+		if (null == dataComponentState) {
+		    idState.componentState = null;
+		} else if (dataComponentState instanceof Serializable) {
+		    idState.componentState = dataComponentState;
+		} else if (dataComponentState instanceof StateHolder) {
+		    // TODO - change RichFaces Tree component, for remove
+		    // reference to component from state.
+		    // Change this code to reference for saveAttachedState.
+		    idState.componentState = ((StateHolder) dataComponentState)
+			    .saveState(faces);
+		    idState.stateInHolder = true;
+		}
+		if (null != idState.model || null != idState.componentState) {
+		    state.componentStates.put(stateKey, idState);
+		}
+	    }
+	}
+	return state;
+    }
+
+}
Modified: branches/refactor1/ui/core/src/main/java/org/ajax4jsf/renderkit/html/RepeatRenderer.java
===================================================================
--- branches/refactor1/ui/core/src/main/java/org/ajax4jsf/renderkit/html/RepeatRenderer.java	2007-06-29 23:59:08 UTC (rev 1426)
+++ branches/refactor1/ui/core/src/main/java/org/ajax4jsf/renderkit/html/RepeatRenderer.java	2007-06-30 00:03:04 UTC (rev 1427)
@@ -29,14 +29,13 @@
 
 import org.ajax4jsf.ajax.repeat.DataVisitor;
 import org.ajax4jsf.ajax.repeat.UIRepeat;
-import org.ajax4jsf.framework.renderer.AjaxChildrenRenderer;
 import org.ajax4jsf.framework.renderer.RendererBase;
 
 /**
  * @author shura
  * 
  */
-public class RepeatRenderer extends AjaxChildrenRenderer {
+public class RepeatRenderer extends RendererBase {
 
 	public void encodeChildren(FacesContext context, UIComponent component)
 			throws IOException {
                                
                         
                        
                                
                                18 years, 4 months
                        
                        
                 
         
 
        
            
        
        
        
                
                        
                                
                                
                                        
                                
                         
                        
                                
                                
                                        
                                                
                                        
                                        
                                        JBoss Rich Faces SVN: r1426 - in branches/refactor1: samples/useCases/src/main/webapp and 4 other directories.
                                
                                
                                
                                    
                                        by richfaces-svn-commits@lists.jboss.org
                                    
                                
                                
                                        Author: alexsmirnov
Date: 2007-06-29 19:59:08 -0400 (Fri, 29 Jun 2007)
New Revision: 1426
Added:
   branches/refactor1/samples/useCases/src/main/java/org/ajax4jsf/EnclosedData.java
   branches/refactor1/samples/useCases/src/main/webapp/META-INF/
   branches/refactor1/samples/useCases/src/main/webapp/META-INF/MANIFEST.MF
Modified:
   branches/refactor1/samples/useCases/src/main/java/org/ajax4jsf/RepeatData.java
   branches/refactor1/samples/useCases/src/main/webapp/WEB-INF/faces-config.xml
   branches/refactor1/samples/useCases/src/main/webapp/WEB-INF/web.xml
   branches/refactor1/samples/useCases/src/main/webapp/pages/repeat.jsp
   branches/refactor1/samples/useCases/src/main/webapp/pages/repeat.xhtml
   branches/refactor1/ui/core/src/main/java/org/ajax4jsf/renderkit/html/RepeatRenderer.java
Log:
continue refactoring.
Added: branches/refactor1/samples/useCases/src/main/java/org/ajax4jsf/EnclosedData.java
===================================================================
--- branches/refactor1/samples/useCases/src/main/java/org/ajax4jsf/EnclosedData.java	                        (rev 0)
+++ branches/refactor1/samples/useCases/src/main/java/org/ajax4jsf/EnclosedData.java	2007-06-29 23:59:08 UTC (rev 1426)
@@ -0,0 +1,42 @@
+/**
+ * 
+ */
+package org.ajax4jsf;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class EnclosedData {
+	
+	private List<RepeatData> repeatData;
+	
+	public EnclosedData() {
+		repeatData = new ArrayList<RepeatData>();
+		for(int i=0;i<5;i++){
+			RepeatData data = new RepeatData();
+			data.setText("Top row "+i);
+			repeatData.add(data);
+		}
+	}
+
+	/**
+	 * @return the repeatData
+	 */
+	public List<RepeatData> getRepeatData() {
+		return repeatData;
+	}
+
+	/**
+	 * @param repeatData the repeatData to set
+	 */
+	public void setRepeatData(List<RepeatData> repeatData) {
+		this.repeatData = repeatData;
+	}
+	
+	
+
+}
Modified: branches/refactor1/samples/useCases/src/main/java/org/ajax4jsf/RepeatData.java
===================================================================
--- branches/refactor1/samples/useCases/src/main/java/org/ajax4jsf/RepeatData.java	2007-06-29 22:14:47 UTC (rev 1425)
+++ branches/refactor1/samples/useCases/src/main/java/org/ajax4jsf/RepeatData.java	2007-06-29 23:59:08 UTC (rev 1426)
@@ -14,7 +14,23 @@
     
     private List data;
     
-    public RepeatData() {
+    private String text;
+    
+    /**
+	 * @return the text
+	 */
+	public String getText() {
+		return text;
+	}
+
+	/**
+	 * @param text the text to set
+	 */
+	public void setText(String text) {
+		this.text = text;
+	}
+
+	public RepeatData() {
 	data = new ArrayList(10);
 	for(int i=0;i<10;i++){
 	    Bean bean = new Bean();
Added: branches/refactor1/samples/useCases/src/main/webapp/META-INF/MANIFEST.MF
===================================================================
--- branches/refactor1/samples/useCases/src/main/webapp/META-INF/MANIFEST.MF	                        (rev 0)
+++ branches/refactor1/samples/useCases/src/main/webapp/META-INF/MANIFEST.MF	2007-06-29 23:59:08 UTC (rev 1426)
@@ -0,0 +1,2 @@
+Manifest-Version: 1.0
+
Modified: branches/refactor1/samples/useCases/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- branches/refactor1/samples/useCases/src/main/webapp/WEB-INF/faces-config.xml	2007-06-29 22:14:47 UTC (rev 1425)
+++ branches/refactor1/samples/useCases/src/main/webapp/WEB-INF/faces-config.xml	2007-06-29 23:59:08 UTC (rev 1426)
@@ -18,6 +18,11 @@
   <managed-bean-scope>session</managed-bean-scope>
  </managed-bean>
  <managed-bean>
+  <managed-bean-name>enclosedData</managed-bean-name>
+  <managed-bean-class>org.ajax4jsf.EnclosedData</managed-bean-class>
+  <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
   <managed-bean-name>a4jTestBean</managed-bean-name>
   <managed-bean-class>org.ajax4jsf.A4jTestBean</managed-bean-class>
   <managed-bean-scope>request</managed-bean-scope>
Modified: branches/refactor1/samples/useCases/src/main/webapp/WEB-INF/web.xml
===================================================================
--- branches/refactor1/samples/useCases/src/main/webapp/WEB-INF/web.xml	2007-06-29 22:14:47 UTC (rev 1425)
+++ branches/refactor1/samples/useCases/src/main/webapp/WEB-INF/web.xml	2007-06-29 23:59:08 UTC (rev 1426)
@@ -43,19 +43,19 @@
  </filter>
  <filter-mapping>
   <filter-name>ajax4jsf</filter-name>
-  <servlet-name>Faces Servlet</servlet-name>
-  <dispatcher>REQUEST</dispatcher>
-  <dispatcher>FORWARD</dispatcher>
+  <servlet-name>Faces Servlet</servlet-name>
+  <dispatcher>REQUEST</dispatcher>
+  <dispatcher>FORWARD</dispatcher>
   <dispatcher>INCLUDE</dispatcher>
  </filter-mapping>
  <servlet>
   <servlet-name>Faces Servlet</servlet-name>
   <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
   <load-on-startup>1</load-on-startup>
- </servlet>
- <servlet-mapping>
-  <servlet-name>Faces Servlet</servlet-name>
-  <url-pattern>/faces/*</url-pattern>
+ </servlet>
+ <servlet-mapping>
+ 	<servlet-name>Faces Servlet</servlet-name>
+ 	<url-pattern>/faces/*</url-pattern>
  </servlet-mapping>
  <login-config>
   <auth-method>BASIC</auth-method>
Modified: branches/refactor1/samples/useCases/src/main/webapp/pages/repeat.jsp
===================================================================
--- branches/refactor1/samples/useCases/src/main/webapp/pages/repeat.jsp	2007-06-29 22:14:47 UTC (rev 1425)
+++ branches/refactor1/samples/useCases/src/main/webapp/pages/repeat.jsp	2007-06-29 23:59:08 UTC (rev 1426)
@@ -12,6 +12,7 @@
 		<h:selectBooleanCheckbox selected="true" /> 
 		<h:inputText value="Text"></h:inputText>
 		<h:inputText value="#{row.text}"></h:inputText>
+		<h:outputText value="#{row.text}"/>		
 		<h:outputText escape="false" value="<br>" ></h:outputText>
 		</a4j:repeat>
 		</h:form>			
Modified: branches/refactor1/samples/useCases/src/main/webapp/pages/repeat.xhtml
===================================================================
--- branches/refactor1/samples/useCases/src/main/webapp/pages/repeat.xhtml	2007-06-29 22:14:47 UTC (rev 1425)
+++ branches/refactor1/samples/useCases/src/main/webapp/pages/repeat.xhtml	2007-06-29 23:59:08 UTC (rev 1426)
@@ -1,26 +1,45 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml"
-	xmlns:a4j="http://richfaces.org/ajax"    
-	xmlns:h="http://java.sun.com/jsf/html"           
-    xmlns:f="http://java.sun.com/jsf/core">
-	<head>
-		<title>Repeater with input components</title>
-	</head>
-	<body>
-		<f:view>
-		<h:form>
+	xmlns:a4j="http://richfaces.org/ajax"
+	xmlns:h="http://java.sun.com/jsf/html"
+	xmlns:f="http://java.sun.com/jsf/core">
+<head>
+<title>Repeater with input components</title>
+</head>
+<body>
+<f:view>
+	<h:form>
 		<h:panelGroup id="repeat">
-		<a4j:repeat value="#{repeatData.data}" var="row">
-		<h:selectBooleanCheckbox selected="true" /> 
-		<h:inputText value="Text"></h:inputText>
-		<h:inputText value="#{row.text}"></h:inputText>
-		<h:outputText escape="false" value="<br />" ></h:outputText>
-		</a4j:repeat>
+			<a4j:repeat value="#{repeatData.data}" var="row" id="r">
+				<h:selectBooleanCheckbox selected="true" />
+				<h:inputText value="Text"></h:inputText>
+				<h:inputText value="#{row.text}"></h:inputText>
+				<h:outputText id="text" value="#{row.text}"></h:outputText>
+				<a4j:commandButton value="Up" reRender="text"></a4j:commandButton>
+				<br />
+			</a4j:repeat>
 		</h:panelGroup>
-            <h:commandButton  action="#{bean.ok}" value="Ok"></h:commandButton>
-            <a4j:commandButton  action="#{bean.ok}" value="Ok ajax" reRender="repeat"></a4j:commandButton>
-
-		</h:form>			
-		</f:view>
-	</body>	
-</html>  
+		<h:commandButton action="#{bean.ok}" value="Ok"></h:commandButton>
+		<a4j:commandButton action="#{bean.ok}" value="Ok ajax"
+			reRender="repeat"></a4j:commandButton>
+		<br />
+		<ol>
+			<a4j:repeat value="#{enclosedData.repeatData}" var="row" id="r0">
+				<li><h:inputText value="#{row.text}"></h:inputText> <h:outputText
+					id="text0" value="#{row.text}"></h:outputText> <a4j:commandButton
+					value="Up" reRender="text0"></a4j:commandButton>
+				<ol>
+					<a4j:repeat value="#{row.data}" var="row1" id="r1">
+						<li><h:inputText value="#{row1.text}"></h:inputText> <h:outputText
+							id="text1" value="#{row1.text}"></h:outputText> <a4j:commandButton
+							value="Up" reRender="text1"></a4j:commandButton></li>
+					</a4j:repeat>
+				</ol>
+				</li>
+			</a4j:repeat>
+		</ol>
+	</h:form>
+	<a4j:log hotkey="M" />
+</f:view>
+</body>
+</html>
Modified: branches/refactor1/ui/core/src/main/java/org/ajax4jsf/renderkit/html/RepeatRenderer.java
===================================================================
--- branches/refactor1/ui/core/src/main/java/org/ajax4jsf/renderkit/html/RepeatRenderer.java	2007-06-29 22:14:47 UTC (rev 1425)
+++ branches/refactor1/ui/core/src/main/java/org/ajax4jsf/renderkit/html/RepeatRenderer.java	2007-06-29 23:59:08 UTC (rev 1426)
@@ -29,13 +29,14 @@
 
 import org.ajax4jsf.ajax.repeat.DataVisitor;
 import org.ajax4jsf.ajax.repeat.UIRepeat;
+import org.ajax4jsf.framework.renderer.AjaxChildrenRenderer;
 import org.ajax4jsf.framework.renderer.RendererBase;
 
 /**
  * @author shura
  * 
  */
-public class RepeatRenderer extends RendererBase {
+public class RepeatRenderer extends AjaxChildrenRenderer {
 
 	public void encodeChildren(FacesContext context, UIComponent component)
 			throws IOException {
                                
                         
                        
                                
                                18 years, 4 months
                        
                        
                 
         
 
        
            
        
        
        
                
                        
                                
                                
                                        
                                
                         
                        
                                
                                
                                        
                                                
                                        
                                        
                                        JBoss Rich Faces SVN: r1425 - in branches/refactor1: framework/impl/src/main/resources/META-INF/services and 37 other directories.
                                
                                
                                
                                    
                                        by richfaces-svn-commits@lists.jboss.org
                                    
                                
                                
                                        Author: alexsmirnov
Date: 2007-06-29 18:14:47 -0400 (Fri, 29 Jun 2007)
New Revision: 1425
Added:
   branches/refactor1/framework/impl/src/main/resources/META-INF/services/org.ajax4jsf.framework.resource.InternetResourceBuilder
   branches/refactor1/framework/impl/src/main/resources/META-INF/services/org.ajax4jsf.framework.skin.SkinFactory
Modified:
   branches/refactor1/framework/impl/src/main/resources/META-INF/faces-config.xml
   branches/refactor1/samples/ajaxPortlet/src/main/webapp/jsf/repeater.xhtml
   branches/refactor1/samples/ajaxPortlet/src/main/webapp/jsf/start.xhtml
   branches/refactor1/samples/dataFilterSliderDemo/src/main/webapp/pages/index.jsp
   branches/refactor1/samples/dataTableDemo/src/main/webapp/pages/ajax.jsp
   branches/refactor1/samples/dataTableDemo/src/main/webapp/pages/colgroup.jsp
   branches/refactor1/samples/dataTableDemo/src/main/webapp/pages/index.jsp
   branches/refactor1/samples/dragDropDemo/src/main/webapp/pages/index.jsp
   branches/refactor1/samples/gmap-sample/src/main/webapp/gmap.xhtml
   branches/refactor1/samples/inputNumberSliderDemo/src/main/webapp/pages/index.jsp
   branches/refactor1/samples/modalpanel-sample/src/main/webapp/pages/index.jsp
   branches/refactor1/samples/panel-sample/src/main/webapp/panel.xhtml
   branches/refactor1/samples/panel-sample/src/main/webapp/panel2.xhtml
   branches/refactor1/samples/portal-echo/src/main/webapp/jsf/repeater.xhtml
   branches/refactor1/samples/portal-echo/src/main/webapp/jsf/start.xhtml
   branches/refactor1/samples/richfaces-art-datatable/src/main/webapp/pages/columnsSorting.jsp
   branches/refactor1/samples/richfaces-art-datatable/src/main/webapp/pages/example1.jsp
   branches/refactor1/samples/richfaces-art-datatable/src/main/webapp/pages/example10.jsp
   branches/refactor1/samples/richfaces-art-datatable/src/main/webapp/pages/example2.jsp
   branches/refactor1/samples/richfaces-art-datatable/src/main/webapp/pages/example3.jsp
   branches/refactor1/samples/richfaces-art-datatable/src/main/webapp/pages/example4.jsp
   branches/refactor1/samples/richfaces-demo/src/main/webapp/richfaces/dataFilterSlider/usage.xhtml
   branches/refactor1/samples/richfaces-demo/src/main/webapp/richfaces/dataTable/usage.xhtml
   branches/refactor1/samples/richfaces-demo/src/main/webapp/richfaces/dataTableScroller/usage.xhtml
   branches/refactor1/samples/richfaces-demo/src/main/webapp/richfaces/dragSupport/usage.xhtml
   branches/refactor1/samples/richfaces-demo/src/main/webapp/richfaces/dropDownMenu/usage.xhtml
   branches/refactor1/samples/richfaces-demo/src/main/webapp/richfaces/gmap/usage.xhtml
   branches/refactor1/samples/richfaces-demo/src/main/webapp/richfaces/inputNumberSlider/usage.xhtml
   branches/refactor1/samples/richfaces-demo/src/main/webapp/richfaces/inputNumberSpinner/usage.xhtml
   branches/refactor1/samples/richfaces-demo/src/main/webapp/richfaces/modalPanel/usage.xhtml
   branches/refactor1/samples/richfaces-demo/src/main/webapp/richfaces/paint2D/usage.xhtml
   branches/refactor1/samples/richfaces-demo/src/main/webapp/richfaces/simpleTogglePanel/usage.xhtml
   branches/refactor1/samples/richfaces-demo/src/main/webapp/richfaces/suggestionBox/usage.xhtml
   branches/refactor1/samples/richfaces-demo/src/main/webapp/richfaces/togglePanel/usage.xhtml
   branches/refactor1/samples/richfaces-demo/src/main/webapp/richfaces/toolBar/usage.xhtml
   branches/refactor1/samples/richfaces-demo/src/main/webapp/richfaces/tree/usage.xhtml
   branches/refactor1/samples/richfaces-demo/src/main/webapp/templates/include/components-navigation.xhtml
   branches/refactor1/samples/richfaces-demo/src/main/webapp/templates/include/dynamic-css.xhtml
   branches/refactor1/samples/richfaces-demo/src/main/webapp/templates/include/footer.xhtml
   branches/refactor1/samples/richfaces-demo/src/main/webapp/templates/include/header.xhtml
   branches/refactor1/samples/richfaces-demo/src/main/webapp/templates/include/references.xhtml
   branches/refactor1/samples/richfaces-demo/src/main/webapp/templates/main.xhtml
   branches/refactor1/samples/seamIntegration/src/main/webapp/pages/index.xhtml
   branches/refactor1/samples/seamIntegration/src/main/webapp/pages/repeater.xhtml
   branches/refactor1/samples/suggestionbox-sample/src/main/webapp/pages/index.jsp
   branches/refactor1/samples/tabPanelDemo/src/main/webapp/pages/index.jsp
   branches/refactor1/samples/tabPanelDemo/src/main/webapp/pages/rendering.jsp
   branches/refactor1/samples/togglePanel-sample/src/main/webapp/pages/index.jsp
   branches/refactor1/samples/tomahawkCompability/src/main/webapp/pages/dataTable.jsp
   branches/refactor1/samples/tomahawkCompability/src/main/webapp/pages/index.xhtml
   branches/refactor1/samples/tomahawkCompability/src/main/webapp/pages/response.jsp
   branches/refactor1/samples/tomahawkCompability/src/main/webapp/pages/tabbedPanel.jsp
   branches/refactor1/samples/tomahawkCompability/src/main/webapp/pages/tree2.jsp
   branches/refactor1/samples/tree-demo/src/main/webapp/pages/index.jsp
   branches/refactor1/samples/tree-demo/src/main/webapp/pages/index2.jsp
   branches/refactor1/samples/useCases/pom.xml
   branches/refactor1/samples/useCases/src/main/webapp/pages/actionparam.xhtml
   branches/refactor1/samples/useCases/src/main/webapp/pages/ajaxSingle.xhtml
   branches/refactor1/samples/useCases/src/main/webapp/pages/ajaxdata.xhtml
   branches/refactor1/samples/useCases/src/main/webapp/pages/controls.jsp
   branches/refactor1/samples/useCases/src/main/webapp/pages/controls.xhtml
   branches/refactor1/samples/useCases/src/main/webapp/pages/index.xhtml
   branches/refactor1/samples/useCases/src/main/webapp/pages/prependId.xhtml
   branches/refactor1/samples/useCases/src/main/webapp/pages/push.xhtml
   branches/refactor1/samples/useCases/src/main/webapp/pages/repeat.jsp
   branches/refactor1/samples/useCases/src/main/webapp/pages/repeat.xhtml
   branches/refactor1/samples/useCases/src/main/webapp/pages/setCookie.xhtml
   branches/refactor1/samples/useCases/src/main/webapp/pages/testCookie.xhtml
   branches/refactor1/ui/core/pom.xml
   branches/refactor1/ui/pom.xml
Log:
first samle ( useCases ) start working in the refactored project !
Modified: branches/refactor1/framework/impl/src/main/resources/META-INF/faces-config.xml
===================================================================
--- branches/refactor1/framework/impl/src/main/resources/META-INF/faces-config.xml	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/framework/impl/src/main/resources/META-INF/faces-config.xml	2007-06-29 22:14:47 UTC (rev 1425)
@@ -31,13 +31,11 @@
        <managed-bean-class>org.ajax4jsf.framework.skin.SkinBean</managed-bean-class>
        <managed-bean-scope>application</managed-bean-scope>
     </managed-bean>
-    <!-- 
     <managed-bean>
     	<managed-bean-name>ajaxContext</managed-bean-name>
-    	<managed-bean-class>org.ajax4jsf.framework.ajax.AjaxContext</managed-bean-class>
+    	<managed-bean-class>org.ajax4jsf.framework.ajax.AjaxContextImpl</managed-bean-class>
     	<managed-bean-scope>request</managed-bean-scope>
     </managed-bean>
-     -->
     <component>
 
         <component-type>javax.faces.ViewRoot</component-type>
Added: branches/refactor1/framework/impl/src/main/resources/META-INF/services/org.ajax4jsf.framework.resource.InternetResourceBuilder
===================================================================
--- branches/refactor1/framework/impl/src/main/resources/META-INF/services/org.ajax4jsf.framework.resource.InternetResourceBuilder	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/resources/META-INF/services/org.ajax4jsf.framework.resource.InternetResourceBuilder	2007-06-29 22:14:47 UTC (rev 1425)
@@ -0,0 +1 @@
+org.ajax4jsf.framework.resource.ResourceBuilderImpl
Added: branches/refactor1/framework/impl/src/main/resources/META-INF/services/org.ajax4jsf.framework.skin.SkinFactory
===================================================================
--- branches/refactor1/framework/impl/src/main/resources/META-INF/services/org.ajax4jsf.framework.skin.SkinFactory	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/resources/META-INF/services/org.ajax4jsf.framework.skin.SkinFactory	2007-06-29 22:14:47 UTC (rev 1425)
@@ -0,0 +1 @@
+org.ajax4jsf.framework.skin.SkinFactoryImpl
Modified: branches/refactor1/samples/ajaxPortlet/src/main/webapp/jsf/repeater.xhtml
===================================================================
--- branches/refactor1/samples/ajaxPortlet/src/main/webapp/jsf/repeater.xhtml	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/ajaxPortlet/src/main/webapp/jsf/repeater.xhtml	2007-06-29 22:14:47 UTC (rev 1425)
@@ -3,7 +3,7 @@
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:h="http://java.sun.com/jsf/html"
-      xmlns:a4j="https://ajax4jsf.dev.java.net/ajax">
+      xmlns:a4j="http://richfaces.org/ajax">
 
 	<h:form id="portlet_form">
 	    <h:panelGrid columns="2">
Modified: branches/refactor1/samples/ajaxPortlet/src/main/webapp/jsf/start.xhtml
===================================================================
--- branches/refactor1/samples/ajaxPortlet/src/main/webapp/jsf/start.xhtml	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/ajaxPortlet/src/main/webapp/jsf/start.xhtml	2007-06-29 22:14:47 UTC (rev 1425)
@@ -3,7 +3,7 @@
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:h="http://java.sun.com/jsf/html"
-      xmlns:a4j="https://ajax4jsf.dev.java.net/ajax">
+      xmlns:a4j="http://richfaces.org/ajax">
 
 	<h:form id="portlet_form">
 	    <h:panelGrid columns="2">
Modified: branches/refactor1/samples/dataFilterSliderDemo/src/main/webapp/pages/index.jsp
===================================================================
--- branches/refactor1/samples/dataFilterSliderDemo/src/main/webapp/pages/index.jsp	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/dataFilterSliderDemo/src/main/webapp/pages/index.jsp	2007-06-29 22:14:47 UTC (rev 1425)
@@ -3,7 +3,7 @@
 <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
 <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
 <%@ taglib uri="http://richfaces.ajax4jsf.org/dataFilterSlider" prefix="ez" %>
-<%@ taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j"%>
+<%@ taglib uri="http://richfaces.org/ajax" prefix="a4j"%>
 
 <html>
     <head>
Modified: branches/refactor1/samples/dataTableDemo/src/main/webapp/pages/ajax.jsp
===================================================================
--- branches/refactor1/samples/dataTableDemo/src/main/webapp/pages/ajax.jsp	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/dataTableDemo/src/main/webapp/pages/ajax.jsp	2007-06-29 22:14:47 UTC (rev 1425)
@@ -1,7 +1,7 @@
 <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
 <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
 <%@ taglib uri="http://richfaces.ajax4jsf.org/dataTable" prefix="data" %>
-<%@taglib prefix="a4j" uri="https://ajax4jsf.dev.java.net/ajax" %>
+<%@taglib prefix="a4j" uri="http://richfaces.org/ajax" %>
 <html>
 	<head>
 		<title></title>
Modified: branches/refactor1/samples/dataTableDemo/src/main/webapp/pages/colgroup.jsp
===================================================================
--- branches/refactor1/samples/dataTableDemo/src/main/webapp/pages/colgroup.jsp	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/dataTableDemo/src/main/webapp/pages/colgroup.jsp	2007-06-29 22:14:47 UTC (rev 1425)
@@ -1,7 +1,7 @@
 <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
 <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
 <%@ taglib uri="http://richfaces.ajax4jsf.org/dataTable" prefix="data"%>
-<%@ taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j"%>
+<%@ taglib uri="http://richfaces.org/ajax" prefix="a4j"%>
 <html>
 <head>
 <title></title>
Modified: branches/refactor1/samples/dataTableDemo/src/main/webapp/pages/index.jsp
===================================================================
--- branches/refactor1/samples/dataTableDemo/src/main/webapp/pages/index.jsp	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/dataTableDemo/src/main/webapp/pages/index.jsp	2007-06-29 22:14:47 UTC (rev 1425)
@@ -1,7 +1,7 @@
 <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
 <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
 <%@ taglib uri="http://richfaces.ajax4jsf.org/dataTable" prefix="data" %>
-<%@ taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j" %>
+<%@ taglib uri="http://richfaces.org/ajax" prefix="a4j" %>
 <html>
 	<head>
 		<title></title>
Modified: branches/refactor1/samples/dragDropDemo/src/main/webapp/pages/index.jsp
===================================================================
--- branches/refactor1/samples/dragDropDemo/src/main/webapp/pages/index.jsp	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/dragDropDemo/src/main/webapp/pages/index.jsp	2007-06-29 22:14:47 UTC (rev 1425)
@@ -1,7 +1,7 @@
 <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
 <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
 
-<%@ taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j" %>
+<%@ taglib uri="http://richfaces.org/ajax" prefix="a4j" %>
 
 <%@ taglib uri="http://richfaces.ajax4jsf.org/drag-drop" prefix="dnd" %>
 
Modified: branches/refactor1/samples/gmap-sample/src/main/webapp/gmap.xhtml
===================================================================
--- branches/refactor1/samples/gmap-sample/src/main/webapp/gmap.xhtml	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/gmap-sample/src/main/webapp/gmap.xhtml	2007-06-29 22:14:47 UTC (rev 1425)
@@ -5,7 +5,7 @@
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:c="http://java.sun.com/jstl/core"
       xmlns:gmap="http://richfaces.ajax4jsf.org/gmap"
-      xmlns:a4j="https://ajax4jsf.dev.java.net/ajax">
+      xmlns:a4j="http://richfaces.org/ajax">
 
   <f:view contentType="text/html" >
 
Modified: branches/refactor1/samples/inputNumberSliderDemo/src/main/webapp/pages/index.jsp
===================================================================
--- branches/refactor1/samples/inputNumberSliderDemo/src/main/webapp/pages/index.jsp	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/inputNumberSliderDemo/src/main/webapp/pages/index.jsp	2007-06-29 22:14:47 UTC (rev 1425)
@@ -1,7 +1,7 @@
 <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
 <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
 <%@ taglib uri="http://richfaces.ajax4jsf.org/inputnumber-slider" prefix="rich" %>
-<%@ taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j" %>
+<%@ taglib uri="http://richfaces.org/ajax" prefix="a4j" %>
 
 <html>
 	<head>
Modified: branches/refactor1/samples/modalpanel-sample/src/main/webapp/pages/index.jsp
===================================================================
--- branches/refactor1/samples/modalpanel-sample/src/main/webapp/pages/index.jsp	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/modalpanel-sample/src/main/webapp/pages/index.jsp	2007-06-29 22:14:47 UTC (rev 1425)
@@ -7,7 +7,7 @@
 
 <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
 <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
-<%@ taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j" %>
+<%@ taglib uri="http://richfaces.org/ajax" prefix="a4j" %>
 <%@ taglib uri="http://richfaces.ajax4jsf.org/modal-panel" prefix="mp" %>
 
 <html>
Modified: branches/refactor1/samples/panel-sample/src/main/webapp/panel.xhtml
===================================================================
--- branches/refactor1/samples/panel-sample/src/main/webapp/panel.xhtml	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/panel-sample/src/main/webapp/panel.xhtml	2007-06-29 22:14:47 UTC (rev 1425)
@@ -4,7 +4,7 @@
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:panel="http://richfaces.ajax4jsf.org/panel"
-	  xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+	  xmlns:a4j="http://richfaces.org/ajax"
       >
 <head>      
 <style>
Modified: branches/refactor1/samples/panel-sample/src/main/webapp/panel2.xhtml
===================================================================
--- branches/refactor1/samples/panel-sample/src/main/webapp/panel2.xhtml	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/panel-sample/src/main/webapp/panel2.xhtml	2007-06-29 22:14:47 UTC (rev 1425)
@@ -4,7 +4,7 @@
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:panel="http://richfaces.ajax4jsf.org/panel"
-      xmlns:a4j="https://ajax4jsf.dev.java.net/ajax">
+      xmlns:a4j="http://richfaces.org/ajax">
 <head>
 <style>
  .panel {
Modified: branches/refactor1/samples/portal-echo/src/main/webapp/jsf/repeater.xhtml
===================================================================
--- branches/refactor1/samples/portal-echo/src/main/webapp/jsf/repeater.xhtml	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/portal-echo/src/main/webapp/jsf/repeater.xhtml	2007-06-29 22:14:47 UTC (rev 1425)
@@ -3,7 +3,7 @@
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:h="http://java.sun.com/jsf/html"
-      xmlns:a4j="https://ajax4jsf.dev.java.net/ajax">
+      xmlns:a4j="http://richfaces.org/ajax">
 
 	<h:form id="portlet_form">
 	    <h:panelGrid columns="2">
Modified: branches/refactor1/samples/portal-echo/src/main/webapp/jsf/start.xhtml
===================================================================
--- branches/refactor1/samples/portal-echo/src/main/webapp/jsf/start.xhtml	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/portal-echo/src/main/webapp/jsf/start.xhtml	2007-06-29 22:14:47 UTC (rev 1425)
@@ -3,7 +3,7 @@
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:h="http://java.sun.com/jsf/html"
-      xmlns:a4j="https://ajax4jsf.dev.java.net/ajax">
+      xmlns:a4j="http://richfaces.org/ajax">
 
 	<h:form id="portlet_form">
 	    <a4j:outputPanel ajaxRendered="true">
Modified: branches/refactor1/samples/richfaces-art-datatable/src/main/webapp/pages/columnsSorting.jsp
===================================================================
--- branches/refactor1/samples/richfaces-art-datatable/src/main/webapp/pages/columnsSorting.jsp	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/richfaces-art-datatable/src/main/webapp/pages/columnsSorting.jsp	2007-06-29 22:14:47 UTC (rev 1425)
@@ -1,6 +1,6 @@
 <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
 <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
-<%@ taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j"%>
+<%@ taglib uri="http://richfaces.org/ajax" prefix="a4j"%>
 <%@ taglib uri="http://richfaces.ajax4jsf.org/rich" prefix="rich"%>
 
 <html>
Modified: branches/refactor1/samples/richfaces-art-datatable/src/main/webapp/pages/example1.jsp
===================================================================
--- branches/refactor1/samples/richfaces-art-datatable/src/main/webapp/pages/example1.jsp	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/richfaces-art-datatable/src/main/webapp/pages/example1.jsp	2007-06-29 22:14:47 UTC (rev 1425)
@@ -1,7 +1,7 @@
 <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
 <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
 <%@ taglib uri="http://richfaces.ajax4jsf.org/rich" prefix="rich"%>
-<%@ taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j"%> 
+<%@ taglib uri="http://richfaces.org/ajax" prefix="a4j"%> 
 
 <html>
 	<head>
Modified: branches/refactor1/samples/richfaces-art-datatable/src/main/webapp/pages/example10.jsp
===================================================================
--- branches/refactor1/samples/richfaces-art-datatable/src/main/webapp/pages/example10.jsp	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/richfaces-art-datatable/src/main/webapp/pages/example10.jsp	2007-06-29 22:14:47 UTC (rev 1425)
@@ -1,7 +1,7 @@
 <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
 <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
 <%@ taglib uri="http://richfaces.ajax4jsf.org/rich" prefix="rich"%>
-<%@ taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j"%> 
+<%@ taglib uri="http://richfaces.org/ajax" prefix="a4j"%> 
 
 <html>
 	<head>
Modified: branches/refactor1/samples/richfaces-art-datatable/src/main/webapp/pages/example2.jsp
===================================================================
--- branches/refactor1/samples/richfaces-art-datatable/src/main/webapp/pages/example2.jsp	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/richfaces-art-datatable/src/main/webapp/pages/example2.jsp	2007-06-29 22:14:47 UTC (rev 1425)
@@ -1,7 +1,7 @@
 <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
 <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
 <%@ taglib uri="http://richfaces.ajax4jsf.org/rich" prefix="rich"%>
-<%@ taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j"%> 
+<%@ taglib uri="http://richfaces.org/ajax" prefix="a4j"%> 
 
 <html>
 	<head>
Modified: branches/refactor1/samples/richfaces-art-datatable/src/main/webapp/pages/example3.jsp
===================================================================
--- branches/refactor1/samples/richfaces-art-datatable/src/main/webapp/pages/example3.jsp	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/richfaces-art-datatable/src/main/webapp/pages/example3.jsp	2007-06-29 22:14:47 UTC (rev 1425)
@@ -1,7 +1,7 @@
 <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
 <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
 <%@ taglib uri="http://richfaces.ajax4jsf.org/rich" prefix="rich"%>
-<%@ taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j"%> 
+<%@ taglib uri="http://richfaces.org/ajax" prefix="a4j"%> 
 
 <html>
 	<head>
Modified: branches/refactor1/samples/richfaces-art-datatable/src/main/webapp/pages/example4.jsp
===================================================================
--- branches/refactor1/samples/richfaces-art-datatable/src/main/webapp/pages/example4.jsp	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/richfaces-art-datatable/src/main/webapp/pages/example4.jsp	2007-06-29 22:14:47 UTC (rev 1425)
@@ -1,7 +1,7 @@
 <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
 <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
 <%@ taglib uri="http://richfaces.ajax4jsf.org/rich" prefix="rich"%>
-<%@ taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j"%> 
+<%@ taglib uri="http://richfaces.org/ajax" prefix="a4j"%> 
 
 <html>
 	<head>
Modified: branches/refactor1/samples/richfaces-demo/src/main/webapp/richfaces/dataFilterSlider/usage.xhtml
===================================================================
--- branches/refactor1/samples/richfaces-demo/src/main/webapp/richfaces/dataFilterSlider/usage.xhtml	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/richfaces-demo/src/main/webapp/richfaces/dataFilterSlider/usage.xhtml	2007-06-29 22:14:47 UTC (rev 1425)
@@ -3,7 +3,7 @@
 	xmlns:ui="http://java.sun.com/jsf/facelets"
 	xmlns:h="http://java.sun.com/jsf/html"
 	xmlns:f="http://java.sun.com/jsf/core"
-	xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+	xmlns:a4j="http://richfaces.org/ajax"
 	xmlns:rich="http://richfaces.ajax4jsf.org/rich">
 <ui:composition template="/templates/component-sample.xhtml">
 	<ui:define name="sample">
Modified: branches/refactor1/samples/richfaces-demo/src/main/webapp/richfaces/dataTable/usage.xhtml
===================================================================
--- branches/refactor1/samples/richfaces-demo/src/main/webapp/richfaces/dataTable/usage.xhtml	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/richfaces-demo/src/main/webapp/richfaces/dataTable/usage.xhtml	2007-06-29 22:14:47 UTC (rev 1425)
@@ -3,7 +3,7 @@
 	xmlns:ui="http://java.sun.com/jsf/facelets"
 	xmlns:h="http://java.sun.com/jsf/html"
 	xmlns:f="http://java.sun.com/jsf/core"
-	xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+	xmlns:a4j="http://richfaces.org/ajax"
 	xmlns:rich="http://richfaces.ajax4jsf.org/rich">
 	<ui:composition template="/templates/component-sample.xhtml">
 		<ui:define name="sample">
Modified: branches/refactor1/samples/richfaces-demo/src/main/webapp/richfaces/dataTableScroller/usage.xhtml
===================================================================
--- branches/refactor1/samples/richfaces-demo/src/main/webapp/richfaces/dataTableScroller/usage.xhtml	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/richfaces-demo/src/main/webapp/richfaces/dataTableScroller/usage.xhtml	2007-06-29 22:14:47 UTC (rev 1425)
@@ -3,7 +3,7 @@
 	xmlns:ui="http://java.sun.com/jsf/facelets"
 	xmlns:h="http://java.sun.com/jsf/html"
 	xmlns:f="http://java.sun.com/jsf/core"
-	xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+	xmlns:a4j="http://richfaces.org/ajax"
 	xmlns:rich="http://richfaces.ajax4jsf.org/rich">
 <ui:composition template="/templates/component-sample.xhtml">
 	<ui:define name="sample">
Modified: branches/refactor1/samples/richfaces-demo/src/main/webapp/richfaces/dragSupport/usage.xhtml
===================================================================
--- branches/refactor1/samples/richfaces-demo/src/main/webapp/richfaces/dragSupport/usage.xhtml	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/richfaces-demo/src/main/webapp/richfaces/dragSupport/usage.xhtml	2007-06-29 22:14:47 UTC (rev 1425)
@@ -3,7 +3,7 @@
 	xmlns:ui="http://java.sun.com/jsf/facelets"
 	xmlns:h="http://java.sun.com/jsf/html"
 	xmlns:f="http://java.sun.com/jsf/core"
-	xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+	xmlns:a4j="http://richfaces.org/ajax"
 	xmlns:rich="http://richfaces.ajax4jsf.org/rich">
 <ui:composition template="/templates/component-sample.xhtml">
 	<ui:define name="sample">
Modified: branches/refactor1/samples/richfaces-demo/src/main/webapp/richfaces/dropDownMenu/usage.xhtml
===================================================================
--- branches/refactor1/samples/richfaces-demo/src/main/webapp/richfaces/dropDownMenu/usage.xhtml	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/richfaces-demo/src/main/webapp/richfaces/dropDownMenu/usage.xhtml	2007-06-29 22:14:47 UTC (rev 1425)
@@ -3,7 +3,7 @@
 	xmlns:ui="http://java.sun.com/jsf/facelets"
 	xmlns:h="http://java.sun.com/jsf/html"
 	xmlns:f="http://java.sun.com/jsf/core"
-	xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+	xmlns:a4j="http://richfaces.org/ajax"
 	xmlns:rich="http://richfaces.ajax4jsf.org/rich">
 	<ui:composition template="/templates/component-sample.xhtml">
 		<ui:define name="sample">
Modified: branches/refactor1/samples/richfaces-demo/src/main/webapp/richfaces/gmap/usage.xhtml
===================================================================
--- branches/refactor1/samples/richfaces-demo/src/main/webapp/richfaces/gmap/usage.xhtml	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/richfaces-demo/src/main/webapp/richfaces/gmap/usage.xhtml	2007-06-29 22:14:47 UTC (rev 1425)
@@ -3,7 +3,7 @@
 	xmlns:ui="http://java.sun.com/jsf/facelets"
 	xmlns:h="http://java.sun.com/jsf/html"
 	xmlns:f="http://java.sun.com/jsf/core"
-	xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+	xmlns:a4j="http://richfaces.org/ajax"
 	xmlns:rich="http://richfaces.ajax4jsf.org/rich">
 	<ui:composition template="/templates/component-sample.xhtml">
 		<ui:define name="sample">
Modified: branches/refactor1/samples/richfaces-demo/src/main/webapp/richfaces/inputNumberSlider/usage.xhtml
===================================================================
--- branches/refactor1/samples/richfaces-demo/src/main/webapp/richfaces/inputNumberSlider/usage.xhtml	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/richfaces-demo/src/main/webapp/richfaces/inputNumberSlider/usage.xhtml	2007-06-29 22:14:47 UTC (rev 1425)
@@ -3,7 +3,7 @@
 	xmlns:ui="http://java.sun.com/jsf/facelets"
 	xmlns:h="http://java.sun.com/jsf/html"
 	xmlns:f="http://java.sun.com/jsf/core"
-	xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+	xmlns:a4j="http://richfaces.org/ajax"
 	xmlns:rich="http://richfaces.ajax4jsf.org/rich">
 <ui:composition template="/templates/component-sample.xhtml">
 	<ui:define name="sample">
Modified: branches/refactor1/samples/richfaces-demo/src/main/webapp/richfaces/inputNumberSpinner/usage.xhtml
===================================================================
--- branches/refactor1/samples/richfaces-demo/src/main/webapp/richfaces/inputNumberSpinner/usage.xhtml	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/richfaces-demo/src/main/webapp/richfaces/inputNumberSpinner/usage.xhtml	2007-06-29 22:14:47 UTC (rev 1425)
@@ -3,7 +3,7 @@
 	xmlns:ui="http://java.sun.com/jsf/facelets"
 	xmlns:h="http://java.sun.com/jsf/html"
 	xmlns:f="http://java.sun.com/jsf/core"
-	xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+	xmlns:a4j="http://richfaces.org/ajax"
 	xmlns:rich="http://richfaces.ajax4jsf.org/rich">
 <ui:composition template="/templates/component-sample.xhtml">
 	<ui:define name="sample">
Modified: branches/refactor1/samples/richfaces-demo/src/main/webapp/richfaces/modalPanel/usage.xhtml
===================================================================
--- branches/refactor1/samples/richfaces-demo/src/main/webapp/richfaces/modalPanel/usage.xhtml	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/richfaces-demo/src/main/webapp/richfaces/modalPanel/usage.xhtml	2007-06-29 22:14:47 UTC (rev 1425)
@@ -3,7 +3,7 @@
 	xmlns:ui="http://java.sun.com/jsf/facelets"
 	xmlns:h="http://java.sun.com/jsf/html"
 	xmlns:f="http://java.sun.com/jsf/core"
-	xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+	xmlns:a4j="http://richfaces.org/ajax"
 	xmlns:rich="http://richfaces.ajax4jsf.org/rich">
 <ui:composition template="/templates/component-sample.xhtml">
 	<ui:define name="sample">
Modified: branches/refactor1/samples/richfaces-demo/src/main/webapp/richfaces/paint2D/usage.xhtml
===================================================================
--- branches/refactor1/samples/richfaces-demo/src/main/webapp/richfaces/paint2D/usage.xhtml	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/richfaces-demo/src/main/webapp/richfaces/paint2D/usage.xhtml	2007-06-29 22:14:47 UTC (rev 1425)
@@ -3,7 +3,7 @@
 	xmlns:ui="http://java.sun.com/jsf/facelets"
 	xmlns:h="http://java.sun.com/jsf/html"
 	xmlns:f="http://java.sun.com/jsf/core"
-	xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+	xmlns:a4j="http://richfaces.org/ajax"
 	xmlns:rich="http://richfaces.ajax4jsf.org/rich">
 <ui:composition template="/templates/component-sample.xhtml">
 	<ui:define name="sample">
Modified: branches/refactor1/samples/richfaces-demo/src/main/webapp/richfaces/simpleTogglePanel/usage.xhtml
===================================================================
--- branches/refactor1/samples/richfaces-demo/src/main/webapp/richfaces/simpleTogglePanel/usage.xhtml	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/richfaces-demo/src/main/webapp/richfaces/simpleTogglePanel/usage.xhtml	2007-06-29 22:14:47 UTC (rev 1425)
@@ -3,7 +3,7 @@
 	xmlns:ui="http://java.sun.com/jsf/facelets"
 	xmlns:h="http://java.sun.com/jsf/html"
 	xmlns:f="http://java.sun.com/jsf/core"
-	xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+	xmlns:a4j="http://richfaces.org/ajax"
 	xmlns:rich="http://richfaces.ajax4jsf.org/rich">
 	<ui:composition template="/templates/component-sample.xhtml">
 		<ui:define name="sample">
Modified: branches/refactor1/samples/richfaces-demo/src/main/webapp/richfaces/suggestionBox/usage.xhtml
===================================================================
--- branches/refactor1/samples/richfaces-demo/src/main/webapp/richfaces/suggestionBox/usage.xhtml	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/richfaces-demo/src/main/webapp/richfaces/suggestionBox/usage.xhtml	2007-06-29 22:14:47 UTC (rev 1425)
@@ -3,7 +3,7 @@
 	xmlns:ui="http://java.sun.com/jsf/facelets"
 	xmlns:h="http://java.sun.com/jsf/html"
 	xmlns:f="http://java.sun.com/jsf/core"
-	xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+	xmlns:a4j="http://richfaces.org/ajax"
 	xmlns:rich="http://richfaces.ajax4jsf.org/rich">
 <ui:composition template="/templates/component-sample.xhtml">
 	<ui:define name="sample">
Modified: branches/refactor1/samples/richfaces-demo/src/main/webapp/richfaces/togglePanel/usage.xhtml
===================================================================
--- branches/refactor1/samples/richfaces-demo/src/main/webapp/richfaces/togglePanel/usage.xhtml	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/richfaces-demo/src/main/webapp/richfaces/togglePanel/usage.xhtml	2007-06-29 22:14:47 UTC (rev 1425)
@@ -3,7 +3,7 @@
 	xmlns:ui="http://java.sun.com/jsf/facelets"
 	xmlns:h="http://java.sun.com/jsf/html"
 	xmlns:f="http://java.sun.com/jsf/core"
-	xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+	xmlns:a4j="http://richfaces.org/ajax"
 	xmlns:rich="http://richfaces.ajax4jsf.org/rich">
 	<ui:composition template="/templates/component-sample.xhtml">
 		<ui:define name="sample">
Modified: branches/refactor1/samples/richfaces-demo/src/main/webapp/richfaces/toolBar/usage.xhtml
===================================================================
--- branches/refactor1/samples/richfaces-demo/src/main/webapp/richfaces/toolBar/usage.xhtml	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/richfaces-demo/src/main/webapp/richfaces/toolBar/usage.xhtml	2007-06-29 22:14:47 UTC (rev 1425)
@@ -3,7 +3,7 @@
 	xmlns:ui="http://java.sun.com/jsf/facelets"
 	xmlns:h="http://java.sun.com/jsf/html"
 	xmlns:f="http://java.sun.com/jsf/core"
-	xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+	xmlns:a4j="http://richfaces.org/ajax"
 	xmlns:rich="http://richfaces.ajax4jsf.org/rich">
 	<ui:composition template="/templates/component-sample.xhtml">
 		<ui:define name="sample">
Modified: branches/refactor1/samples/richfaces-demo/src/main/webapp/richfaces/tree/usage.xhtml
===================================================================
--- branches/refactor1/samples/richfaces-demo/src/main/webapp/richfaces/tree/usage.xhtml	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/richfaces-demo/src/main/webapp/richfaces/tree/usage.xhtml	2007-06-29 22:14:47 UTC (rev 1425)
@@ -3,7 +3,7 @@
 	xmlns:ui="http://java.sun.com/jsf/facelets"
 	xmlns:h="http://java.sun.com/jsf/html"
 	xmlns:f="http://java.sun.com/jsf/core"
-	xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+	xmlns:a4j="http://richfaces.org/ajax"
 	xmlns:rich="http://richfaces.ajax4jsf.org/rich">
 	<ui:composition template="/templates/component-sample.xhtml">
 		<ui:define name="sample">
Modified: branches/refactor1/samples/richfaces-demo/src/main/webapp/templates/include/components-navigation.xhtml
===================================================================
--- branches/refactor1/samples/richfaces-demo/src/main/webapp/templates/include/components-navigation.xhtml	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/richfaces-demo/src/main/webapp/templates/include/components-navigation.xhtml	2007-06-29 22:14:47 UTC (rev 1425)
@@ -2,7 +2,7 @@
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:f="http://java.sun.com/jsf/core"
-      xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+      xmlns:a4j="http://richfaces.org/ajax"
       xmlns:rich="http://richfaces.ajax4jsf.org/rich">
 <rich:panel styleClass="panel_menu">
 	<table border="0" cellpadding="3" cellspacing="1">
Modified: branches/refactor1/samples/richfaces-demo/src/main/webapp/templates/include/dynamic-css.xhtml
===================================================================
--- branches/refactor1/samples/richfaces-demo/src/main/webapp/templates/include/dynamic-css.xhtml	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/richfaces-demo/src/main/webapp/templates/include/dynamic-css.xhtml	2007-06-29 22:14:47 UTC (rev 1425)
@@ -2,7 +2,7 @@
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:f="http://java.sun.com/jsf/core"
-      xmlns:a4j="https://ajax4jsf.dev.java.net/ajax">
+      xmlns:a4j="http://richfaces.org/ajax">
 <style type="text/css">
 body{
 	background-image : url(${facesContext.externalContext.requestContextPath}/images/page_bg.gif);
Modified: branches/refactor1/samples/richfaces-demo/src/main/webapp/templates/include/footer.xhtml
===================================================================
--- branches/refactor1/samples/richfaces-demo/src/main/webapp/templates/include/footer.xhtml	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/richfaces-demo/src/main/webapp/templates/include/footer.xhtml	2007-06-29 22:14:47 UTC (rev 1425)
@@ -2,7 +2,7 @@
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:f="http://java.sun.com/jsf/core"
-      xmlns:a4j="https://ajax4jsf.dev.java.net/ajax">
+      xmlns:a4j="http://richfaces.org/ajax">
 Footer will be here
 </html>
 
Modified: branches/refactor1/samples/richfaces-demo/src/main/webapp/templates/include/header.xhtml
===================================================================
--- branches/refactor1/samples/richfaces-demo/src/main/webapp/templates/include/header.xhtml	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/richfaces-demo/src/main/webapp/templates/include/header.xhtml	2007-06-29 22:14:47 UTC (rev 1425)
@@ -2,7 +2,7 @@
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:f="http://java.sun.com/jsf/core"
-      xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+      xmlns:a4j="http://richfaces.org/ajax"
 	xmlns:rich="http://richfaces.ajax4jsf.org/rich">
 <div class="page_brick"></div>
 <table class="top_navbar" cellpadding="0" cellspacing="0" border="0">
Modified: branches/refactor1/samples/richfaces-demo/src/main/webapp/templates/include/references.xhtml
===================================================================
--- branches/refactor1/samples/richfaces-demo/src/main/webapp/templates/include/references.xhtml	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/richfaces-demo/src/main/webapp/templates/include/references.xhtml	2007-06-29 22:14:47 UTC (rev 1425)
@@ -2,7 +2,7 @@
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:f="http://java.sun.com/jsf/core"
-      xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+      xmlns:a4j="http://richfaces.org/ajax"
       xmlns:rich="http://richfaces.ajax4jsf.org/rich">
 <rich:panel styleClass="panel_documents">
 	<strong>#{componentNavigator.currentComponent.name}</strong>
Modified: branches/refactor1/samples/richfaces-demo/src/main/webapp/templates/main.xhtml
===================================================================
--- branches/refactor1/samples/richfaces-demo/src/main/webapp/templates/main.xhtml	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/richfaces-demo/src/main/webapp/templates/main.xhtml	2007-06-29 22:14:47 UTC (rev 1425)
@@ -3,7 +3,7 @@
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:f="http://java.sun.com/jsf/core"
-      xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+      xmlns:a4j="http://richfaces.org/ajax"
 	  xmlns:rich="http://richfaces.ajax4jsf.org/rich">
       
 <head>
Modified: branches/refactor1/samples/seamIntegration/src/main/webapp/pages/index.xhtml
===================================================================
--- branches/refactor1/samples/seamIntegration/src/main/webapp/pages/index.xhtml	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/seamIntegration/src/main/webapp/pages/index.xhtml	2007-06-29 22:14:47 UTC (rev 1425)
@@ -3,7 +3,7 @@
 	  xmlns:f="http://java.sun.com/jsf/core"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:ui="http://java.sun.com/jsf/facelets"
-      xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+      xmlns:a4j="http://richfaces.org/ajax"
       xmlns:c="http://java.sun.com/jsp/jstl/core"  
       >
 	<f:view>
Modified: branches/refactor1/samples/seamIntegration/src/main/webapp/pages/repeater.xhtml
===================================================================
--- branches/refactor1/samples/seamIntegration/src/main/webapp/pages/repeater.xhtml	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/seamIntegration/src/main/webapp/pages/repeater.xhtml	2007-06-29 22:14:47 UTC (rev 1425)
@@ -1,6 +1,6 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml"
-	xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+	xmlns:a4j="http://richfaces.org/ajax"
 	xmlns:f="http://java.sun.com/jsf/core"
 	xmlns:h="http://java.sun.com/jsf/html">
 	<head><title>Simple repeater in seam</title></head>
Modified: branches/refactor1/samples/suggestionbox-sample/src/main/webapp/pages/index.jsp
===================================================================
--- branches/refactor1/samples/suggestionbox-sample/src/main/webapp/pages/index.jsp	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/suggestionbox-sample/src/main/webapp/pages/index.jsp	2007-06-29 22:14:47 UTC (rev 1425)
@@ -2,7 +2,7 @@
 <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
 <%@ taglib uri="http://richfaces.ajax4jsf.org/suggestionbox"
            prefix="rich" %>
-<%@ taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j" %>
+<%@ taglib uri="http://richfaces.org/ajax" prefix="a4j" %>
 
 <html>
 <head>
Modified: branches/refactor1/samples/tabPanelDemo/src/main/webapp/pages/index.jsp
===================================================================
--- branches/refactor1/samples/tabPanelDemo/src/main/webapp/pages/index.jsp	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/tabPanelDemo/src/main/webapp/pages/index.jsp	2007-06-29 22:14:47 UTC (rev 1425)
@@ -2,7 +2,7 @@
 
 <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
 <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
-<%@ taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j" %>
+<%@ taglib uri="http://richfaces.org/ajax" prefix="a4j" %>
 <%@ taglib uri="http://richfaces.ajax4jsf.org/tabPanel" prefix="tabs" %>
 <html>
 	<head>
Modified: branches/refactor1/samples/tabPanelDemo/src/main/webapp/pages/rendering.jsp
===================================================================
--- branches/refactor1/samples/tabPanelDemo/src/main/webapp/pages/rendering.jsp	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/tabPanelDemo/src/main/webapp/pages/rendering.jsp	2007-06-29 22:14:47 UTC (rev 1425)
@@ -2,7 +2,7 @@
 
 <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
 <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
-<%@ taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j" %>
+<%@ taglib uri="http://richfaces.org/ajax" prefix="a4j" %>
 <%@ taglib uri="http://richfaces.ajax4jsf.org/tabPanel" prefix="tabs" %>
 <%@ taglib uri="http://richfaces.ajax4jsf.org/panel" prefix="panel" %>
 <html>
Modified: branches/refactor1/samples/togglePanel-sample/src/main/webapp/pages/index.jsp
===================================================================
--- branches/refactor1/samples/togglePanel-sample/src/main/webapp/pages/index.jsp	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/togglePanel-sample/src/main/webapp/pages/index.jsp	2007-06-29 22:14:47 UTC (rev 1425)
@@ -1,7 +1,7 @@
 <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
 <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
 
-<%@ taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j" %>
+<%@ taglib uri="http://richfaces.org/ajax" prefix="a4j" %>
 
 <%@ taglib uri="http://richfaces.ajax4jsf.org/togglePanel" prefix="rich" %>
 <%@ taglib uri="http://richfaces.ajax4jsf.org/panel" prefix="panel" %>
Modified: branches/refactor1/samples/tomahawkCompability/src/main/webapp/pages/dataTable.jsp
===================================================================
--- branches/refactor1/samples/tomahawkCompability/src/main/webapp/pages/dataTable.jsp	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/tomahawkCompability/src/main/webapp/pages/dataTable.jsp	2007-06-29 22:14:47 UTC (rev 1425)
@@ -1,6 +1,6 @@
 <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
 <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
-<%@ taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j" %>
+<%@ taglib uri="http://richfaces.org/ajax" prefix="a4j" %>
 <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
 <html>
 	<head>
Modified: branches/refactor1/samples/tomahawkCompability/src/main/webapp/pages/index.xhtml
===================================================================
--- branches/refactor1/samples/tomahawkCompability/src/main/webapp/pages/index.xhtml	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/tomahawkCompability/src/main/webapp/pages/index.xhtml	2007-06-29 22:14:47 UTC (rev 1425)
@@ -3,7 +3,7 @@
 	  xmlns:f="http://java.sun.com/jsf/core"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:ui="http://java.sun.com/jsf/facelets"
-      xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+      xmlns:a4j="http://richfaces.org/ajax"
       xmlns:c="http://java.sun.com/jsp/jstl/core"  
       >
 	<f:view>
Modified: branches/refactor1/samples/tomahawkCompability/src/main/webapp/pages/response.jsp
===================================================================
--- branches/refactor1/samples/tomahawkCompability/src/main/webapp/pages/response.jsp	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/tomahawkCompability/src/main/webapp/pages/response.jsp	2007-06-29 22:14:47 UTC (rev 1425)
@@ -1,6 +1,6 @@
 <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
 <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
-<%@ taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j" %>
+<%@ taglib uri="http://richfaces.org/ajax" prefix="a4j" %>
 <html>
 	<head>
 		<title>Response page</title>
Modified: branches/refactor1/samples/tomahawkCompability/src/main/webapp/pages/tabbedPanel.jsp
===================================================================
--- branches/refactor1/samples/tomahawkCompability/src/main/webapp/pages/tabbedPanel.jsp	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/tomahawkCompability/src/main/webapp/pages/tabbedPanel.jsp	2007-06-29 22:14:47 UTC (rev 1425)
@@ -1,6 +1,6 @@
 <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
 <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
-<%@ taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j"%>
+<%@ taglib uri="http://richfaces.org/ajax" prefix="a4j"%>
 <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
 <html>
 <head>
Modified: branches/refactor1/samples/tomahawkCompability/src/main/webapp/pages/tree2.jsp
===================================================================
--- branches/refactor1/samples/tomahawkCompability/src/main/webapp/pages/tree2.jsp	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/tomahawkCompability/src/main/webapp/pages/tree2.jsp	2007-06-29 22:14:47 UTC (rev 1425)
@@ -1,6 +1,6 @@
 <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
 <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
-<%@ taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j"%>
+<%@ taglib uri="http://richfaces.org/ajax" prefix="a4j"%>
 <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
 
 <html>
Modified: branches/refactor1/samples/tree-demo/src/main/webapp/pages/index.jsp
===================================================================
--- branches/refactor1/samples/tree-demo/src/main/webapp/pages/index.jsp	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/tree-demo/src/main/webapp/pages/index.jsp	2007-06-29 22:14:47 UTC (rev 1425)
@@ -1,7 +1,7 @@
 <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
 <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
 <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
-<%@ taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j" %>
+<%@ taglib uri="http://richfaces.org/ajax" prefix="a4j" %>
 <%@ taglib uri="http://richfaces.ajax4jsf.org/drag-drop" prefix="dnd" %>
 <%@ taglib uri="http://richfaces.ajax4jsf.org/tree" prefix="rich"%>
 <html>
Modified: branches/refactor1/samples/tree-demo/src/main/webapp/pages/index2.jsp
===================================================================
--- branches/refactor1/samples/tree-demo/src/main/webapp/pages/index2.jsp	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/tree-demo/src/main/webapp/pages/index2.jsp	2007-06-29 22:14:47 UTC (rev 1425)
@@ -1,7 +1,7 @@
 <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
 <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
 <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
-<%@ taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j" %>
+<%@ taglib uri="http://richfaces.org/ajax" prefix="a4j" %>
 <%@ taglib uri="http://richfaces.ajax4jsf.org/tree" prefix="rich" %>
 <html>
 <head>
Modified: branches/refactor1/samples/useCases/pom.xml
===================================================================
--- branches/refactor1/samples/useCases/pom.xml	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/useCases/pom.xml	2007-06-29 22:14:47 UTC (rev 1425)
@@ -21,5 +21,11 @@
 			<artifactId>jhighlight</artifactId>
 			<version>1.0</version>
 		</dependency>
+		<dependency>
+			<groupId>nekohtml</groupId>
+			<artifactId>nekohtml</artifactId>
+			<version>0.9.5</version>
+			<optional>true</optional>
+		</dependency>
 	</dependencies>
 </project>
\ No newline at end of file
Modified: branches/refactor1/samples/useCases/src/main/webapp/pages/actionparam.xhtml
===================================================================
--- branches/refactor1/samples/useCases/src/main/webapp/pages/actionparam.xhtml	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/useCases/src/main/webapp/pages/actionparam.xhtml	2007-06-29 22:14:47 UTC (rev 1425)
@@ -3,7 +3,7 @@
 	xmlns:ui="http://java.sun.com/jsf/facelets"
 	xmlns:h="http://java.sun.com/jsf/html"
 	xmlns:f="http://java.sun.com/jsf/core"
-	xmlns:a4j="https://ajax4jsf.dev.java.net/ajax">
+	xmlns:a4j="http://richfaces.org/ajax">
 <body>
 <a4j:outputPanel id="messages">
 	<h:messages />
Modified: branches/refactor1/samples/useCases/src/main/webapp/pages/ajaxSingle.xhtml
===================================================================
--- branches/refactor1/samples/useCases/src/main/webapp/pages/ajaxSingle.xhtml	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/useCases/src/main/webapp/pages/ajaxSingle.xhtml	2007-06-29 22:14:47 UTC (rev 1425)
@@ -3,7 +3,7 @@
 	xmlns:f="http://java.sun.com/jsf/core"
 	xmlns:h="http://java.sun.com/jsf/html"
 	xmlns:ui="http://java.sun.com/jsf/facelets"
-	xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+	xmlns:a4j="http://richfaces.org/ajax"
 	xmlns:c="http://java.sun.com/jsp/jstl/core">
 <f:view>
 	<h:form>
Modified: branches/refactor1/samples/useCases/src/main/webapp/pages/ajaxdata.xhtml
===================================================================
--- branches/refactor1/samples/useCases/src/main/webapp/pages/ajaxdata.xhtml	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/useCases/src/main/webapp/pages/ajaxdata.xhtml	2007-06-29 22:14:47 UTC (rev 1425)
@@ -3,7 +3,7 @@
 	  xmlns:f="http://java.sun.com/jsf/core"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:ui="http://java.sun.com/jsf/facelets"
-      xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+      xmlns:a4j="http://richfaces.org/ajax"
       xmlns:c="http://java.sun.com/jsp/jstl/core"  
       >
       <head>
Modified: branches/refactor1/samples/useCases/src/main/webapp/pages/controls.jsp
===================================================================
--- branches/refactor1/samples/useCases/src/main/webapp/pages/controls.jsp	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/useCases/src/main/webapp/pages/controls.jsp	2007-06-29 22:14:47 UTC (rev 1425)
@@ -1,6 +1,6 @@
 <%@page contentType="text/html"%>
 <%@page pageEncoding="UTF-8"%>
-<%@ taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j"%>
+<%@ taglib uri="http://richfaces.org/ajax" prefix="a4j"%>
 <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
 <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
Modified: branches/refactor1/samples/useCases/src/main/webapp/pages/controls.xhtml
===================================================================
--- branches/refactor1/samples/useCases/src/main/webapp/pages/controls.xhtml	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/useCases/src/main/webapp/pages/controls.xhtml	2007-06-29 22:14:47 UTC (rev 1425)
@@ -3,7 +3,7 @@
 	xmlns:f="http://java.sun.com/jsf/core"
 	xmlns:h="http://java.sun.com/jsf/html"
 	xmlns:ui="http://java.sun.com/jsf/facelets"
-	xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+	xmlns:a4j="http://richfaces.org/ajax"
 	xmlns:c="http://java.sun.com/jsp/jstl/core">
 <f:view>
 	<head>
Modified: branches/refactor1/samples/useCases/src/main/webapp/pages/index.xhtml
===================================================================
--- branches/refactor1/samples/useCases/src/main/webapp/pages/index.xhtml	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/useCases/src/main/webapp/pages/index.xhtml	2007-06-29 22:14:47 UTC (rev 1425)
@@ -3,7 +3,7 @@
 	  xmlns:f="http://java.sun.com/jsf/core"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:ui="http://java.sun.com/jsf/facelets"
-      xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+      xmlns:a4j="http://richfaces.org/ajax"
       xmlns:c="http://java.sun.com/jsp/jstl/core"  
       >
 	<f:view>
Modified: branches/refactor1/samples/useCases/src/main/webapp/pages/prependId.xhtml
===================================================================
--- branches/refactor1/samples/useCases/src/main/webapp/pages/prependId.xhtml	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/useCases/src/main/webapp/pages/prependId.xhtml	2007-06-29 22:14:47 UTC (rev 1425)
@@ -1,6 +1,6 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml"
-	xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"    
+	xmlns:a4j="http://richfaces.org/ajax"    
 	xmlns:h="http://java.sun.com/jsf/html"           
     xmlns:f="http://java.sun.com/jsf/core">
     <body>
Modified: branches/refactor1/samples/useCases/src/main/webapp/pages/push.xhtml
===================================================================
--- branches/refactor1/samples/useCases/src/main/webapp/pages/push.xhtml	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/useCases/src/main/webapp/pages/push.xhtml	2007-06-29 22:14:47 UTC (rev 1425)
@@ -3,7 +3,7 @@
 	  xmlns:f="http://java.sun.com/jsf/core"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:ui="http://java.sun.com/jsf/facelets"
-      xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+      xmlns:a4j="http://richfaces.org/ajax"
       xmlns:c="http://java.sun.com/jsp/jstl/core"  
       >
       <body>
Modified: branches/refactor1/samples/useCases/src/main/webapp/pages/repeat.jsp
===================================================================
--- branches/refactor1/samples/useCases/src/main/webapp/pages/repeat.jsp	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/useCases/src/main/webapp/pages/repeat.jsp	2007-06-29 22:14:47 UTC (rev 1425)
@@ -1,6 +1,6 @@
 <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
 <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
-<%@ taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j"%>
+<%@ taglib uri="http://richfaces.org/ajax" prefix="a4j"%>
 <html>
 	<head>
 		<title>Repeater with input components</title>
Modified: branches/refactor1/samples/useCases/src/main/webapp/pages/repeat.xhtml
===================================================================
--- branches/refactor1/samples/useCases/src/main/webapp/pages/repeat.xhtml	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/useCases/src/main/webapp/pages/repeat.xhtml	2007-06-29 22:14:47 UTC (rev 1425)
@@ -1,6 +1,6 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml"
-	xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"    
+	xmlns:a4j="http://richfaces.org/ajax"    
 	xmlns:h="http://java.sun.com/jsf/html"           
     xmlns:f="http://java.sun.com/jsf/core">
 	<head>
Modified: branches/refactor1/samples/useCases/src/main/webapp/pages/setCookie.xhtml
===================================================================
--- branches/refactor1/samples/useCases/src/main/webapp/pages/setCookie.xhtml	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/useCases/src/main/webapp/pages/setCookie.xhtml	2007-06-29 22:14:47 UTC (rev 1425)
@@ -3,7 +3,7 @@
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:f="http://java.sun.com/jsf/core"
-      xmlns:a4j="https://ajax4jsf.dev.java.net/ajax">
+      xmlns:a4j="http://richfaces.org/ajax">
 <f:view>
     <head>
       <meta http-equiv="content-type" content="text/xhtml; charset=UTF-8"/>
Modified: branches/refactor1/samples/useCases/src/main/webapp/pages/testCookie.xhtml
===================================================================
--- branches/refactor1/samples/useCases/src/main/webapp/pages/testCookie.xhtml	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/samples/useCases/src/main/webapp/pages/testCookie.xhtml	2007-06-29 22:14:47 UTC (rev 1425)
@@ -3,7 +3,7 @@
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:f="http://java.sun.com/jsf/core"
-      xmlns:a4j="https://ajax4jsf.dev.java.net/ajax">
+      xmlns:a4j="http://richfaces.org/ajax">
 <f:view>
     <head>
       <meta http-equiv="content-type" content="text/xhtml; charset=UTF-8"/>
Modified: branches/refactor1/ui/core/pom.xml
===================================================================
--- branches/refactor1/ui/core/pom.xml	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/ui/core/pom.xml	2007-06-29 22:14:47 UTC (rev 1425)
@@ -35,7 +35,9 @@
           <library>
             <prefix>org.richfaces</prefix>
             <taglib>
+              <uri>http://richfaces.org/ajax</uri>
               <shortName>a4j</shortName>
+              <displayName>Core ajax components tags</displayName>
             </taglib>
           </library>
         </configuration>
Modified: branches/refactor1/ui/pom.xml
===================================================================
--- branches/refactor1/ui/pom.xml	2007-06-29 20:20:22 UTC (rev 1424)
+++ branches/refactor1/ui/pom.xml	2007-06-29 22:14:47 UTC (rev 1425)
@@ -186,7 +186,7 @@
 		<dependency>
 			<groupId>com.sun.facelets</groupId>
 			<artifactId>jsf-facelets</artifactId>
-			<version>1.1.11</version>
+			<version>1.1.12</version>
 			<optional>true</optional>
 		</dependency>
 		<dependency>
                                
                         
                        
                                
                                18 years, 4 months
                        
                        
                 
         
 
        
            
        
        
        
                
                        
                                
                                
                                        
                                
                         
                        
                                
                                
                                        
                                                
                                        
                                        
                                        JBoss Rich Faces SVN: r1424 - in branches/refactor1: samples/seamIntegration and 45 other directories.
                                
                                
                                
                                    
                                        by richfaces-svn-commits@lists.jboss.org
                                    
                                
                                
                                        Author: alexsmirnov
Date: 2007-06-29 16:20:22 -0400 (Fri, 29 Jun 2007)
New Revision: 1424
Added:
   branches/refactor1/samples/seamIntegration/
   branches/refactor1/samples/seamIntegration/.exadelproject
   branches/refactor1/samples/seamIntegration/pom.xml
   branches/refactor1/samples/seamIntegration/src/
   branches/refactor1/samples/seamIntegration/src/main/
   branches/refactor1/samples/seamIntegration/src/main/java/
   branches/refactor1/samples/seamIntegration/src/main/java/org/
   branches/refactor1/samples/seamIntegration/src/main/java/org/ajax4jsf/
   branches/refactor1/samples/seamIntegration/src/main/java/org/ajax4jsf/Bean.java
   branches/refactor1/samples/seamIntegration/src/main/resources/
   branches/refactor1/samples/seamIntegration/src/main/resources/hibernate.cfg.xml
   branches/refactor1/samples/seamIntegration/src/main/resources/import.sql
   branches/refactor1/samples/seamIntegration/src/main/resources/logging.properties
   branches/refactor1/samples/seamIntegration/src/main/resources/seam.properties
   branches/refactor1/samples/seamIntegration/src/main/webapp/
   branches/refactor1/samples/seamIntegration/src/main/webapp/WEB-INF/
   branches/refactor1/samples/seamIntegration/src/main/webapp/WEB-INF/components.xml
   branches/refactor1/samples/seamIntegration/src/main/webapp/WEB-INF/faces-config.xml
   branches/refactor1/samples/seamIntegration/src/main/webapp/WEB-INF/faces-config.xml.l4t
   branches/refactor1/samples/seamIntegration/src/main/webapp/WEB-INF/web.xml
   branches/refactor1/samples/seamIntegration/src/main/webapp/index.jsp
   branches/refactor1/samples/seamIntegration/src/main/webapp/pages/
   branches/refactor1/samples/seamIntegration/src/main/webapp/pages/index.jsp
   branches/refactor1/samples/seamIntegration/src/main/webapp/pages/index.xhtml
   branches/refactor1/samples/seamIntegration/src/main/webapp/pages/repeater.xhtml
   branches/refactor1/samples/seamIntegration/src/test/
   branches/refactor1/samples/seamIntegration/src/test/java/
   branches/refactor1/samples/seamIntegration/src/test/java/org/
   branches/refactor1/samples/seamIntegration/src/test/java/org/ajax4jsf/
   branches/refactor1/samples/seamIntegration/src/test/java/org/ajax4jsf/BeanTest.java
   branches/refactor1/samples/tomahawkCompability/
   branches/refactor1/samples/tomahawkCompability/.exadelproject
   branches/refactor1/samples/tomahawkCompability/pom.xml
   branches/refactor1/samples/tomahawkCompability/src/
   branches/refactor1/samples/tomahawkCompability/src/main/
   branches/refactor1/samples/tomahawkCompability/src/main/java/
   branches/refactor1/samples/tomahawkCompability/src/main/java/org/
   branches/refactor1/samples/tomahawkCompability/src/main/java/org/ajax4jsf/
   branches/refactor1/samples/tomahawkCompability/src/main/java/org/ajax4jsf/Bean.java
   branches/refactor1/samples/tomahawkCompability/src/main/java/org/ajax4jsf/Container.java
   branches/refactor1/samples/tomahawkCompability/src/main/java/org/ajax4jsf/ControlResultsController.java
   branches/refactor1/samples/tomahawkCompability/src/main/java/org/ajax4jsf/TestTreeModel.java
   branches/refactor1/samples/tomahawkCompability/src/main/java/org/ajax4jsf/TreeBacker.java
   branches/refactor1/samples/tomahawkCompability/src/main/resources/
   branches/refactor1/samples/tomahawkCompability/src/main/webapp/
   branches/refactor1/samples/tomahawkCompability/src/main/webapp/WEB-INF/
   branches/refactor1/samples/tomahawkCompability/src/main/webapp/WEB-INF/faces-config.xml
   branches/refactor1/samples/tomahawkCompability/src/main/webapp/WEB-INF/faces-config.xml.l4t
   branches/refactor1/samples/tomahawkCompability/src/main/webapp/WEB-INF/jboss-web.xml
   branches/refactor1/samples/tomahawkCompability/src/main/webapp/WEB-INF/web.xml
   branches/refactor1/samples/tomahawkCompability/src/main/webapp/index.jsp
   branches/refactor1/samples/tomahawkCompability/src/main/webapp/pages/
   branches/refactor1/samples/tomahawkCompability/src/main/webapp/pages/dataTable.jsp
   branches/refactor1/samples/tomahawkCompability/src/main/webapp/pages/index.xhtml
   branches/refactor1/samples/tomahawkCompability/src/main/webapp/pages/response.jsp
   branches/refactor1/samples/tomahawkCompability/src/main/webapp/pages/tabbedPanel.jsp
   branches/refactor1/samples/tomahawkCompability/src/main/webapp/pages/tree2.jsp
   branches/refactor1/samples/tomahawkCompability/src/test/
   branches/refactor1/samples/tomahawkCompability/src/test/java/
   branches/refactor1/samples/tomahawkCompability/src/test/java/org/
   branches/refactor1/samples/tomahawkCompability/src/test/java/org/ajax4jsf/
   branches/refactor1/samples/tomahawkCompability/src/test/java/org/ajax4jsf/BeanTest.java
   branches/refactor1/samples/useCases/
   branches/refactor1/samples/useCases/.exadelproject
   branches/refactor1/samples/useCases/pom.xml
   branches/refactor1/samples/useCases/src/
   branches/refactor1/samples/useCases/src/main/
   branches/refactor1/samples/useCases/src/main/java/
   branches/refactor1/samples/useCases/src/main/java/control/
   branches/refactor1/samples/useCases/src/main/java/control/test/
   branches/refactor1/samples/useCases/src/main/java/control/test/ControlBackingBean.java
   branches/refactor1/samples/useCases/src/main/java/control/test/Data.java
   branches/refactor1/samples/useCases/src/main/java/org/
   branches/refactor1/samples/useCases/src/main/java/org/ajax4jsf/
   branches/refactor1/samples/useCases/src/main/java/org/ajax4jsf/A4jTestBean.java
   branches/refactor1/samples/useCases/src/main/java/org/ajax4jsf/Bean.java
   branches/refactor1/samples/useCases/src/main/java/org/ajax4jsf/MessageBean.java
   branches/refactor1/samples/useCases/src/main/java/org/ajax4jsf/RepeatData.java
   branches/refactor1/samples/useCases/src/main/resources/
   branches/refactor1/samples/useCases/src/main/resources/logging.properties
   branches/refactor1/samples/useCases/src/main/webapp/
   branches/refactor1/samples/useCases/src/main/webapp/WEB-INF/
   branches/refactor1/samples/useCases/src/main/webapp/WEB-INF/faces-config.xml
   branches/refactor1/samples/useCases/src/main/webapp/WEB-INF/faces-config.xml.l4t
   branches/refactor1/samples/useCases/src/main/webapp/WEB-INF/web.xml
   branches/refactor1/samples/useCases/src/main/webapp/css/
   branches/refactor1/samples/useCases/src/main/webapp/css/global.css
   branches/refactor1/samples/useCases/src/main/webapp/index.jsp
   branches/refactor1/samples/useCases/src/main/webapp/pages/
   branches/refactor1/samples/useCases/src/main/webapp/pages/actionparam.xhtml
   branches/refactor1/samples/useCases/src/main/webapp/pages/ajaxSingle.xhtml
   branches/refactor1/samples/useCases/src/main/webapp/pages/ajaxdata.xhtml
   branches/refactor1/samples/useCases/src/main/webapp/pages/controls.jsp
   branches/refactor1/samples/useCases/src/main/webapp/pages/controls.xhtml
   branches/refactor1/samples/useCases/src/main/webapp/pages/index.jsp
   branches/refactor1/samples/useCases/src/main/webapp/pages/index.xhtml
   branches/refactor1/samples/useCases/src/main/webapp/pages/prependId.xhtml
   branches/refactor1/samples/useCases/src/main/webapp/pages/push.xhtml
   branches/refactor1/samples/useCases/src/main/webapp/pages/repeat.jsp
   branches/refactor1/samples/useCases/src/main/webapp/pages/repeat.xhtml
   branches/refactor1/samples/useCases/src/main/webapp/pages/setCookie.xhtml
   branches/refactor1/samples/useCases/src/main/webapp/pages/testCookie.xhtml
   branches/refactor1/samples/useCases/src/test/
   branches/refactor1/samples/useCases/src/test/java/
   branches/refactor1/samples/useCases/src/test/java/org/
   branches/refactor1/samples/useCases/src/test/java/org/ajax4jsf/
   branches/refactor1/samples/useCases/src/test/java/org/ajax4jsf/BeanTest.java
   branches/refactor1/ui/core/src/test/java/org/ajax4jsf/ajax/repeat/
   branches/refactor1/ui/core/src/test/java/org/ajax4jsf/ajax/repeat/RepeatTestCase.java
Removed:
   branches/refactor1/ui/core/src/test/java/org/ajax4jsf/ajax/RepeatTestCase.java
Modified:
   branches/refactor1/samples/pom.xml
Log:
continue refactoring. Restore core UI sample
Modified: branches/refactor1/samples/pom.xml
===================================================================
--- branches/refactor1/samples/pom.xml	2007-06-29 19:42:46 UTC (rev 1423)
+++ branches/refactor1/samples/pom.xml	2007-06-29 20:20:22 UTC (rev 1424)
@@ -59,11 +59,16 @@
 			<scope>test</scope>
 		</dependency>
 		<dependency>
-			<groupId>org.richfaces</groupId>
-			<artifactId>ajax4jsf</artifactId>
+			<groupId>org.richfaces.framework</groupId>
+			<artifactId>impl</artifactId>
 			<version>3.1.0-SNAPSHOT</version>
 		</dependency>
 		<dependency>
+			<groupId>org.richfaces.ui</groupId>
+			<artifactId>core</artifactId>
+			<version>3.1.0-SNAPSHOT</version>
+		</dependency>
+		<dependency>
 			<groupId>com.sun.facelets</groupId>
 			<artifactId>jsf-facelets</artifactId>
 			<version>1.1.12</version>
@@ -233,8 +238,8 @@
 			</build>
 			<dependencies>
 				<dependency>
-					<groupId>org.richfaces</groupId>
-					<artifactId>ajax4jsf</artifactId>
+					<groupId>org.richfaces.framework</groupId>
+					<artifactId>impl</artifactId>
 					<version>3.1.0-SNAPSHOT</version>
 					<exclusions>
 						<exclusion>
@@ -248,6 +253,21 @@
 					</exclusions>
 				</dependency>
 				<dependency>
+					<groupId>org.richfaces.ui</groupId>
+					<artifactId>core</artifactId>
+					<version>3.1.0-SNAPSHOT</version>
+					<exclusions>
+						<exclusion>
+							<groupId>javax.faces</groupId>
+							<artifactId>jsf-api</artifactId>
+						</exclusion>
+						<exclusion>
+							<groupId>javax.faces</groupId>
+							<artifactId>jsf-impl</artifactId>
+						</exclusion>
+					</exclusions>
+				</dependency>
+				<dependency>
 					<groupId>org.apache.myfaces.core</groupId>
 					<artifactId>myfaces-api</artifactId>
 					<version>${myfaces}</version>
Added: branches/refactor1/samples/seamIntegration/.exadelproject
===================================================================
--- branches/refactor1/samples/seamIntegration/.exadelproject	                        (rev 0)
+++ branches/refactor1/samples/seamIntegration/.exadelproject	2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<FILESYSTEMS APPLICATION_NAME="seamIntegration" ENTITY="FileSystems"
+ VERSION="8.0.4" WORKSPACE_HOME="./src/main/webapp/WEB-INF">
+ <FILESYSTEM ENTITY="FileSystemFolder" LOCATION="%exadel.workspace%" NAME="WEB-INF"/>
+ <FILESYSTEM ENTITY="FileSystemFolder" INFO="Content-Type=Web"
+  LOCATION="%exadel.workspace%/.." NAME="WEB-ROOT"/>
+ <FILESYSTEM ENTITY="FileSystemFolder"
+  LOCATION="%exadel.workspace%/../../java" NAME="src"/>
+ <FILESYSTEM ENTITY="FileSystemFolder"
+  LOCATION="%exadel.workspace%/../../resources" NAME="src2"/>
+ <FILESYSTEM ENTITY="FileSystemFolder"
+  LOCATION="%exadel.workspace%/../../../test/java" NAME="src3"/>
+ <FILESYSTEM ENTITY="FileSystemFolder"
+  LOCATION="%exadel.workspace%/../../../../target/classes" NAME="classes"/>
+ <FILESYSTEM ENTITY="FileSystemFolder"
+  LOCATION="%exadel.eclipse.project%" NAME="seamIntegration"/>
+ <WEB ENTITY="ExadelWeb" MODEL_PATH="/web.xml" SERVLET_VERSION="2.4">
+  <MODULE ENTITY="WebJSFModule" ROOT="WEB-ROOT" SRC="src,src2,src3" URI="/WEB-INF/faces-config.xml"/>
+ </WEB>
+</FILESYSTEMS>
Added: branches/refactor1/samples/seamIntegration/pom.xml
===================================================================
--- branches/refactor1/samples/seamIntegration/pom.xml	                        (rev 0)
+++ branches/refactor1/samples/seamIntegration/pom.xml	2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,70 @@
+<?xml version="1.0"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<parent>
+		<artifactId>samples</artifactId>
+		<groupId>org.ajax4jsf</groupId>
+		<version>1.1.1-SNAPSHOT</version>
+	</parent>
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>org.ajax4jsf</groupId>
+	<artifactId>seamIntegration</artifactId>
+	<packaging>war</packaging>
+	<name>seamIntegration Maven Webapp</name>
+	<build>
+		<finalName>seamIntegration</finalName>
+		<plugins>
+			<plugin>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<inherited>true</inherited>
+				<configuration>
+					<source>1.5</source>
+					<target>1.5</target>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+	<dependencies>
+		<dependency>
+			<groupId>org.hibernate</groupId>
+			<artifactId>hibernate-annotations</artifactId>
+			<version>3.2.1.ga</version>
+		</dependency>
+		<dependency>
+			<groupId>org.hibernate</groupId>
+			<artifactId>hibernate</artifactId>
+			<version>3.2.3.ga</version>
+		</dependency>
+		<dependency>
+			<groupId>org.jboss</groupId>
+			<artifactId>seam</artifactId>
+			<version>1.2.1.ga</version>
+			<systemPath>${seamHome}/jboss-seam.jar</systemPath>
+			<scope>system</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.jboss</groupId>
+			<artifactId>seam-ui</artifactId>
+			<version>1.2.1.ga</version>
+			<systemPath>${seamHome}/jboss-seam-ui.jar</systemPath>
+			<scope>system</scope>
+		</dependency>
+		<dependency>
+			<groupId>jboss</groupId>
+			<artifactId>javassist</artifactId>
+			<version>3.4.ga</version>
+		</dependency>
+		<dependency>
+			<groupId>javax.el</groupId>
+			<artifactId>el-api</artifactId>
+			<version>1.0</version>
+		</dependency>
+		<dependency>
+			<groupId>el-impl</groupId>
+			<artifactId>el-impl</artifactId>
+			<version>1.0</version>
+			<scope>runtime</scope>
+		</dependency>
+	</dependencies>
+</project>
\ No newline at end of file
Added: branches/refactor1/samples/seamIntegration/src/main/java/org/ajax4jsf/Bean.java
===================================================================
--- branches/refactor1/samples/seamIntegration/src/main/java/org/ajax4jsf/Bean.java	                        (rev 0)
+++ branches/refactor1/samples/seamIntegration/src/main/java/org/ajax4jsf/Bean.java	2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,80 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf;
+
+import java.io.Serializable;
+
+import javax.faces.context.ExternalContext;
+import javax.faces.context.FacesContext;
+import javax.servlet.http.HttpSession;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.Begin;
+import org.jboss.seam.annotations.End;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+
+/**
+ * @author $Autor$
+ *
+ */
+@Name("seamBean") @Scope(ScopeType.CONVERSATION) public class Bean implements Serializable {
+    
+    /**
+     * 
+     */
+    private static final long serialVersionUID = -4209339000953631111L;
+    private String text;
+
+    /**
+     * @return the text
+     */
+    public String getText() {
+        return text;
+    }
+
+    /**
+     * @param text the text to set
+     */
+    public void setText(String text) {
+        this.text = text;
+    }
+    
+    @Begin
+    public String start() {
+	return "start";
+    }
+	
+    @End
+    public String stop() {
+	return "stop";
+    }
+    
+    public String clearSession(){
+	ExternalContext externalContext = FacesContext.getCurrentInstance().getExternalContext();
+	HttpSession session = (HttpSession) externalContext.getSession(false);
+	if(null != session){
+	    session.setMaxInactiveInterval(10);
+	}
+	return null;
+    }
+}
\ No newline at end of file
Added: branches/refactor1/samples/seamIntegration/src/main/resources/hibernate.cfg.xml
===================================================================
--- branches/refactor1/samples/seamIntegration/src/main/resources/hibernate.cfg.xml	                        (rev 0)
+++ branches/refactor1/samples/seamIntegration/src/main/resources/hibernate.cfg.xml	2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,17 @@
+<!DOCTYPE hibernate-configuration PUBLIC
+	"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
+	"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
+
+<hibernate-configuration>
+    <session-factory name="java:/bookingDatabase">
+        <property name="show_sql">false</property>
+        <property name="connection.datasource">java:/DefaultDS</property>
+        <property name="hbm2ddl.auto">create-drop</property>
+        <property name="cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
+        <property name="transaction.flush_before_completion">true</property>
+        <property name="connection.release_mode">after_statement</property>
+        <property name="transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
+        <property name="transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
+        
+    </session-factory>
+</hibernate-configuration>
Added: branches/refactor1/samples/seamIntegration/src/main/resources/import.sql
===================================================================
--- branches/refactor1/samples/seamIntegration/src/main/resources/import.sql	                        (rev 0)
+++ branches/refactor1/samples/seamIntegration/src/main/resources/import.sql	2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,22 @@
+insert into Customer (username, password, name) values ('gavin', 'foobar', 'Gavin King')
+insert into Customer (username, password, name) values ('demo', 'demo', 'Demo User')
+insert into Hotel (id, price, name, address, city, state, zip, country) values (1, 120, 'Marriott Courtyard', 'Tower Place, Buckhead', 'Atlanta', 'GA', '30305', 'USA')
+insert into Hotel (id, price, name, address, city, state, zip, country) values (2, 180, 'Doubletree', 'Tower Place, Buckhead', 'Atlanta', 'GA', '30305', 'USA')
+insert into Hotel (id, price, name, address, city, state, zip, country) values (3, 450, 'W Hotel', 'Union Square, Manhattan', 'NY', 'NY', '10011', 'USA')
+insert into Hotel (id, price, name, address, city, state, zip, country) values (4, 450, 'W Hotel', 'Lexington Ave, Manhattan', 'NY', 'NY', '10011', 'USA')
+insert into Hotel (id, price, name, address, city, state, zip, country) values (5, 250, 'Hotel Rouge', '1315 16th Street NW', 'Washington', 'DC', '20036', 'USA')
+insert into Hotel (id, price, name, address, city, state, zip, country) values (6, 300, '70 Park Avenue Hotel', '70 Park Avenue', 'NY', 'NY', '10011', 'USA')
+insert into Hotel (id, price, name, address, city, state, zip, country) values (8, 300, 'Conrad Miami', '1395 Brickell Ave', 'Miami', 'FL', '33131', 'USA')
+insert into Hotel (id, price, name, address, city, state, zip, country) values (9, 80, 'Sea Horse Inn', '2106 N Clairemont Ave', 'Eau Claire', 'WI', '54703', 'USA')
+insert into Hotel (id, price, name, address, city, state, zip, country) values (10, 90, 'Super 8 Eau Claire Campus Area', '1151 W Macarthur Ave', 'Eau Claire', 'WI', '54701', 'USA')
+insert into Hotel (id, price, name, address, city, state, zip, country) values (11, 160, 'Marriot Downtown', '55 Fourth Street', 'San Francisco', 'CA', '94103', 'USA')
+insert into Hotel (id, price, name, address, city, state, zip, country) values (12, 200, 'Hilton Diagonal Mar', 'Passeig del Taulat 262-264', 'Barcelona', 'Catalunya', '08019', 'Spain')
+insert into Hotel (id, price, name, address, city, state, zip, country) values (13, 210, 'Hilton Tel Aviv', 'Independence Park', 'Tel Aviv', '', '63405', 'Israel')
+insert into Hotel (id, price, name, address, city, state, zip, country) values (14, 240, 'InterContinental Tokyo Bay', 'Takeshiba Pier', 'Tokyo', '', '105', 'Japan')
+insert into Hotel (id, price, name, address, city, state, zip, country) values (15, 130, 'Hotel Beaulac', ' Esplanade L�opold-Robert 2', 'Neuchatel', '', '2000', 'Switzerland')
+insert into Hotel (id, price, name, address, city, state, zip, country) values (16, 140, 'Conrad Treasury Place', 'William & George Streets', 'Brisbane', 'QLD', '4001', 'Australia')
+insert into Hotel (id, price, name, address, city, state, zip, country) values (17, 230, 'Ritz Carlton', '1228 Sherbrooke St', 'West Montreal', 'Quebec', 'H3G1H6', 'Canada')
+insert into Hotel (id, price, name, address, city, state, zip, country) values (18, 460, 'Ritz Carlton', 'Peachtree Rd, Buckhead', 'Atlanta', 'GA', '30326', 'USA')
+insert into Hotel (id, price, name, address, city, state, zip, country) values (19, 220, 'Swissotel', '68 Market Street', 'Sydney', 'NSW', '2000', 'Australia')
+insert into Hotel (id, price, name, address, city, state, zip, country) values (20, 250, 'Meli� White House', 'Albany Street', 'Regents Park London', '', 'NW13UP', 'Great Britain')
+insert into Hotel (id, price, name, address, city, state, zip, country) values (21, 210, 'Hotel Allegro', '171 West Randolph Street', 'Chicago', 'IL', '60601', 'USA')
Added: branches/refactor1/samples/seamIntegration/src/main/resources/logging.properties
===================================================================
--- branches/refactor1/samples/seamIntegration/src/main/resources/logging.properties	                        (rev 0)
+++ branches/refactor1/samples/seamIntegration/src/main/resources/logging.properties	2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,22 @@
+handlers org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
+
+############################################################
+# Handler specific properties.
+# Describes specific configuration info for Handlers.
+############################################################
+
+org.apache.juli.FileHandler.level ALL
+org.apache.juli.FileHandler.directory ${catalina.base}/logs
+org.apache.juli.FileHandler.prefix ajax4jsf.
+
+java.util.logging.ConsoleHandler.level ALL
+java.util.logging.ConsoleHandler.formatter java.util.logging.SimpleFormatter
+
+facelets.level=ALL
+com.sun.faces.level=INFO
+org.apache.myfaces.level=ALL
+org.ajax4jsf.level=ALL
+javax.enterprise.resource.webcontainer.jsf.level=INFO
+com.exadel.level=ALL
+org.jboss.seam.level=FINE
+      
\ No newline at end of file
Added: branches/refactor1/samples/seamIntegration/src/main/resources/seam.properties
===================================================================
Added: branches/refactor1/samples/seamIntegration/src/main/webapp/WEB-INF/components.xml
===================================================================
--- branches/refactor1/samples/seamIntegration/src/main/webapp/WEB-INF/components.xml	                        (rev 0)
+++ branches/refactor1/samples/seamIntegration/src/main/webapp/WEB-INF/components.xml	2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<components xmlns="http://jboss.com/products/seam/components"
+	xmlns:core="http://jboss.com/products/seam/core"
+	xmlns:security="http://jboss.com/products/seam/security"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://jboss.com/products/seam/core http://jboss.com/products/seam/core-1.2.xsd
+                 http://jboss.com/products/seam/security http://jboss.com/products/seam/security-1.2.xsd
+                 http://jboss.com/products/seam/components http://jboss.com/products/seam/components-1.2.xsd">
+
+	<core:init debug="true" />
+
+	<core:manager conversation-timeout="120000"
+		concurrent-request-timeout="500" conversation-id-parameter="cid"
+		conversation-is-long-running-parameter="clr" />
+	<!--
+		<core:hibernate-session-factory name="hibernateSessionFactory"/>
+	-->
+	<core:microcontainer installed="false" />
+
+</components>
Added: branches/refactor1/samples/seamIntegration/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- branches/refactor1/samples/seamIntegration/src/main/webapp/WEB-INF/faces-config.xml	                        (rev 0)
+++ branches/refactor1/samples/seamIntegration/src/main/webapp/WEB-INF/faces-config.xml	2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
+                              "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
+<faces-config>
+	<managed-bean>
+		<managed-bean-name>bean</managed-bean-name>
+		<managed-bean-class>org.ajax4jsf.Bean</managed-bean-class>
+		<managed-bean-scope>request</managed-bean-scope>
+	</managed-bean>
+	<lifecycle>
+		<phase-listener>
+			org.jboss.seam.jsf.SeamPhaseListener
+		</phase-listener>
+	</lifecycle>
+	<application>
+		<!-- el-resolver>org.jboss.seam.jsf.SeamELResolver</el-resolver-->
+	</application>
+
+</faces-config>
Added: branches/refactor1/samples/seamIntegration/src/main/webapp/WEB-INF/faces-config.xml.l4t
===================================================================
--- branches/refactor1/samples/seamIntegration/src/main/webapp/WEB-INF/faces-config.xml.l4t	                        (rev 0)
+++ branches/refactor1/samples/seamIntegration/src/main/webapp/WEB-INF/faces-config.xml.l4t	2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<PROCESS ENTITY="JSFProcess"/>
Added: branches/refactor1/samples/seamIntegration/src/main/webapp/WEB-INF/web.xml
===================================================================
--- branches/refactor1/samples/seamIntegration/src/main/webapp/WEB-INF/web.xml	                        (rev 0)
+++ branches/refactor1/samples/seamIntegration/src/main/webapp/WEB-INF/web.xml	2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+	<display-name>Archetype Created Web Application</display-name>
+	<context-param>
+		<param-name>facelets.REFRESH_PERIOD</param-name>
+		<param-value>2</param-value>
+	</context-param>
+	<context-param>
+		<param-name>facelets.DEVELOPMENT</param-name>
+		<param-value>true</param-value>
+	</context-param>
+	<context-param>
+		<param-name>com.sun.faces.validateXml</param-name>
+		<param-value>false</param-value>
+	</context-param>
+	<context-param>
+		<param-name>com.sun.faces.verifyObjects</param-name>
+		<param-value>false</param-value>
+	</context-param>
+	<context-param>
+		<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+		<param-value>server</param-value>
+	</context-param>
+	<context-param>
+		<param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
+		<param-value>com.sun.facelets.FaceletViewHandler</param-value>
+	</context-param>
+	<context-param>
+		<param-name>facelets.VIEW_MAPPINGS</param-name>
+		<param-value>*.xhtml</param-value>
+	</context-param>
+	<context-param>
+		<param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
+		<param-value>false</param-value>
+	</context-param>
+	<!-- 
+	-->
+	<filter>
+		<display-name>Ajax4jsf Filter</display-name>
+		<filter-name>ajax4jsf</filter-name>
+		<filter-class>org.ajax4jsf.Filter</filter-class>
+	</filter>
+	<filter-mapping>
+		<filter-name>ajax4jsf</filter-name>
+		<servlet-name>Faces Servlet</servlet-name>
+		<dispatcher>REQUEST</dispatcher>
+		<dispatcher>FORWARD</dispatcher>
+		<dispatcher>INCLUDE</dispatcher>
+	</filter-mapping>
+	<filter>
+		<filter-name>Seam Filter</filter-name>
+		<filter-class>org.jboss.seam.web.SeamFilter</filter-class>
+	</filter>
+
+	<filter-mapping>
+		<filter-name>Seam Filter</filter-name>
+		<url-pattern>/*</url-pattern>
+	</filter-mapping>
+
+	<listener>
+		<listener-class>
+			org.jboss.seam.servlet.SeamListener
+		</listener-class>
+	</listener>
+	<servlet>
+		<servlet-name>Faces Servlet</servlet-name>
+		<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+		<load-on-startup>1</load-on-startup>
+	</servlet>
+	<servlet-mapping>
+		<servlet-name>Faces Servlet</servlet-name>
+		<url-pattern>/faces/*</url-pattern>
+	</servlet-mapping>
+	<servlet-mapping>
+		<servlet-name>Faces Servlet</servlet-name>
+		<url-pattern>*.jsf</url-pattern>
+	</servlet-mapping>
+	<servlet>
+		<servlet-name>Seam Resource Servlet</servlet-name>
+		<servlet-class>
+			org.jboss.seam.servlet.ResourceServlet
+		</servlet-class>
+	</servlet>
+
+	<servlet-mapping>
+		<servlet-name>Seam Resource Servlet</servlet-name>
+		<url-pattern>/seam/resource/*</url-pattern>
+	</servlet-mapping>
+	<login-config>
+		<auth-method>BASIC</auth-method>
+	</login-config>
+</web-app>
Added: branches/refactor1/samples/seamIntegration/src/main/webapp/index.jsp
===================================================================
--- branches/refactor1/samples/seamIntegration/src/main/webapp/index.jsp	                        (rev 0)
+++ branches/refactor1/samples/seamIntegration/src/main/webapp/index.jsp	2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,11 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+
+<html>
+
+<head></head>
+
+	<body>
+		<jsp:forward page="/pages/index.jsf" />
+	</body>
+
+</html>
\ No newline at end of file
Added: branches/refactor1/samples/seamIntegration/src/main/webapp/pages/index.jsp
===================================================================
--- branches/refactor1/samples/seamIntegration/src/main/webapp/pages/index.jsp	                        (rev 0)
+++ branches/refactor1/samples/seamIntegration/src/main/webapp/pages/index.jsp	2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,12 @@
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<html>
+	<head>
+		<title></title>
+	</head>
+	<body>
+		<f:view>
+			
+		</f:view>
+	</body>	
+</html>  
Added: branches/refactor1/samples/seamIntegration/src/main/webapp/pages/index.xhtml
===================================================================
--- branches/refactor1/samples/seamIntegration/src/main/webapp/pages/index.xhtml	                        (rev 0)
+++ branches/refactor1/samples/seamIntegration/src/main/webapp/pages/index.xhtml	2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,12 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+	  xmlns:f="http://java.sun.com/jsf/core"
+      xmlns:h="http://java.sun.com/jsf/html"
+      xmlns:ui="http://java.sun.com/jsf/facelets"
+      xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+      xmlns:c="http://java.sun.com/jsp/jstl/core"  
+      >
+	<f:view>
+
+	</f:view>
+</html>	
\ No newline at end of file
Added: branches/refactor1/samples/seamIntegration/src/main/webapp/pages/repeater.xhtml
===================================================================
--- branches/refactor1/samples/seamIntegration/src/main/webapp/pages/repeater.xhtml	                        (rev 0)
+++ branches/refactor1/samples/seamIntegration/src/main/webapp/pages/repeater.xhtml	2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+	xmlns:f="http://java.sun.com/jsf/core"
+	xmlns:h="http://java.sun.com/jsf/html">
+	<head><title>Simple repeater in seam</title></head>
+	<body>
+	  <h1>Simple ajax repeater</h1>
+	  <h:form>
+	   <h:panelGrid columns="3" border="1">
+	      <h:inputText value="#{seamBean.text}">
+	         <a4j:support reRender="out,conversation" event="onkeyup"></a4j:support>
+	      </h:inputText>
+	      <h:outputText id="out" value="#{seamBean.text}"></h:outputText>
+	      <h:outputText value="All form submit."></h:outputText>
+	      <h:inputText value="#{bean.text}">
+	         <a4j:support reRender="out,outs,conversation" event="onkeyup"></a4j:support>
+	      </h:inputText>
+	      <h:outputText id="outs" value="#{bean.text}"></h:outputText>
+	      <h:outputText value="AJAX Single submit."></h:outputText>
+	      <h:outputText id="conversation" value="Conversation ID: #{conversation.id}"></h:outputText>
+	      <a4j:commandButton action="#{seamBean.start}" value="Start conversation" reRender="out,conversation"></a4j:commandButton>
+	      <a4j:commandButton action="#{seamBean.stop}" value="Stop conversation" reRender="out,conversation"></a4j:commandButton>
+	   </h:panelGrid>
+	      <a4j:commandButton action="#{seamBean.clearSession}" value="Set session expiration to 10 sec" reRender="out,conversation"></a4j:commandButton>
+	   <a4j:outputPanel ajaxRendered="true">
+	     <h:messages></h:messages>
+	   </a4j:outputPanel>
+	   <a4j:status startText="Request..." stopText=""></a4j:status>
+	   <h2>Non-Ajax conversation</h2>
+	   	  <h:commandButton action="#{seamBean.start}" value="Start conversation" reRender="out,conversation"></h:commandButton>
+	      <h:commandButton action="#{seamBean.stop}" value="Stop conversation" reRender="out,conversation"></h:commandButton>
+	      <h:commandButton  value="Refresh" reRender="out,conversation"></h:commandButton>	   
+	  </h:form>
+	  <a4j:log hotkey="M"></a4j:log>
+	</body>
+</html>
Added: branches/refactor1/samples/seamIntegration/src/test/java/org/ajax4jsf/BeanTest.java
===================================================================
--- branches/refactor1/samples/seamIntegration/src/test/java/org/ajax4jsf/BeanTest.java	                        (rev 0)
+++ branches/refactor1/samples/seamIntegration/src/test/java/org/ajax4jsf/BeanTest.java	2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,46 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/**
+*/
+public class BeanTest 
+    extends TestCase
+{
+    /**
+     * Create the test case
+     *
+     * @param testName name of the test case
+     */
+    public BeanTest( String testName )
+    {
+        super( testName );
+    }
+
+    public void testStub() throws Exception {
+    	
+    }
+}
Added: branches/refactor1/samples/tomahawkCompability/.exadelproject
===================================================================
--- branches/refactor1/samples/tomahawkCompability/.exadelproject	                        (rev 0)
+++ branches/refactor1/samples/tomahawkCompability/.exadelproject	2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<FILESYSTEMS APPLICATION_NAME="tomahawkCompability" ENTITY="FileSystems"
+ VERSION="8.0.4" WORKSPACE_HOME="./src/main/webapp/WEB-INF">
+ <FILESYSTEM ENTITY="FileSystemFolder" LOCATION="%exadel.workspace%" NAME="WEB-INF"/>
+ <FILESYSTEM ENTITY="FileSystemFolder" INFO="Content-Type=Web"
+  LOCATION="%exadel.workspace%/.." NAME="WEB-ROOT"/>
+ <FILESYSTEM ENTITY="FileSystemFolder"
+  LOCATION="%exadel.workspace%/../../java" NAME="src"/>
+ <FILESYSTEM ENTITY="FileSystemFolder"
+  LOCATION="%exadel.workspace%/../../resources" NAME="src2"/>
+ <FILESYSTEM ENTITY="FileSystemFolder"
+  LOCATION="%exadel.workspace%/../../../test/java" NAME="src3"/>
+ <FILESYSTEM ENTITY="FileSystemFolder"
+  LOCATION="%exadel.workspace%/../../../../target/classes" NAME="classes"/>
+ <FILESYSTEM ENTITY="FileSystemFolder"
+  LOCATION="%exadel.eclipse.project%" NAME="tomahawkCompability"/>
+ <WEB ENTITY="ExadelWeb" MODEL_PATH="/web.xml" SERVLET_VERSION="2.4">
+  <MODULE ENTITY="WebJSFModule" ROOT="WEB-ROOT" SRC="src,src2,src3" URI="/WEB-INF/faces-config.xml"/>
+ </WEB>
+</FILESYSTEMS>
Added: branches/refactor1/samples/tomahawkCompability/pom.xml
===================================================================
--- branches/refactor1/samples/tomahawkCompability/pom.xml	                        (rev 0)
+++ branches/refactor1/samples/tomahawkCompability/pom.xml	2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<project>
+	<parent>
+		<artifactId>samples</artifactId>
+		<groupId>org.ajax4jsf</groupId>
+		<version>1.1.1-SNAPSHOT</version>
+	</parent>
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>org.ajax4jsf</groupId>
+	<artifactId>tomahawkCompability</artifactId>
+	<packaging>war</packaging>
+	<name>tomahawkCompability Maven Webapp</name>
+	<properties>
+		<tomahawk>1.1.5</tomahawk>
+	</properties>
+	<build>
+		<finalName>tomahawkCompability</finalName>
+	</build>
+	<dependencies>
+		<dependency>
+			<groupId>org.apache.myfaces.tomahawk</groupId>
+			<artifactId>tomahawk</artifactId>
+			<version>${tomahawk}</version>
+		</dependency>
+	</dependencies>
+</project>
\ No newline at end of file
Added: branches/refactor1/samples/tomahawkCompability/src/main/java/org/ajax4jsf/Bean.java
===================================================================
--- branches/refactor1/samples/tomahawkCompability/src/main/java/org/ajax4jsf/Bean.java	                        (rev 0)
+++ branches/refactor1/samples/tomahawkCompability/src/main/java/org/ajax4jsf/Bean.java	2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,84 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author $Autor$
+ *
+ */
+public class Bean {
+    	private int counter;
+    	
+    	private List containers ;
+    
+    	public Bean() {
+	    containers = new ArrayList();
+	    boolean availible=false;
+	    boolean changed=true;
+	    for(int i=0;i<10;i++){
+		Container c = new Container();
+		c.setContainerNumber(i);
+		c.setAvailable(availible);
+		c.setChanged(changed);
+		availible = ! availible;
+		changed = ! changed;
+		containers.add(c);
+	    }
+	}
+	/**
+	 * @return the counter
+	 */
+	public int getCounter() {
+	    return counter;
+	}
+
+	/**
+	 * @param counter the counter to set
+	 */
+	public void setCounter(int counter) {
+	    this.counter = counter;
+	}
+
+	public String inc() {
+	    counter++;
+	    return null;
+	}
+	public String dec() {
+	    counter--;
+	    return null;
+	}
+	/**
+	 * @return the containers
+	 */
+	public List getContainers() {
+	    return containers;
+	}
+	/**
+	 * @param containers the containers to set
+	 */
+	public void setContainers(List containers) {
+	    this.containers = containers;
+	}
+}
\ No newline at end of file
Added: branches/refactor1/samples/tomahawkCompability/src/main/java/org/ajax4jsf/Container.java
===================================================================
--- branches/refactor1/samples/tomahawkCompability/src/main/java/org/ajax4jsf/Container.java	                        (rev 0)
+++ branches/refactor1/samples/tomahawkCompability/src/main/java/org/ajax4jsf/Container.java	2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,51 @@
+/**
+ * 
+ */
+package org.ajax4jsf;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class Container {
+    private boolean available;
+    private boolean changed;
+    private int containerNumber;
+    /**
+     * @return the available
+     */
+    public boolean isAvailable() {
+        return available;
+    }
+    /**
+     * @param available the available to set
+     */
+    public void setAvailable(boolean available) {
+        this.available = available;
+    }
+    /**
+     * @return the changed
+     */
+    public boolean isChanged() {
+        return changed;
+    }
+    /**
+     * @param changed the changed to set
+     */
+    public void setChanged(boolean changed) {
+        this.changed = changed;
+    }
+    /**
+     * @return the containerNumber
+     */
+    public int getContainerNumber() {
+        return containerNumber;
+    }
+    /**
+     * @param containerNumber the containerNumber to set
+     */
+    public void setContainerNumber(int containerNumber) {
+        this.containerNumber = containerNumber;
+    }
+
+}
Added: branches/refactor1/samples/tomahawkCompability/src/main/java/org/ajax4jsf/ControlResultsController.java
===================================================================
--- branches/refactor1/samples/tomahawkCompability/src/main/java/org/ajax4jsf/ControlResultsController.java	                        (rev 0)
+++ branches/refactor1/samples/tomahawkCompability/src/main/java/org/ajax4jsf/ControlResultsController.java	2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,24 @@
+/**
+ * 
+ */
+package org.ajax4jsf;
+
+import javax.faces.event.ActionEvent;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class ControlResultsController {
+    public String addRow() {
+	return null;
+    }
+
+    public String removeElement() {
+	return null;
+    }
+    
+    public void updateValue(ActionEvent e) {
+	
+    }
+}
Added: branches/refactor1/samples/tomahawkCompability/src/main/java/org/ajax4jsf/TestTreeModel.java
===================================================================
--- branches/refactor1/samples/tomahawkCompability/src/main/java/org/ajax4jsf/TestTreeModel.java	                        (rev 0)
+++ branches/refactor1/samples/tomahawkCompability/src/main/java/org/ajax4jsf/TestTreeModel.java	2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,88 @@
+package org.ajax4jsf;
+import org.apache.myfaces.custom.tree2.TreeNodeBase;
+
+/**
+ * 
+ */
+
+/**
+ * @author asmirnov
+ *
+ */
+public class TestTreeModel extends TreeNodeBase {
+    
+    private String url;
+    
+    private String target="/xxx";
+    private String description="Node";
+    private boolean urlNode=true;
+
+    /**
+     * 
+     */
+    private static final long serialVersionUID = 8653793302556194481L;
+    
+    
+    public TestTreeModel() {
+	super();
+	setLeaf(false);
+	setType("desktop");
+    }
+
+    /**
+     * @return the description
+     */
+    public String getDescription() {
+        return description;
+    }
+
+    /**
+     * @param description the description to set
+     */
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    /**
+     * @return the target
+     */
+    public String getTarget() {
+        return target;
+    }
+
+    /**
+     * @param target the target to set
+     */
+    public void setTarget(String target) {
+        this.target = target;
+    }
+
+    /**
+     * @return the url
+     */
+    public String getUrl() {
+        return url;
+    }
+
+    /**
+     * @param url the url to set
+     */
+    public void setUrl(String url) {
+        this.url = url;
+    }
+
+    /**
+     * @return the urlNode
+     */
+    public boolean isUrlNode() {
+        return urlNode;
+    }
+
+    /**
+     * @param urlNode the urlNode to set
+     */
+    public void setUrlNode(boolean urlNode) {
+        this.urlNode = urlNode;
+    }
+
+}
Added: branches/refactor1/samples/tomahawkCompability/src/main/java/org/ajax4jsf/TreeBacker.java
===================================================================
--- branches/refactor1/samples/tomahawkCompability/src/main/java/org/ajax4jsf/TreeBacker.java	                        (rev 0)
+++ branches/refactor1/samples/tomahawkCompability/src/main/java/org/ajax4jsf/TreeBacker.java	2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,65 @@
+/**
+ * 
+ */
+package org.ajax4jsf;
+
+import javax.faces.component.UIComponent;
+
+import org.apache.myfaces.custom.tree2.TreeModel;
+import org.apache.myfaces.custom.tree2.TreeModelBase;
+import org.apache.myfaces.custom.tree2.TreeNode;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class TreeBacker {
+    
+    UIComponent tree;
+    
+    TreeModel treeModel;
+
+    /**
+     * @return the tree
+     */
+    public UIComponent getTree() {
+        return tree;
+    }
+
+    /**
+     * @param tree the tree to set
+     */
+    public void setTree(UIComponent tree) {
+        this.tree = tree;
+    }
+
+    /**
+     * @return the treeModel
+     */
+    public TreeModel getTreeModel() {
+        if (treeModel == null) {            
+	    TreeNode rootNode = new TestTreeModel();
+	    for(int i=0;i<5;i++){
+		rootNode.getChildren().add(new TestTreeModel());
+	    }
+	    treeModel = new TreeModelBase(rootNode );
+	}
+
+	return treeModel;
+    }
+
+    /**
+     * @param treeModel the treeModel to set
+     */
+    public void setTreeModel(TreeModel treeModel) {
+        this.treeModel = treeModel;
+    }
+
+    /**
+     * 
+     */
+    public TreeBacker() {
+	// TODO Auto-generated constructor stub
+    }
+
+}
Added: branches/refactor1/samples/tomahawkCompability/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- branches/refactor1/samples/tomahawkCompability/src/main/webapp/WEB-INF/faces-config.xml	                        (rev 0)
+++ branches/refactor1/samples/tomahawkCompability/src/main/webapp/WEB-INF/faces-config.xml	2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
+                              "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
+<faces-config>
+ <managed-bean>
+  <managed-bean-name>bean</managed-bean-name>
+  <managed-bean-class>org.ajax4jsf.Bean</managed-bean-class>
+  <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+  <managed-bean-name>beanB</managed-bean-name>
+  <managed-bean-class>org.ajax4jsf.Bean</managed-bean-class>
+  <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+  <managed-bean-name>treeBacker</managed-bean-name>
+  <managed-bean-class>org.ajax4jsf.TreeBacker</managed-bean-class>
+  <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+  <managed-bean-name>controlResultsController</managed-bean-name>
+  <managed-bean-class>org.ajax4jsf.ControlResultsController</managed-bean-class>
+  <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+ <render-kit>
+      <renderer>
+          <component-family>javax.faces.Form</component-family>
+          <renderer-type>javax.faces.Form</renderer-type>
+          <renderer-class>org.ajax4jsf.renderkit.html.AjaxFormRenderer</renderer-class>
+      </renderer>
+      <renderer>
+          <component-family>javax.faces.Command</component-family>
+          <renderer-type>javax.faces.Link</renderer-type>
+          <renderer-class>org.ajax4jsf.renderkit.html.HtmlCommandLinkRenderer</renderer-class>
+      </renderer>
+ </render-kit>
+</faces-config>
Added: branches/refactor1/samples/tomahawkCompability/src/main/webapp/WEB-INF/faces-config.xml.l4t
===================================================================
--- branches/refactor1/samples/tomahawkCompability/src/main/webapp/WEB-INF/faces-config.xml.l4t	                        (rev 0)
+++ branches/refactor1/samples/tomahawkCompability/src/main/webapp/WEB-INF/faces-config.xml.l4t	2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<PROCESS ENTITY="JSFProcess"/>
Added: branches/refactor1/samples/tomahawkCompability/src/main/webapp/WEB-INF/jboss-web.xml
===================================================================
--- branches/refactor1/samples/tomahawkCompability/src/main/webapp/WEB-INF/jboss-web.xml	                        (rev 0)
+++ branches/refactor1/samples/tomahawkCompability/src/main/webapp/WEB-INF/jboss-web.xml	2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,10 @@
+<jboss-web>
+	<class-loading java2ClassLoadingCompliance="false">
+		<loader-repository>
+			org.ajax4jsf:loader=tomahawkCompability
+			<loader-repository-config>
+				java2ParentDelegation=false
+			</loader-repository-config>
+		</loader-repository>
+	</class-loading>
+</jboss-web>
\ No newline at end of file
Added: branches/refactor1/samples/tomahawkCompability/src/main/webapp/WEB-INF/web.xml
===================================================================
--- branches/refactor1/samples/tomahawkCompability/src/main/webapp/WEB-INF/web.xml	                        (rev 0)
+++ branches/refactor1/samples/tomahawkCompability/src/main/webapp/WEB-INF/web.xml	2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+ <display-name>Archetype Created Web Application</display-name>
+ <context-param>
+  <param-name>facelets.REFRESH_PERIOD</param-name>
+  <param-value>2</param-value>
+ </context-param>
+ <context-param>
+  <param-name>facelets.DEVELOPMENT</param-name>
+  <param-value>true</param-value>
+ </context-param>
+ <context-param>
+  <param-name>com.sun.faces.validateXml</param-name>
+  <param-value>true</param-value>
+ </context-param>
+ <context-param>
+  <param-name>com.sun.faces.verifyObjects</param-name>
+  <param-value>true</param-value>
+ </context-param>
+ <context-param>
+  <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+  <param-value>server</param-value>
+ </context-param>
+ <context-param>
+  <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
+  <param-value>com.sun.facelets.FaceletViewHandler</param-value>
+ </context-param>
+ <context-param>
+  <param-name>facelets.VIEW_MAPPINGS</param-name>
+  <param-value>*.xhtml</param-value>
+ </context-param>
+ <context-param>
+  <param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
+  <param-value>false</param-value>
+ </context-param>
+ <!-- 
+ -->
+ <filter>
+  <display-name>Ajax4jsf Filter</display-name>
+  <filter-name>ajax4jsf</filter-name>
+  <filter-class>org.ajax4jsf.Filter</filter-class>
+ </filter>
+ <filter>
+  <filter-name>MyFacesExtensionsFilter</filter-name>
+  <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
+  <init-param>
+   <param-name>maxFileSize</param-name>
+   <param-value>20m</param-value>
+  </init-param>
+ </filter>
+ <!-- extension mapping for adding <script/>, <link/>, and other resource tags to JSF-pages  -->
+ <filter-mapping>
+  <filter-name>MyFacesExtensionsFilter</filter-name>
+  <!-- servlet-name must match the name of your javax.faces.webapp.FacesServlet entry -->
+  <servlet-name>Faces Servlet</servlet-name>
+  <dispatcher>REQUEST</dispatcher>
+  <dispatcher>FORWARD</dispatcher>
+  <dispatcher>INCLUDE</dispatcher>
+ </filter-mapping>
+ <!-- extension mapping for serving page-independent resources (javascript, stylesheets, images, etc.)  -->
+<filter-mapping>
+    <filter-name>MyFacesExtensionsFilter</filter-name>
+    <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
+</filter-mapping><filter-mapping>
+  <filter-name>ajax4jsf</filter-name>
+  <servlet-name>Faces Servlet</servlet-name>
+  <dispatcher>REQUEST</dispatcher>
+  <dispatcher>FORWARD</dispatcher>
+  <dispatcher>INCLUDE</dispatcher>
+ </filter-mapping>
+ <servlet>
+  <servlet-name>Faces Servlet</servlet-name>
+  <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+  <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+  <servlet-name>Faces Servlet</servlet-name>
+  <url-pattern>/faces/*</url-pattern>
+ </servlet-mapping>
+ <login-config>
+  <auth-method>BASIC</auth-method>
+ </login-config>
+</web-app>
Added: branches/refactor1/samples/tomahawkCompability/src/main/webapp/index.jsp
===================================================================
--- branches/refactor1/samples/tomahawkCompability/src/main/webapp/index.jsp	                        (rev 0)
+++ branches/refactor1/samples/tomahawkCompability/src/main/webapp/index.jsp	2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,11 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+
+<html>
+
+<head></head>
+
+	<body>
+		<jsp:forward page="/faces/pages/tabbedPanel.jsp" />
+	</body>
+
+</html>
\ No newline at end of file
Added: branches/refactor1/samples/tomahawkCompability/src/main/webapp/pages/dataTable.jsp
===================================================================
--- branches/refactor1/samples/tomahawkCompability/src/main/webapp/pages/dataTable.jsp	                        (rev 0)
+++ branches/refactor1/samples/tomahawkCompability/src/main/webapp/pages/dataTable.jsp	2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,61 @@
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+<%@ taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j" %>
+<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
+<html>
+	<head>
+		<title>Tomahawk extended data table</title>
+	</head>
+	<body>
+		<f:view>
+		<h:form>
+<t:dataTable id="containers" value="#{bean.containers}"
+					var="GIContainers" styleClass="normalText" border="1"
+					cellspacing="0" cellpadding="0" rowIndexVar="rowIndex">
+					<t:column>
+						<f:facet name="header">?????</f:facet>
+
+						<h:inputText id="container"
+							styleClass="#{(GIContainers.available) ? ((GIContainers.changed) ? 'redText' : '') : 'strikeText'}"
+							size="5" maxlength="17" value="#{GIContainers.containerNumber}">
+							<a4j:support event="onchange" ajaxSingle="true"
+								reRender="containers"
+								actionListener="#{controlResultsController.updateValue}">
+								<a4j:actionparam name="rowIndex" value="#{rowIndex}" />
+								<a4j:actionparam name="changeTable" value="containers" />
+							</a4j:support>
+							<f:validateLength maximum="17" />
+						</h:inputText>
+					</t:column>
+					<t:column>
+						<f:facet name="header">??? ?? ?????????</f:facet>
+
+						<h:inputText size="5" maxlength="17"
+							styleClass="#{(GIContainers.available) ? ((GIContainers.changed) ? 'redText' : '') : 'strikeText'}"
+							value="#{GIContainers.containerNumber}">
+							<f:validateLength maximum="17" />
+						</h:inputText>
+					</t:column>
+					<t:column>
+						<f:facet name="header">
+							<a4j:commandLink immediate="true"
+								action="#{controlResultsController.addRow}"
+								reRender="containers">
+								<h:graphicImage style="border: none" value="/images/plus.gif" />
+								<a4j:actionparam name="plusTable" value="containers"></a4j:actionparam>
+							</a4j:commandLink>
+						</f:facet>
+
+						<a4j:commandLink reRender="containers" immediate="true"
+							style="text-decoration : none"
+							action="#{controlResultsController.removeElement}">
+							<h:graphicImage style="border: none;" value="/images/minus.gif" />
+							<a4j:actionparam name="rowIndex" value="#{rowIndex}"></a4j:actionparam>
+							<a4j:actionparam name="minusTable" value="containers"></a4j:actionparam>
+						</a4j:commandLink>
+					</t:column>
+				</t:dataTable>
+		</h:form>			
+		</f:view>
+	</body>	
+</html>  
Added: branches/refactor1/samples/tomahawkCompability/src/main/webapp/pages/index.xhtml
===================================================================
--- branches/refactor1/samples/tomahawkCompability/src/main/webapp/pages/index.xhtml	                        (rev 0)
+++ branches/refactor1/samples/tomahawkCompability/src/main/webapp/pages/index.xhtml	2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,12 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+	  xmlns:f="http://java.sun.com/jsf/core"
+      xmlns:h="http://java.sun.com/jsf/html"
+      xmlns:ui="http://java.sun.com/jsf/facelets"
+      xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+      xmlns:c="http://java.sun.com/jsp/jstl/core"  
+      >
+	<f:view>
+
+	</f:view>
+</html>	
\ No newline at end of file
Added: branches/refactor1/samples/tomahawkCompability/src/main/webapp/pages/response.jsp
===================================================================
--- branches/refactor1/samples/tomahawkCompability/src/main/webapp/pages/response.jsp	                        (rev 0)
+++ branches/refactor1/samples/tomahawkCompability/src/main/webapp/pages/response.jsp	2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,13 @@
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+<%@ taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j" %>
+<html>
+	<head>
+		<title>Response page</title>
+	</head>
+	<body>
+		<f:view>
+			
+		</f:view>
+	</body>	
+</html>  
Added: branches/refactor1/samples/tomahawkCompability/src/main/webapp/pages/tabbedPanel.jsp
===================================================================
--- branches/refactor1/samples/tomahawkCompability/src/main/webapp/pages/tabbedPanel.jsp	                        (rev 0)
+++ branches/refactor1/samples/tomahawkCompability/src/main/webapp/pages/tabbedPanel.jsp	2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,46 @@
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j"%>
+<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
+<html>
+<head>
+<title>A4J form sample page</title>
+</head>
+<body>
+<h1>Ajax submitted form with Tomahawk components</h1>
+<f:view>
+	<a4j:form id="ajaxform-with-defis" ajaxSubmit="true" reRender="tabs,counter">
+		<h:panelGrid columns="2" border="1">
+			<h:commandButton action="#{bean.inc}" value="Increment" />
+			<h:commandLink value="Decrement" action="#{bean.dec}"></h:commandLink>
+			<h:outputText value="Counter:" />
+			<h:outputText id="counter" value="#{bean.counter}" />
+		</h:panelGrid>
+		<h:panelGroup id="tabs">
+		<t:panelTabbedPane serverSideTabSwitch="true">
+			<t:panelTab label="A">
+			<h:inputText id="a" value="First" />
+			<h:outputLabel value="First tab input" for="a"></h:outputLabel>
+			</t:panelTab>
+			<t:panelTab label="B">
+			<h:inputText id="b" value="First" />
+			<h:outputLabel value="Second tab input" for="b"></h:outputLabel>
+			</t:panelTab>
+		</t:panelTabbedPane>
+		</h:panelGroup>
+	</a4j:form>
+	<h2>Same form without user-provided ID</h2>
+	<f:subview id="subview">
+	<a4j:form ajaxSubmit="true" reRender="counterB" onsubmit="alert('onsubmit');">
+		<h:panelGrid columns="2" border="1">
+			<h:commandButton action="#{beanB.inc}" value="Increment" />
+			<h:commandLink value="Decrement" action="#{beanB.dec}"></h:commandLink>
+			<h:outputText value="Counter:" />
+			<h:outputText id="counterB" value="#{beanB.counter}" />
+		</h:panelGrid>
+		</a4j:form>
+	</f:subview>
+	<a4j:log hotkey="M"/>
+</f:view>
+</body>
+</html>
Added: branches/refactor1/samples/tomahawkCompability/src/main/webapp/pages/tree2.jsp
===================================================================
--- branches/refactor1/samples/tomahawkCompability/src/main/webapp/pages/tree2.jsp	                        (rev 0)
+++ branches/refactor1/samples/tomahawkCompability/src/main/webapp/pages/tree2.jsp	2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,37 @@
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j"%>
+<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
+
+<html>
+<head>
+<title>Response page</title>
+</head>
+<body>
+<f:view>
+	<a4j:form id="menuForm" ajaxSubmit="true" requestDelay="100"
+		reRender="treePanel" ignoreDupResponses="true">
+		<a4j:log hotkey="M" popup="true" level="ALL" />
+		<a4j:outputPanel ajaxRendered="true" layout="inline" id="treePanel">
+			<t:tree2 binding="#{treeBacker.tree}" id="serverTree"
+				showRootNode="true" showNav="true" value="#{treeBacker.treeModel}"
+				var="node" varNodeToggler="t" clientSideToggle="false">
+				<f:facet name="desktop">
+					<h:panelGroup>
+						<t:graphicImage value="/resources/images/desktop.png" border="0" />
+						<a4j:commandLink rendered="#{node.urlNode}"
+							styleClass="#{t.nodeSelected ? 'nodeSelected':'node'}"
+							actionListener="#{t.setNodeSelected}">
+							<h:outputLink value="#{node.url}" target="#{node.target}">
+								<h:outputText value="#{node.description}"
+									styleClass="nodeFolder" />
+							</h:outputLink>
+						</a4j:commandLink>
+					</h:panelGroup>
+				</f:facet>
+			</t:tree2>
+		</a4j:outputPanel>
+	</a4j:form>
+</f:view>
+</body>
+</html>
Added: branches/refactor1/samples/tomahawkCompability/src/test/java/org/ajax4jsf/BeanTest.java
===================================================================
--- branches/refactor1/samples/tomahawkCompability/src/test/java/org/ajax4jsf/BeanTest.java	                        (rev 0)
+++ branches/refactor1/samples/tomahawkCompability/src/test/java/org/ajax4jsf/BeanTest.java	2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,46 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/**
+*/
+public class BeanTest 
+    extends TestCase
+{
+    /**
+     * Create the test case
+     *
+     * @param testName name of the test case
+     */
+    public BeanTest( String testName )
+    {
+        super( testName );
+    }
+
+    public void testStub() throws Exception {
+    	
+    }
+}
Added: branches/refactor1/samples/useCases/.exadelproject
===================================================================
--- branches/refactor1/samples/useCases/.exadelproject	                        (rev 0)
+++ branches/refactor1/samples/useCases/.exadelproject	2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<FILESYSTEMS APPLICATION_NAME="useCases" ENTITY="FileSystems"
+ VERSION="8.0.4" WORKSPACE_HOME="./src/main/webapp/WEB-INF">
+ <FILESYSTEM ENTITY="FileSystemFolder" LOCATION="%exadel.workspace%" NAME="WEB-INF"/>
+ <FILESYSTEM ENTITY="FileSystemFolder" INFO="Content-Type=Web"
+  LOCATION="%exadel.workspace%/.." NAME="WEB-ROOT"/>
+ <FILESYSTEM ENTITY="FileSystemFolder"
+  LOCATION="%exadel.workspace%/../../java" NAME="src"/>
+ <FILESYSTEM ENTITY="FileSystemFolder"
+  LOCATION="%exadel.workspace%/../../resources" NAME="src2"/>
+ <FILESYSTEM ENTITY="FileSystemFolder"
+  LOCATION="%exadel.workspace%/../../../test/java" NAME="src3"/>
+ <FILESYSTEM ENTITY="FileSystemFolder"
+  LOCATION="%exadel.workspace%/../../../../target/classes" NAME="classes"/>
+ <FILESYSTEM ENTITY="FileSystemFolder"
+  LOCATION="%exadel.eclipse.project%" NAME="useCases"/>
+ <WEB ENTITY="ExadelWeb" MODEL_PATH="/web.xml" SERVLET_VERSION="2.4">
+  <MODULE ENTITY="WebJSFModule" ROOT="WEB-ROOT" SRC="src,src2,src3" URI="/WEB-INF/faces-config.xml"/>
+ </WEB>
+</FILESYSTEMS>
Added: branches/refactor1/samples/useCases/pom.xml
===================================================================
--- branches/refactor1/samples/useCases/pom.xml	                        (rev 0)
+++ branches/refactor1/samples/useCases/pom.xml	2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<parent>
+		<artifactId>samples</artifactId>
+		<groupId>org.richfaces</groupId>
+		<version>3.1.0-SNAPSHOT</version>
+	</parent>
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>org.richfaces.samples</groupId>
+	<artifactId>useCases</artifactId>
+	<packaging>war</packaging>
+	<name>useCases Maven Webapp</name>
+	<build>
+		<finalName>useCases</finalName>
+	</build>
+	<dependencies>
+		<dependency>
+			<groupId>com.uwyn</groupId>
+			<artifactId>jhighlight</artifactId>
+			<version>1.0</version>
+		</dependency>
+	</dependencies>
+</project>
\ No newline at end of file
Added: branches/refactor1/samples/useCases/src/main/java/control/test/ControlBackingBean.java
===================================================================
--- branches/refactor1/samples/useCases/src/main/java/control/test/ControlBackingBean.java	                        (rev 0)
+++ branches/refactor1/samples/useCases/src/main/java/control/test/ControlBackingBean.java	2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,141 @@
+/*
+ * ControlBackingBean.java
+ *
+ * Created on May 2, 2007, 2:00 PM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package control.test;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import javax.faces.event.ActionEvent;
+import org.ajax4jsf.ajax.html.HtmlAjaxRepeat;
+
+/**
+ *
+ * @author Administrador
+ */
+public class ControlBackingBean {
+    
+    private List<Data> companyData;
+    
+    private List<Data> agencyData;
+    
+    private List<Data> selectData;
+    
+    private Data selectedCompany;
+    
+    private Data selectedAgency;
+    
+    private HtmlAjaxRepeat selectDataList = new HtmlAjaxRepeat();
+    
+    private Set<Integer> keys;
+    
+    /** Creates a new instance of ControlBackingBean */
+    public ControlBackingBean() {
+        setCompanyData(new ArrayList<Data>());
+        getCompanyData().add(new Data("01","Company 01"));
+        getCompanyData().add(new Data("02","Company 02"));
+        getCompanyData().add(new Data("03","Company 03"));
+        
+        setSelectedCompany(getCompanyData().get(0));
+        
+        setAgencyData(new ArrayList<Data>());
+        getAgencyData().add(new Data("04","Agency 01"));
+        getAgencyData().add(new Data("05","Agency 02"));
+        getAgencyData().add(new Data("06","Agency 03"));
+        
+        setSelectedAgency(getAgencyData().get(0));
+    }
+    
+    public String commandAction() {
+        System.out.println("<<< commandAction >>>");
+        return null;
+    }
+    
+    public void commandActionListener(ActionEvent event) {
+        setSelectData(new ArrayList<Data>());
+        setKeys(new HashSet<Integer>());
+        String component = event.getComponent().getId();
+        if (component.indexOf("company") >= 0) {
+            setSelectData(this.companyData);
+        } else {
+            setSelectData(this.agencyData);
+        }
+        
+        for (int i=0; i < getSelectData().size(); i++) {
+            getKeys().add(i);
+        }
+    }
+    
+    public String selectAction() {
+        System.out.println("<<< selectAction >>>");
+        return null;
+    }
+    
+    public void selectActionListener(ActionEvent event) {
+        System.out.println("<<< selectActionListener >>>");
+    }
+
+    public List<Data> getCompanyData() {
+        return companyData;
+    }
+
+    public void setCompanyData(List<Data> companyData) {
+        this.companyData = companyData;
+    }
+
+    public List<Data> getAgencyData() {
+        return agencyData;
+    }
+
+    public void setAgencyData(List<Data> agencyData) {
+        this.agencyData = agencyData;
+    }
+
+    public Data getSelectedCompany() {
+        return selectedCompany;
+    }
+
+    public void setSelectedCompany(Data selectedCompany) {
+        this.selectedCompany = selectedCompany;
+    }
+
+    public Data getSelectedAgency() {
+        return selectedAgency;
+    }
+
+    public void setSelectedAgency(Data selectedAgency) {
+        this.selectedAgency = selectedAgency;
+    }
+
+    public HtmlAjaxRepeat getSelectDataList() {
+        return selectDataList;
+    }
+
+    public void setSelectDataList(HtmlAjaxRepeat selectDataList) {
+        this.selectDataList = selectDataList;
+    }
+
+    public Set<Integer> getKeys() {
+        return keys;
+    }
+
+    public void setKeys(Set<Integer> keys) {
+        this.keys = keys;
+    }
+
+    public List<Data> getSelectData() {
+        return selectData;
+    }
+
+    public void setSelectData(List<Data> selectData) {
+        this.selectData = selectData;
+    }
+    
+}
Added: branches/refactor1/samples/useCases/src/main/java/control/test/Data.java
===================================================================
--- branches/refactor1/samples/useCases/src/main/java/control/test/Data.java	                        (rev 0)
+++ branches/refactor1/samples/useCases/src/main/java/control/test/Data.java	2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,44 @@
+/*
+ * Data.java
+ *
+ * Created on May 2, 2007, 1:57 PM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package control.test;
+
+/**
+ *
+ * @author Administrador
+ */
+public class Data {
+    
+    private String code;
+    private String desc;
+    
+    public Data(String code, String desc) {
+        this.code = code;
+        this.desc = desc;
+    }
+
+    public String getCode() {
+        return code;
+    }
+
+    public void setCode(String code) {
+        this.code = code;
+    }
+
+    public String getDesc() {
+        return desc;
+    }
+
+    public void setDesc(String desc) {
+        this.desc = desc;
+    }
+    
+    
+    
+}
Added: branches/refactor1/samples/useCases/src/main/java/org/ajax4jsf/A4jTestBean.java
===================================================================
--- branches/refactor1/samples/useCases/src/main/java/org/ajax4jsf/A4jTestBean.java	                        (rev 0)
+++ branches/refactor1/samples/useCases/src/main/java/org/ajax4jsf/A4jTestBean.java	2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,45 @@
+package org.ajax4jsf;
+
+import java.util.Map;
+
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+
+public class A4jTestBean {
+
+	private String param = "Not set yet";
+	private boolean checked;
+
+	public String getParam() {
+		return param;
+	}
+
+	public void setParam(String param) {
+		this.param = param;
+	}
+	
+	private void checkMap() {
+		Map<String, String> params = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();
+		for (String key : params.keySet()) {
+			System.out.println(key + "=" + params.get(key));
+		}
+	}
+	
+	public void perform(ActionEvent actionEvent) {
+		System.out.println("A4jTestBean.perform(ActionEvent) = " + param);
+		checkMap();
+	}
+
+	public void perform() {
+		System.out.println("A4jTestBean.perform() = " + param);
+		checkMap();
+	}
+	
+	public boolean isChecked() {
+		return checked;
+	}
+
+	public void setChecked(boolean checked) {
+		this.checked = checked;
+	}
+}
Added: branches/refactor1/samples/useCases/src/main/java/org/ajax4jsf/Bean.java
===================================================================
--- branches/refactor1/samples/useCases/src/main/java/org/ajax4jsf/Bean.java	                        (rev 0)
+++ branches/refactor1/samples/useCases/src/main/java/org/ajax4jsf/Bean.java	2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,153 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.component.UIComponent;
+import javax.faces.context.ExternalContext;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ValueChangeEvent;
+import javax.servlet.http.Cookie;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * @author $Autor$
+ *
+ */
+public class Bean {
+
+    private java.lang.String text;
+    
+    private String text2;
+    
+    private String[] array = {"one]","two]]>"};
+
+    private String[][] array2 = {{"one","two"},{"three","four"}};
+
+    public java.lang.String getText() {
+	return text;
+    }
+
+	    public void setText(java.lang.String text) {
+	this.text = text;
+    }
+	    
+	    public String ok(){
+		System.out.println("Button pressed");
+		return null;
+	    }
+	    
+	    public String setCookie() {
+		    ExternalContext externalContext = FacesContext.getCurrentInstance().getExternalContext();
+		    HttpServletResponse response = (HttpServletResponse) externalContext.getResponse();
+		    Cookie cookie = new Cookie("test", "Setted at time "+System.currentTimeMillis());
+		    cookie.setMaxAge(60 * 60 * 24 * 365);
+		    response.addCookie(cookie);
+		    return "verify_cookie";
+		  }
+	    
+	    public String getTestCookie(){
+		    ExternalContext externalContext = FacesContext.getCurrentInstance().getExternalContext();
+		    HttpServletRequest request = (HttpServletRequest) externalContext.getRequest();
+		    Cookie[] cookies = request.getCookies();
+		    for (int i = 0; i < cookies.length; i++) {
+			if("test".equals(cookies[i].getName())){
+			    return cookies[i].getValue();
+			}
+		    }
+		    return null;
+	    }
+
+	    /**
+	     * @return the array
+	     */
+	    public String[] getArray() {
+	        return array;
+	    }
+
+	    /**
+	     * @param array the array to set
+	     */
+	    public void setArray(String[] array) {
+	        this.array = array;
+	    }
+
+	    /**
+	     * @return the array2
+	     */
+	    public String[][] getArray2() {
+	        return array2;
+	    }
+
+	    /**
+	     * @param array2 the array2 to set
+	     */
+	    public void setArray2(String[][] array2) {
+	        this.array2 = array2;
+	    }
+
+	    /**
+	     * @return the text2
+	     */
+	    public String getText2() {
+	        return text2;
+	    }
+
+	    /**
+	     * @param text2 the text2 to set
+	     */
+	    public void setText2(String test2) {
+	        this.text2 = test2;
+	    }
+	    
+	    public void validate(FacesContext context, UIComponent input,Object newValue) {
+		FacesMessage msg = new FacesMessage("#{bean.validate} called");
+		context.addMessage(input.getClientId(context), msg);
+		System.out.println("validate");
+	    }
+	    
+	    public void onChange(ValueChangeEvent event) {
+		FacesContext context = FacesContext.getCurrentInstance();
+		UIComponent input = event.getComponent();
+		FacesMessage msg = new FacesMessage("#{bean.onChange} called");
+		context.addMessage(input.getClientId(context), msg);
+		System.out.println("onChange");
+		
+	    }
+	
+	    public void validate2(FacesContext context, UIComponent input,Object newValue) {
+		FacesMessage msg = new FacesMessage("#{bean.validate2} called");
+		context.addMessage(input.getClientId(context), msg);
+		System.out.println("validate2");
+
+	    }
+	    
+	    public void onChange2(ValueChangeEvent event) {
+		FacesContext context = FacesContext.getCurrentInstance();
+		UIComponent input = event.getComponent();
+		FacesMessage msg = new FacesMessage("#{bean.onChange2} called");
+		context.addMessage(input.getClientId(context), msg);
+		System.out.println("onChange2");
+
+	    }
+}
\ No newline at end of file
Added: branches/refactor1/samples/useCases/src/main/java/org/ajax4jsf/MessageBean.java
===================================================================
--- branches/refactor1/samples/useCases/src/main/java/org/ajax4jsf/MessageBean.java	                        (rev 0)
+++ branches/refactor1/samples/useCases/src/main/java/org/ajax4jsf/MessageBean.java	2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,102 @@
+package org.ajax4jsf;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.EventListener;
+import java.util.EventObject;
+import java.util.List;
+
+import org.ajax4jsf.ajax.PushEventListener;
+
+public class MessageBean implements Runnable {
+
+    private String result;
+
+    private boolean running = true;
+
+    private PushEventListener listener;
+    
+    private List messages = new ArrayList(10);
+    
+    private int counter = 0;
+
+    public MessageBean() {
+	// TODO Auto-generated constructor stub
+    }
+
+    /**
+         * @return the result
+         */
+    public String getResult() {
+	return result;
+    }
+
+    /**
+         * @param result
+         *                the result to set
+         */
+    public void setResult(String result) {
+	this.result = result;
+    }
+
+    public void addListener(EventListener listener) {
+	synchronized (listener) {
+	    if (this.listener != listener) {
+		this.listener = (PushEventListener) listener;
+		Thread th = new Thread(this);
+		th.start();
+
+	    }
+	}
+    }
+
+    public void run() {
+	try {
+	    while (isRunning()) {
+		Thread.sleep(10000);
+		Date current = new Date(System.currentTimeMillis());
+		if(messages.size()>=10){
+		    messages.remove(0);
+		}
+		messages.add(messages.size(),String.valueOf(counter++)+" at "+current.toString());
+		System.out.println("event occurs");
+		synchronized (listener) {
+		    listener.onEvent(new EventObject(this));
+		}
+	    }
+	} catch (InterruptedException e) {
+	    e.printStackTrace();
+	}
+
+    }
+
+    /**
+         * @return the running
+         */
+    public synchronized boolean isRunning() {
+	return running;
+    }
+
+    /**
+         * @param running
+         *                the running to set
+         */
+    public synchronized void setRunning(boolean running) {
+	this.running = running;
+    }
+
+    /**
+     * @return the messages
+     */
+    public List getMessages() {
+        return messages;
+    }
+
+    /**
+     * @param messages the messages to set
+     */
+    public void setMessages(List messages) {
+        this.messages = messages;
+    }
+
+}
Added: branches/refactor1/samples/useCases/src/main/java/org/ajax4jsf/RepeatData.java
===================================================================
--- branches/refactor1/samples/useCases/src/main/java/org/ajax4jsf/RepeatData.java	                        (rev 0)
+++ branches/refactor1/samples/useCases/src/main/java/org/ajax4jsf/RepeatData.java	2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,40 @@
+/**
+ * 
+ */
+package org.ajax4jsf;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class RepeatData {
+    
+    private List data;
+    
+    public RepeatData() {
+	data = new ArrayList(10);
+	for(int i=0;i<10;i++){
+	    Bean bean = new Bean();
+	    bean.setText("Row "+i);
+	    data.add(bean);
+	}
+    }
+
+    /**
+     * @return the data
+     */
+    public List getData() {
+        return data;
+    }
+
+    /**
+     * @param data the data to set
+     */
+    public void setData(List data) {
+        this.data = data;
+    }
+
+}
Added: branches/refactor1/samples/useCases/src/main/resources/logging.properties
===================================================================
--- branches/refactor1/samples/useCases/src/main/resources/logging.properties	                        (rev 0)
+++ branches/refactor1/samples/useCases/src/main/resources/logging.properties	2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,21 @@
+handlers org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
+
+############################################################
+# Handler specific properties.
+# Describes specific configuration info for Handlers.
+############################################################
+
+org.apache.juli.FileHandler.level ALL
+org.apache.juli.FileHandler.directory ${catalina.base}/logs
+org.apache.juli.FileHandler.prefix ajax4jsf.
+
+java.util.logging.ConsoleHandler.level ALL
+java.util.logging.ConsoleHandler.formatter java.util.logging.SimpleFormatter
+
+facelets.level=ALL
+com.sun.faces.level=INFO
+org.apache.myfaces.level=ALL
+org.ajax4jsf.level=ALL
+javax.enterprise.resource.webcontainer.jsf.level=INFO
+com.exadel.level=ALL
+      
\ No newline at end of file
Added: branches/refactor1/samples/useCases/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- branches/refactor1/samples/useCases/src/main/webapp/WEB-INF/faces-config.xml	                        (rev 0)
+++ branches/refactor1/samples/useCases/src/main/webapp/WEB-INF/faces-config.xml	2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
+                              "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
+<faces-config>
+ <managed-bean>
+  <managed-bean-name>bean</managed-bean-name>
+  <managed-bean-class>org.ajax4jsf.Bean</managed-bean-class>
+  <managed-bean-scope>request</managed-bean-scope>
+  <managed-property>
+   <property-name>text</property-name>
+   <property-class>java.lang.String</property-class>
+   <null-value/>
+  </managed-property>
+ </managed-bean>
+ <managed-bean>
+  <managed-bean-name>repeatData</managed-bean-name>
+  <managed-bean-class>org.ajax4jsf.RepeatData</managed-bean-class>
+  <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+  <managed-bean-name>a4jTestBean</managed-bean-name>
+  <managed-bean-class>org.ajax4jsf.A4jTestBean</managed-bean-class>
+  <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+  <managed-bean-name>messageBean</managed-bean-name>
+  <managed-bean-class>org.ajax4jsf.MessageBean</managed-bean-class>
+  <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+    <managed-bean>
+        <managed-bean-name>dataManager</managed-bean-name>
+        <managed-bean-class>control.test.ControlBackingBean</managed-bean-class>
+        <managed-bean-scope>request</managed-bean-scope>
+  </managed-bean>
+
+ <navigation-rule>
+  <navigation-case>
+   <from-outcome>verify_cookie</from-outcome>
+   <to-view-id>/pages/testCookie.xhtml</to-view-id>
+   <redirect/>
+  </navigation-case>
+ </navigation-rule>
+</faces-config>
Added: branches/refactor1/samples/useCases/src/main/webapp/WEB-INF/faces-config.xml.l4t
===================================================================
--- branches/refactor1/samples/useCases/src/main/webapp/WEB-INF/faces-config.xml.l4t	                        (rev 0)
+++ branches/refactor1/samples/useCases/src/main/webapp/WEB-INF/faces-config.xml.l4t	2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<PROCESS ENTITY="JSFProcess">
+ <PROCESS-ITEM ENTITY="JSFProcessGroup" NAME="rules:" SHAPE="32,17,0,0">
+  <PROCESS-ITEM ENTITY="JSFProcessItem" ID="rules::0" NAME="item">
+   <PROCESS-ITEM-OUTPUT ENTITY="JSFProcessItemOutput"
+    ID="verify_cookie::#pages#testCookie.xhtml" NAME="output"
+    PATH="/pages/testCookie.xhtml"
+    TARGET="rules:#pages#testCookie.xhtml" TITLE="verify_cookie"/>
+  </PROCESS-ITEM>
+ </PROCESS-ITEM>
+ <PROCESS-ITEM ENTITY="JSFProcessGroup"
+  NAME="rules:#pages#testCookie.xhtml" PATH="/pages/testCookie.xhtml" SHAPE="240,33,0,0"/>
+</PROCESS>
Added: branches/refactor1/samples/useCases/src/main/webapp/WEB-INF/web.xml
===================================================================
--- branches/refactor1/samples/useCases/src/main/webapp/WEB-INF/web.xml	                        (rev 0)
+++ branches/refactor1/samples/useCases/src/main/webapp/WEB-INF/web.xml	2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+ <display-name>Archetype Created Web Application</display-name>
+ <context-param>
+  <param-name>facelets.REFRESH_PERIOD</param-name>
+  <param-value>2</param-value>
+ </context-param>
+ <context-param>
+  <param-name>facelets.DEVELOPMENT</param-name>
+  <param-value>true</param-value>
+ </context-param>
+ <context-param>
+  <param-name>com.sun.faces.validateXml</param-name>
+  <param-value>false</param-value>
+ </context-param>
+ <context-param>
+  <param-name>com.sun.faces.verifyObjects</param-name>
+  <param-value>true</param-value>
+ </context-param>
+ <context-param>
+  <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+  <param-value>server</param-value>
+ </context-param>
+ <context-param>
+  <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
+  <param-value>com.sun.facelets.FaceletViewHandler</param-value>
+ </context-param>
+ <context-param>
+  <param-name>facelets.VIEW_MAPPINGS</param-name>
+  <param-value>*.xhtml</param-value>
+ </context-param>
+ <context-param>
+  <param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
+  <param-value>false</param-value>
+ </context-param>
+ <!-- 
+ --> 
+ <filter>
+  <display-name>Ajax4jsf Filter</display-name>
+  <filter-name>ajax4jsf</filter-name>
+  <filter-class>org.ajax4jsf.FastFilter</filter-class>
+ </filter>
+ <filter-mapping>
+  <filter-name>ajax4jsf</filter-name>
+  <servlet-name>Faces Servlet</servlet-name>
+  <dispatcher>REQUEST</dispatcher>
+  <dispatcher>FORWARD</dispatcher>
+  <dispatcher>INCLUDE</dispatcher>
+ </filter-mapping>
+ <servlet>
+  <servlet-name>Faces Servlet</servlet-name>
+  <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+  <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+  <servlet-name>Faces Servlet</servlet-name>
+  <url-pattern>/faces/*</url-pattern>
+ </servlet-mapping>
+ <login-config>
+  <auth-method>BASIC</auth-method>
+ </login-config>
+</web-app>
Added: branches/refactor1/samples/useCases/src/main/webapp/css/global.css
===================================================================
--- branches/refactor1/samples/useCases/src/main/webapp/css/global.css	                        (rev 0)
+++ branches/refactor1/samples/useCases/src/main/webapp/css/global.css	2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,232 @@
+body {
+	font-family: Verdana;
+	font-size: 10px;
+	padding: 0px;
+	margin: 0px;
+}
+body.appBody {
+    background-color: #FFFFFF;
+    padding-top : 5px;
+    padding-left : 5px;
+    padding-right : 5px;
+    padding-bottom : 5px;
+}
+.normal {
+	font-family: Verdana, Arial, Helvetica, sans-serif;
+	font-size: 10px;
+        margin-right : 3px;      
+}
+label.normal {
+  font-weight : bold;
+}
+.error {
+	font-family: Verdana, Arial, Helvetica, sans-serif;
+	font-size: 10px;
+        color : red;  
+}
+label.error {
+  font-weight : bold;
+}
+#navigationHandlerContainer {
+	top: 0px;
+	float: left;
+}
+#navLogoContainer {
+	margin-top: 15px;
+	margin-bottom: 10px;
+	text-align: center;
+}
+#navModuleContainer {
+	margin-left: 2px;
+}
+#navModule {
+	width: 145px;
+	font-size: 10px;
+}
+#navTreeContainer {
+	margin-top: 13px;
+	background-color: #EEEEEE;
+	width: 99%;
+	margin-left: 3px;
+	padding-top: 3px;
+	padding-left: 3px;
+	overflow-y: auto;
+	overflow-x: hidden;
+}
+.navigationRow {
+    display: block;
+    margin-left: inherit;
+    margin-bottom: 2px;
+}
+.navigationBulletCell {
+    width: 13px;
+    float: left;
+    vertical-align: middle;
+}
+.navigationCommandCell {
+    width: auto;
+    vertical-align: middle;
+}
+.navigationChildrenRow {
+    display: none;
+    padding-left: 15px;
+}
+.navigationCommandLink {
+    font-family: Verdana;
+    font-size: 10px;
+    text-decoration: none;
+    color: #003366;
+}
+.navigationCommandLink:hover {
+    color: #000000;
+}
+.navigationCommandParagraph {
+    font-family: Verdana;
+    font-size: 10px;
+    text-decoration: none;
+    color: #003366;
+    cursor: default;
+}
+.navigationSelectedCommandLink {
+    font-family: Verdana;
+    font-size: 10px;
+    text-decoration: none;
+    color: #003366;
+    font-weight: bold;
+    text-decoration: underline;
+}
+.navigationSelectedCommandLink:hover {
+    color: #000000;
+}
+.navigationHandlerImage {
+    border: 0px none #B83638;
+}
+.commandBarIni{
+    float: left;  
+}
+#headerLogoContainer {
+	margin-top: 10px;
+	margin-left: 10px;
+	float: left;
+}
+#commandBarContainer {
+	background-image: url(../imgs/commandBarBgr.gif);
+	padding: 0px;
+	margin-top: 0px;
+	width: 300px;
+	height: 43px;
+	float: right;
+}
+.commandIcon {
+    margin-top: 10px;
+    margin-right:5px;
+    float : left;
+}
+.menuTab{
+	width: 100%;
+	height: 19px;
+	background-color: #999999;
+}
+.menuTabCommand {
+	cursor: default;
+}
+.menuTabButton {
+	float: left;
+	height: 19px;
+	margin-right: 4px;
+}
+.menuTabTitle {
+	float:left;
+	color: #FFFFFF;
+	font-weight: bold;
+	padding-left: 3px;
+	padding-top: 3px;
+}
+.menuTabChildrenContainer{
+	display: none;
+	margin-top: 3px;
+	margin-left: 3px;
+}
+fieldset {
+	margin: auto;
+	padding: auto;
+	width: 300px;
+}
+#loginFormContainer {
+	width: 100%;
+	height: 100%;
+	padding-top: 100px;
+	text-align: center;
+}
+.formRow {
+    margin: 5px;
+    display: block;
+}
+.formLabel {
+    text-align: left;
+    width: 150px;
+    float: left;
+}
+.formField {
+}
+#infoBarContainer {
+	float: left;
+	margin-left: 5px;
+	width: 300px;
+	height: 74px;
+	background-image: url(../imgs/infoBarBgr.gif);
+}
+#infoBarContent {
+	padding-top: 10px;
+	padding-left: 5px;
+	float: left;
+        width : 250px;
+}
+.infoBarIni {
+  float : left;
+}
+.infoBarEnd {
+  float : right;
+}
+.headerSelectLink {
+    display:block;
+    color:#FFFFFF;
+   font-weight:bold
+}
+.headerSelectLink:hover {
+  color : #CCCCCC;
+}
+.linePanel {
+    display: inherit;
+    margin-top : 2px;  
+}
+/* Rich Panel*/
+.rich-panel {
+  width : 95%;
+  margin-left : auto ;
+  margin-right : auto ;
+}
+.rich-table {
+    width : 100%;
+    margin-left : auto ;
+    margin-right : auto ;
+}
+  background-color : ;
+/* Tables */
+.oddDataTableRow {
+    background-color : #FFFFFF;
+}
+.evenDataTableRow {
+    background-color : #CCCCCC;
+}
+/* Messages */
+.errorMessageStyle {
+    border: 1px solid #000000;
+    background-color: #EE0000;
+    color: #000000;
+}
+.infoMessageStyle {
+    border: 1px solid #000000;
+    background-color: #33FFFF;
+    color: #000000;
+}
\ No newline at end of file
Added: branches/refactor1/samples/useCases/src/main/webapp/index.jsp
===================================================================
--- branches/refactor1/samples/useCases/src/main/webapp/index.jsp	                        (rev 0)
+++ branches/refactor1/samples/useCases/src/main/webapp/index.jsp	2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,11 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+
+<html>
+
+<head></head>
+
+	<body>
+		<jsp:forward page="/faces/pages/index.jsf" />
+	</body>
+
+</html>
\ No newline at end of file
Added: branches/refactor1/samples/useCases/src/main/webapp/pages/actionparam.xhtml
===================================================================
--- branches/refactor1/samples/useCases/src/main/webapp/pages/actionparam.xhtml	                        (rev 0)
+++ branches/refactor1/samples/useCases/src/main/webapp/pages/actionparam.xhtml	2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:ui="http://java.sun.com/jsf/facelets"
+	xmlns:h="http://java.sun.com/jsf/html"
+	xmlns:f="http://java.sun.com/jsf/core"
+	xmlns:a4j="https://ajax4jsf.dev.java.net/ajax">
+<body>
+<a4j:outputPanel id="messages">
+	<h:messages />
+</a4j:outputPanel>
+<h:form id="testForm">
+	<h:selectBooleanCheckbox value="#{a4jTestBean.checked}">
+		<a4j:support event="onchange" actionListener="#{a4jTestBean.perform}"
+			reRender="output, messages">
+			<a4j:actionparam name="param" value="Checkbox clicked"
+				assignTo="#{a4jTestBean.param}" />
+		</a4j:support>
+	</h:selectBooleanCheckbox>
+	<br />
+	<a4j:commandButton limitToList="true" reRender="output, messages"
+		actionListener="#{a4jTestBean.perform}" value="a4j:commandButton">
+		<a4j:actionparam name="param" value="Command Button clicked"
+			assignTo="#{a4jTestBean.param}" />
+	</a4j:commandButton>
+	<br />
+	<a4j:outputPanel id="output">
+	       <h:outputText value="a4jTestBean.param:   #{a4jTestBean.param}"/>
+	       <h:outputText value=" Request parameter 'param':   #{params.param}"/>
+	  </a4j:outputPanel>
+	<br />
+	<h:commandButton action="#{a4jTestBean.perform}"
+		value="h:commandButton" />
+</h:form>
+<a4j:log popup="false"></a4j:log>
+</body>
+</html>
Added: branches/refactor1/samples/useCases/src/main/webapp/pages/ajaxSingle.xhtml
===================================================================
--- branches/refactor1/samples/useCases/src/main/webapp/pages/ajaxSingle.xhtml	                        (rev 0)
+++ branches/refactor1/samples/useCases/src/main/webapp/pages/ajaxSingle.xhtml	2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,61 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:f="http://java.sun.com/jsf/core"
+	xmlns:h="http://java.sun.com/jsf/html"
+	xmlns:ui="http://java.sun.com/jsf/facelets"
+	xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+	xmlns:c="http://java.sun.com/jsp/jstl/core">
+<f:view>
+	<h:form>
+		<h:panelGrid columns="2">
+			<h:inputText id="text" value="#{bean.text}"
+				validator="#{bean.validate}" valueChangeListener="#{bean.onChange}">
+				<a4j:support event="onkeyup" ajaxSingle="true"></a4j:support>
+			</h:inputText>
+			<a4j:outputPanel ajaxRendered="true">
+				<h:outputText value="#{bean.text}"></h:outputText>
+				<h:message for="text"></h:message>
+			</a4j:outputPanel>
+			<h:inputText id="text2" value="#{bean.text2}"
+				validator="#{bean.validate2}"
+				valueChangeListener="#{bean.onChange2}">
+				<a4j:support event="onkeyup" ajaxSingle="true"></a4j:support>
+			</h:inputText>
+			<a4j:outputPanel ajaxRendered="true">
+				<h:outputText value="#{bean.text2}"></h:outputText>
+				<h:message for="text2"></h:message>
+			</a4j:outputPanel>
+		</h:panelGrid>
+		<h2>Ajax support with 'ajaxSingle="true"' in a4j:repeat</h2>
+		<ul>
+			<a4j:repeat value="#{repeatData.data}" var="row">
+				<li><h:inputText id="repeattext" value="#{row.text}"
+					validator="#{bean.validate}" valueChangeListener="#{bean.onChange}">
+					<a4j:support event="onkeyup" ajaxSingle="true"></a4j:support>
+				</h:inputText> <a4j:outputPanel ajaxRendered="true">
+					<h:outputText value="#{row.text}"></h:outputText>
+					<h:message for="repeattext"></h:message>
+				</a4j:outputPanel></li>
+			</a4j:repeat>
+		</ul>
+		<h2>Ajax support with 'ajaxSingle="true"' in h:dataTeble</h2>
+		<a4j:outputPanel ajaxRendered="true">
+		<h:dataTable value="#{repeatData.data}" var="row" border="1" id="table">
+			<h:column>
+				<h:inputText id="tabletext" value="#{row.text}"
+					validator="#{bean.validate}" valueChangeListener="#{bean.onChange}">
+					<a4j:support event="onkeyup" ajaxSingle="true" focus="tabletext"></a4j:support>
+				</h:inputText>
+			</h:column>
+			<h:column>
+					<h:outputText value="#{row.text}"></h:outputText>
+					<h:message for="tabletext"></h:message>
+			</h:column>
+		</h:dataTable>
+		</a4j:outputPanel>
+		<a4j:commandButton value="Ajax Button"></a4j:commandButton>
+		<a4j:commandButton value="Ajax Single Button" ajaxSingle="true"></a4j:commandButton>
+	</h:form>
+	<a4j:log hotkey="M"></a4j:log>
+</f:view>
+</html>
Added: branches/refactor1/samples/useCases/src/main/webapp/pages/ajaxdata.xhtml
===================================================================
--- branches/refactor1/samples/useCases/src/main/webapp/pages/ajaxdata.xhtml	                        (rev 0)
+++ branches/refactor1/samples/useCases/src/main/webapp/pages/ajaxdata.xhtml	2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+	  xmlns:f="http://java.sun.com/jsf/core"
+      xmlns:h="http://java.sun.com/jsf/html"
+      xmlns:ui="http://java.sun.com/jsf/facelets"
+      xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+      xmlns:c="http://java.sun.com/jsp/jstl/core"  
+      >
+      <head>
+      <title>AJAX Data transfer</title>
+		<script type="text/javascript">
+		function inspect(data){
+		   LOG.info("Data is "+data);
+		}
+		</script>
+      </head>
+      <body>      
+	<f:view>
+	<h1>Sample of the data transfer from server to client</h1>
+	<h:form>
+	<h:panelGrid columns="2">
+	  <a4j:commandButton value="Send" oncomplete="inspect(data);" data="#{bean.array}"></a4j:commandButton>
+	  <h:outputText value="Data is String[]"></h:outputText>
+	  <a4j:commandButton value="Send" oncomplete="inspect(data);" data="#{bean.array2}"></a4j:commandButton>
+	  <h:outputText value="Data is String[][]"></h:outputText>
+	  <a4j:commandButton value="Send" oncomplete="inspect(data);" data="#{bean}"></a4j:commandButton>
+	  <h:outputText value="Data is JavaBean"></h:outputText>
+	</h:panelGrid>
+	</h:form>
+	<a4j:log popup='false' level="INFO"/>
+	</f:view>
+	</body>
+</html>	
\ No newline at end of file
Added: branches/refactor1/samples/useCases/src/main/webapp/pages/controls.jsp
===================================================================
--- branches/refactor1/samples/useCases/src/main/webapp/pages/controls.jsp	                        (rev 0)
+++ branches/refactor1/samples/useCases/src/main/webapp/pages/controls.jsp	2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,33 @@
+<%@page contentType="text/html"%>
+<%@page pageEncoding="UTF-8"%>
+<%@ taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<f:view>
+    <html xmlns="http://www.w3.org/1999/xhtml">
+        <head>
+            <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+            <a4j:loadStyle src="/css/global.css"/>
+        </head>
+        <body>
+            <a4j:form id="headForm">
+                <div id="infoBarContainer">
+                    <div id="infoBarContent">
+                        <a4j:outputPanel id="companyOutputPanel" layout="inline" styleClass="linePanel">
+                            <a4j:commandLink id="companyCommandLink" value="#{dataManager.selectedCompany.desc}" action="#{dataManager.commandAction}" actionListener="#{dataManager.commandActionListener}" reRender="selectPanel" />
+                        </a4j:outputPanel>
+                        <a4j:outputPanel id="agencyOutputPanel" layout="inline" styleClass="linePanel">
+                            <a4j:commandLink id="agencyCommandLink" value="#{dataManager.selectedAgency.desc}" action="#{dataManager.commandAction}" actionListener="#{dataManager.commandActionListener}" reRender="selectPanel" />
+                        </a4j:outputPanel>
+                    </div>
+               </div>
+                <a4j:outputPanel id="selectPanel" layout="block" style="float:left;margin-top:5px;margin-left:5px;width:200px;">
+                    <a4j:repeat id="selectDataList" binding="#{dataManager.selectDataList}" value="#{dataManager.selectData}" var="item" ajaxKeys="#{dataManager.keys}">
+                        <a4j:commandLink id="selectCommandLink" value="#{item.desc}" action="#{dataManager.selectAction}" actionListener="#{dataManager.selectActionListener}" reRender="companyOutputPanel,agencyOutputPanel" style="display:block" />
+                    </a4j:repeat>
+                </a4j:outputPanel>
+            </a4j:form>
+        </body>
+    </html>
+</f:view>
Added: branches/refactor1/samples/useCases/src/main/webapp/pages/controls.xhtml
===================================================================
--- branches/refactor1/samples/useCases/src/main/webapp/pages/controls.xhtml	                        (rev 0)
+++ branches/refactor1/samples/useCases/src/main/webapp/pages/controls.xhtml	2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,58 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:f="http://java.sun.com/jsf/core"
+	xmlns:h="http://java.sun.com/jsf/html"
+	xmlns:ui="http://java.sun.com/jsf/facelets"
+	xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+	xmlns:c="http://java.sun.com/jsp/jstl/core">
+<f:view>
+	<head>
+	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+	<a4j:loadStyle src="/css/global.css" />
+	<a4j:loadScript src="resource://prototype.js" />
+	</head>
+	<body>
+	<a4j:form id="headForm">
+		<div id="infoBarContainer">
+		<div id="infoBarContent"><a4j:outputPanel
+			id="companyOutputPanel" layout="inline" styleClass="linePanel">
+			<a4j:commandLink id="companyCommandLink"
+				value="#{dataManager.selectedCompany.desc}"
+				action="#{dataManager.commandAction}"
+				actionListener="#{dataManager.commandActionListener}"
+				reRender="selectPanel,selectTable" />
+		</a4j:outputPanel> <a4j:outputPanel id="agencyOutputPanel" layout="inline"
+			styleClass="linePanel">
+			<a4j:commandLink id="agencyCommandLink"
+				value="#{dataManager.selectedAgency.desc}"
+				action="#{dataManager.commandAction}"
+				actionListener="#{dataManager.commandActionListener}"
+				reRender="selectPanel,selectTable" />
+		</a4j:outputPanel></div>
+		</div>
+		<a4j:outputPanel id="selectPanel" layout="block"
+			style="float:left;margin-top:5px;margin-left:5px;width:200px;">
+			<a4j:repeat id="selectDataList"
+				binding="#{dataManager.selectDataList}"
+				value="#{dataManager.selectData}" var="item"
+				ajaxKeys="#{dataManager.keys}">
+				<a4j:commandLink id="selectCommandLink" value="#{item.desc}"
+					action="#{dataManager.selectAction}"
+					actionListener="#{dataManager.selectActionListener}"
+					reRender="companyOutputPanel,agencyOutputPanel"
+					style="display:block" />
+			</a4j:repeat>
+		</a4j:outputPanel>
+		<br />
+		<h:dataTable id="selectTable"
+				value="#{dataManager.selectData}" var="item"
+		>
+		<h:column>
+			<h:outputText value="#{item.desc}"/>
+		</h:column>
+		</h:dataTable>
+	</a4j:form>
+	<a4j:log hotkey="M"/>
+	</body>
+</f:view>
+</html>
Added: branches/refactor1/samples/useCases/src/main/webapp/pages/index.jsp
===================================================================
--- branches/refactor1/samples/useCases/src/main/webapp/pages/index.jsp	                        (rev 0)
+++ branches/refactor1/samples/useCases/src/main/webapp/pages/index.jsp	2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,12 @@
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<html>
+	<head>
+		<title></title>
+	</head>
+	<body>
+		<f:view>
+			
+		</f:view>
+	</body>	
+</html>  
Added: branches/refactor1/samples/useCases/src/main/webapp/pages/index.xhtml
===================================================================
--- branches/refactor1/samples/useCases/src/main/webapp/pages/index.xhtml	                        (rev 0)
+++ branches/refactor1/samples/useCases/src/main/webapp/pages/index.xhtml	2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,12 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+	  xmlns:f="http://java.sun.com/jsf/core"
+      xmlns:h="http://java.sun.com/jsf/html"
+      xmlns:ui="http://java.sun.com/jsf/facelets"
+      xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+      xmlns:c="http://java.sun.com/jsp/jstl/core"  
+      >
+	<f:view>
+
+	</f:view>
+</html>	
\ No newline at end of file
Added: branches/refactor1/samples/useCases/src/main/webapp/pages/prependId.xhtml
===================================================================
--- branches/refactor1/samples/useCases/src/main/webapp/pages/prependId.xhtml	                        (rev 0)
+++ branches/refactor1/samples/useCases/src/main/webapp/pages/prependId.xhtml	2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"    
+	xmlns:h="http://java.sun.com/jsf/html"           
+    xmlns:f="http://java.sun.com/jsf/core">
+    <body>
+        
+        <h:form id="rgForm2" prependId="false">
+            
+            <h:inputText value="#{bean.text}">
+                <a4j:support event="onkeyup" reRender="repeater" requestDelay="100"/>
+            </h:inputText>
+            <h:outputText id="repeater" value="#{bean.text}" />
+            <h:commandButton  action="#{bean.ok}" value="Ok"></h:commandButton>
+            <h:dataTable value="single" var="v">
+              <h:column>
+            <h:commandButton  action="#{bean.ok}" value="Ok in table"></h:commandButton>              
+              </h:column>
+            </h:dataTable>
+        </h:form>
+        <a4j:log hotkey="M"></a4j:log>
+    </body>
+ </html>
\ No newline at end of file
Added: branches/refactor1/samples/useCases/src/main/webapp/pages/push.xhtml
===================================================================
--- branches/refactor1/samples/useCases/src/main/webapp/pages/push.xhtml	                        (rev 0)
+++ branches/refactor1/samples/useCases/src/main/webapp/pages/push.xhtml	2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+	  xmlns:f="http://java.sun.com/jsf/core"
+      xmlns:h="http://java.sun.com/jsf/html"
+      xmlns:ui="http://java.sun.com/jsf/facelets"
+      xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+      xmlns:c="http://java.sun.com/jsp/jstl/core"  
+      >
+      <body>
+	<f:view>
+	<a4j:push reRender="msg" eventProducer="#{messageBean.addListener}" interval="3000"/>
+	
+	<h:dataTable  id="msg" value="#{messageBean.messages}" var="msg">
+	    <f:facet name="header"><h2>Messags : </h2></f:facet>
+	    <h:column>
+	      Message :
+	    </h:column>
+	    <h:column>
+	    <h:outputText value="#{msg}"></h:outputText>
+	    </h:column>
+	</h:dataTable>
+	<h:form>
+	<a4j:status startText="Request started" stopText="stop."></a4j:status>
+	</h:form>
+	<a4j:log hotkey="M"></a4j:log>
+	</f:view>
+	</body>
+</html>	
\ No newline at end of file
Added: branches/refactor1/samples/useCases/src/main/webapp/pages/repeat.jsp
===================================================================
--- branches/refactor1/samples/useCases/src/main/webapp/pages/repeat.jsp	                        (rev 0)
+++ branches/refactor1/samples/useCases/src/main/webapp/pages/repeat.jsp	2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,20 @@
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j"%>
+<html>
+	<head>
+		<title>Repeater with input components</title>
+	</head>
+	<body>
+		<f:view>
+		<h:form>
+		<a4j:repeat value="#{repeatData.data}" var="row">
+		<h:selectBooleanCheckbox selected="true" /> 
+		<h:inputText value="Text"></h:inputText>
+		<h:inputText value="#{row.text}"></h:inputText>
+		<h:outputText escape="false" value="<br>" ></h:outputText>
+		</a4j:repeat>
+		</h:form>			
+		</f:view>
+	</body>	
+</html>  
Added: branches/refactor1/samples/useCases/src/main/webapp/pages/repeat.xhtml
===================================================================
--- branches/refactor1/samples/useCases/src/main/webapp/pages/repeat.xhtml	                        (rev 0)
+++ branches/refactor1/samples/useCases/src/main/webapp/pages/repeat.xhtml	2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"    
+	xmlns:h="http://java.sun.com/jsf/html"           
+    xmlns:f="http://java.sun.com/jsf/core">
+	<head>
+		<title>Repeater with input components</title>
+	</head>
+	<body>
+		<f:view>
+		<h:form>
+		<h:panelGroup id="repeat">
+		<a4j:repeat value="#{repeatData.data}" var="row">
+		<h:selectBooleanCheckbox selected="true" /> 
+		<h:inputText value="Text"></h:inputText>
+		<h:inputText value="#{row.text}"></h:inputText>
+		<h:outputText escape="false" value="<br />" ></h:outputText>
+		</a4j:repeat>
+		</h:panelGroup>
+            <h:commandButton  action="#{bean.ok}" value="Ok"></h:commandButton>
+            <a4j:commandButton  action="#{bean.ok}" value="Ok ajax" reRender="repeat"></a4j:commandButton>
+
+		</h:form>			
+		</f:view>
+	</body>	
+</html>  
Added: branches/refactor1/samples/useCases/src/main/webapp/pages/setCookie.xhtml
===================================================================
--- branches/refactor1/samples/useCases/src/main/webapp/pages/setCookie.xhtml	                        (rev 0)
+++ branches/refactor1/samples/useCases/src/main/webapp/pages/setCookie.xhtml	2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:ui="http://java.sun.com/jsf/facelets"
+      xmlns:h="http://java.sun.com/jsf/html"
+      xmlns:f="http://java.sun.com/jsf/core"
+      xmlns:a4j="https://ajax4jsf.dev.java.net/ajax">
+<f:view>
+    <head>
+      <meta http-equiv="content-type" content="text/xhtml; charset=UTF-8"/>
+      <meta http-equiv="pragma" content="no-cache"/>
+      <meta http-equiv="cache-control" content="no-cache"/>
+      <meta http-equiv="expires" content="0"/>
+      <title>Set Cookie</title>
+    </head>
+    <body>
+      <a4j:form>
+        <a4j:commandButton action="#{bean.setCookie}" value="Set Cookie by AJAX"/>
+        <h:commandButton action="#{bean.setCookie}" value="Set Cookie in POST"/>
+      </a4j:form>
+    </body>
+</f:view>
+</html>
Added: branches/refactor1/samples/useCases/src/main/webapp/pages/testCookie.xhtml
===================================================================
--- branches/refactor1/samples/useCases/src/main/webapp/pages/testCookie.xhtml	                        (rev 0)
+++ branches/refactor1/samples/useCases/src/main/webapp/pages/testCookie.xhtml	2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:ui="http://java.sun.com/jsf/facelets"
+      xmlns:h="http://java.sun.com/jsf/html"
+      xmlns:f="http://java.sun.com/jsf/core"
+      xmlns:a4j="https://ajax4jsf.dev.java.net/ajax">
+<f:view>
+    <head>
+      <meta http-equiv="content-type" content="text/xhtml; charset=UTF-8"/>
+      <meta http-equiv="pragma" content="no-cache"/>
+      <meta http-equiv="cache-control" content="no-cache"/>
+      <meta http-equiv="expires" content="0"/>
+      <title>Test Cookie</title>
+    </head>
+    <body>
+      <a4j:form>
+       <h:outputText value="Cookie value: #{bean.testCookie}"/>
+      </a4j:form>
+    </body>
+</f:view>
+</html>
Added: branches/refactor1/samples/useCases/src/test/java/org/ajax4jsf/BeanTest.java
===================================================================
--- branches/refactor1/samples/useCases/src/test/java/org/ajax4jsf/BeanTest.java	                        (rev 0)
+++ branches/refactor1/samples/useCases/src/test/java/org/ajax4jsf/BeanTest.java	2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,46 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/**
+*/
+public class BeanTest 
+    extends TestCase
+{
+    /**
+     * Create the test case
+     *
+     * @param testName name of the test case
+     */
+    public BeanTest( String testName )
+    {
+        super( testName );
+    }
+
+    public void testStub() throws Exception {
+    	
+    }
+}
Deleted: branches/refactor1/ui/core/src/test/java/org/ajax4jsf/ajax/RepeatTestCase.java
===================================================================
--- branches/refactor1/ui/core/src/test/java/org/ajax4jsf/ajax/RepeatTestCase.java	2007-06-29 19:42:46 UTC (rev 1423)
+++ branches/refactor1/ui/core/src/test/java/org/ajax4jsf/ajax/RepeatTestCase.java	2007-06-29 20:20:22 UTC (rev 1424)
@@ -1,248 +0,0 @@
-/**
- * License Agreement.
- *
- * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- */
-
-package org.ajax4jsf.ajax.repeat;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.Map;
-
-import javax.faces.component.UIColumn;
-import javax.faces.component.UIComponent;
-import javax.faces.component.UIData;
-import javax.faces.component.UIInput;
-import javax.faces.context.FacesContext;
-
-import org.ajax4jsf.ajax.repeat.UIRepeat;
-import org.ajax4jsf.renderkit.html.RepeatRenderer;
-import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
-import org.ajax4jsf.tests.MockDataModel;
-import org.ajax4jsf.tests.MockUIInputRenderer;
-
-/**
- * @author shura
- *
- */
-public class RepeatTestCase extends AbstractAjax4JsfTestCase {
-
-	private UIRepeat repeater;
-	
-	private UIInput child;
-	
-	private int childInvoked;
-	
-	private UIInput facetChild;
-	
-	private int facetInvoked;
-
-	private UIInput childChild;
-	
-	private int childChildInvoked;
-
-	private UIInput childChildFacet;
-	
-	private int childChildFacetInvoked;
-
-	private UIRepeat enclosedRepeater;
-	/**
-	 * @param name
-	 */
-	public RepeatTestCase(String name) {
-		super(name);
-	}
-
-	/* (non-Javadoc)
-	 * @see org.ajax4jsf.tests.AbstractAjax4JsfTestCase#setUp()
-	 */
-	public void setUp() throws Exception {
-		super.setUp();
-		// Create mock DataAdaptor and childs.
-		repeater = new UIRepeat();
-		child = new UIInput(){
-			public void processDecodes(FacesContext context) {
-				childInvoked++;
-				super.processDecodes(context);
-			}
-		};
-		childInvoked = 0;
-		child.setId("child");
-		repeater.getChildren().add(child);
-		facetChild = new UIInput(){
-			public void processDecodes(FacesContext context) {
-				facetInvoked++;
-				super.processDecodes(context);
-			}
-		};
-		facetInvoked = 0;
-		facetChild.setId("facetChild");
-		repeater.getFacets().put("facet", facetChild);
-		childChild = new UIInput(){
-			public void processDecodes(FacesContext context) {
-				childChildInvoked++;
-				super.processDecodes(context);
-			}
-		};;
-		childChildInvoked = 0;
-		childChild.setId("childChild");
-		child.getChildren().add(childChild);
-		childChildFacet = new UIInput(){
-			public void processDecodes(FacesContext context) {
-				childChildFacetInvoked++;
-				super.processDecodes(context);
-			}
-		};;
-		childChildFacetInvoked = 0;
-		childChildFacet.setId("childChildFacet");
-		childChild.getFacets().put("facet", childChildFacet);
-		enclosedRepeater = new UIRepeat();
-		renderKit.addRenderer(child.getFamily(), child.getRendererType(), new MockUIInputRenderer(){
-			public void decode(FacesContext context, UIComponent component) {
-				super.decode(context, component);
-				UIInput input = (UIInput) component;
-				String submittedValie = enclosedRepeater.getRowKey()+":"+repeater.getRowKey();
-				input.setSubmittedValue(submittedValie);
-				System.out.println("decode component "+component.getClientId(facesContext)+" with value "+submittedValie);
-			}
-		});
-		renderKit.addRenderer(repeater.getFamily(), repeater.getRendererType(), new RepeatRenderer());
-	}
-
-	/* (non-Javadoc)
-	 * @see org.ajax4jsf.tests.AbstractAjax4JsfTestCase#tearDown()
-	 */
-	public void tearDown() throws Exception {
-		super.tearDown();
-		repeater = null;
-		child = null;
-		childChild = null;
-		childChildFacet = null;
-		facetChild = null;
-		enclosedRepeater = null;
-	}
-
-
-	private void createDataTree(){
-		enclosedRepeater.setId("data");
-		repeater.setId("adaptor");
-		repeater.setVar("row");
-		ArrayList value = new ArrayList(2);
-		value.add("first");
-		value.add("second");
-		enclosedRepeater.setValue(value);
-		enclosedRepeater.setVar("var");
-		UIColumn column = new UIColumn();
-		enclosedRepeater.getChildren().add(column);
-		column.getChildren().add(repeater);
-		facesContext.getViewRoot().getChildren().add(enclosedRepeater);
-	}
-	
-	private void printChildMap(Map childrenState){
-		System.out.println("{");
-		for (Iterator iter = childrenState.keySet().iterator(); iter.hasNext();) {
-			Object key = iter.next();
-			System.out.println(" "+key+" : "+childrenState.get(key));
-		}
-		System.out.println("}");
-	}
-	/**
-	 * Test method for {@link javax.faces.component.UIData#processDecodes(javax.faces.context.FacesContext)}.
-	 */
-	public void testProcessDecodesFacesContext() {
-		createDataTree();
-		repeater.setValue(new MockDataModel());
-//		enclosedRepeater.setValue(new MockDataModel());
-		enclosedRepeater.processDecodes(facesContext);
-		enclosedRepeater.setRowIndex(1);
-		repeater.setRowIndex(1);
-		System.out.println("Saved child state for external repeater ");
-		printChildMap(enclosedRepeater.getChildState(facesContext));
-		System.out.println("Saved child state" );
-		printChildMap(repeater.getChildState(facesContext));
-		assertEquals("1:1", child.getSubmittedValue());
-	}
-
-	/**
-	 * Test method for {@link javax.faces.component.UIData#processUpdates(javax.faces.context.FacesContext)}.
-	 */
-	public void testProcessUpdatesFacesContext() {
-		createDataTree();
-		repeater.setValue(new MockDataModel());
-//		enclosedRepeater.setValue(new MockDataModel());
-		enclosedRepeater.processDecodes(facesContext);
-		enclosedRepeater.processValidators(facesContext);
-		enclosedRepeater.processUpdates(facesContext);
-		enclosedRepeater.setRowIndex(1);
-		repeater.setRowIndex(1);		
-		assertEquals("1:1", child.getValue());
-		enclosedRepeater.setRowIndex(0);
-		repeater.setRowIndex(2);		
-		assertEquals("0:2", child.getValue());
-	}
-
-	/**
-	 * Test method for {@link javax.faces.component.UIData#processUpdates(javax.faces.context.FacesContext)}.
-	 */
-	public void testProcessValidatorsFacesContext() {
-		createDataTree();
-		repeater.setValue(new MockDataModel());
-//		enclosedRepeater.setValue(new MockDataModel());
-		enclosedRepeater.processDecodes(facesContext);
-		enclosedRepeater.processValidators(facesContext);
-		enclosedRepeater.setRowIndex(1);
-		repeater.setRowIndex(1);		
-		assertEquals("1:1", child.getLocalValue());
-		enclosedRepeater.setRowIndex(0);
-		repeater.setRowIndex(2);		
-		assertEquals("0:2", child.getLocalValue());
-	}
-	
-	public void testSetRowIndex() throws Exception {
-		createDataTree();
-		repeater.setValue(new MockDataModel());
-		enclosedRepeater.setRowIndex(1);
-		repeater.setRowIndex(1);
-		child.setValue("1:1");
-		repeater.setRowIndex(-1);
-		enclosedRepeater.setRowIndex(-1);
-		// -----------------------------
-		enclosedRepeater.setRowIndex(0);
-		repeater.setRowIndex(2);
-		child.setValue("0:2");
-		// -----------------------------
-		repeater.setRowIndex(-1);
-		enclosedRepeater.setRowIndex(-1);
-		System.out.println("Saved child state for external repeater ");
-		printChildMap(enclosedRepeater.getChildState(facesContext));
-		System.out.println("Saved child state" );
-		printChildMap(repeater.getChildState(facesContext));
-		// -----------------------------
-		enclosedRepeater.setRowIndex(1);
-		repeater.setRowIndex(1);		
-		assertEquals("1:1", child.getValue());
-		repeater.setRowIndex(-1);
-		enclosedRepeater.setRowIndex(-1);
-		// -----------------------------
-		enclosedRepeater.setRowIndex(0);
-		repeater.setRowIndex(2);		
-		assertEquals("0:2", child.getValue());
-		
-	}
-}
Copied: branches/refactor1/ui/core/src/test/java/org/ajax4jsf/ajax/repeat/RepeatTestCase.java (from rev 1423, branches/refactor1/ui/core/src/test/java/org/ajax4jsf/ajax/RepeatTestCase.java)
===================================================================
--- branches/refactor1/ui/core/src/test/java/org/ajax4jsf/ajax/repeat/RepeatTestCase.java	                        (rev 0)
+++ branches/refactor1/ui/core/src/test/java/org/ajax4jsf/ajax/repeat/RepeatTestCase.java	2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,248 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.ajax.repeat;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.Map;
+
+import javax.faces.component.UIColumn;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIData;
+import javax.faces.component.UIInput;
+import javax.faces.context.FacesContext;
+
+import org.ajax4jsf.ajax.repeat.UIRepeat;
+import org.ajax4jsf.renderkit.html.RepeatRenderer;
+import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+import org.ajax4jsf.tests.MockDataModel;
+import org.ajax4jsf.tests.MockUIInputRenderer;
+
+/**
+ * @author shura
+ *
+ */
+public class RepeatTestCase extends AbstractAjax4JsfTestCase {
+
+	private UIRepeat repeater;
+	
+	private UIInput child;
+	
+	private int childInvoked;
+	
+	private UIInput facetChild;
+	
+	private int facetInvoked;
+
+	private UIInput childChild;
+	
+	private int childChildInvoked;
+
+	private UIInput childChildFacet;
+	
+	private int childChildFacetInvoked;
+
+	private UIRepeat enclosedRepeater;
+	/**
+	 * @param name
+	 */
+	public RepeatTestCase(String name) {
+		super(name);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.tests.AbstractAjax4JsfTestCase#setUp()
+	 */
+	public void setUp() throws Exception {
+		super.setUp();
+		// Create mock DataAdaptor and childs.
+		repeater = new UIRepeat();
+		child = new UIInput(){
+			public void processDecodes(FacesContext context) {
+				childInvoked++;
+				super.processDecodes(context);
+			}
+		};
+		childInvoked = 0;
+		child.setId("child");
+		repeater.getChildren().add(child);
+		facetChild = new UIInput(){
+			public void processDecodes(FacesContext context) {
+				facetInvoked++;
+				super.processDecodes(context);
+			}
+		};
+		facetInvoked = 0;
+		facetChild.setId("facetChild");
+		repeater.getFacets().put("facet", facetChild);
+		childChild = new UIInput(){
+			public void processDecodes(FacesContext context) {
+				childChildInvoked++;
+				super.processDecodes(context);
+			}
+		};;
+		childChildInvoked = 0;
+		childChild.setId("childChild");
+		child.getChildren().add(childChild);
+		childChildFacet = new UIInput(){
+			public void processDecodes(FacesContext context) {
+				childChildFacetInvoked++;
+				super.processDecodes(context);
+			}
+		};;
+		childChildFacetInvoked = 0;
+		childChildFacet.setId("childChildFacet");
+		childChild.getFacets().put("facet", childChildFacet);
+		enclosedRepeater = new UIRepeat();
+		renderKit.addRenderer(child.getFamily(), child.getRendererType(), new MockUIInputRenderer(){
+			public void decode(FacesContext context, UIComponent component) {
+				super.decode(context, component);
+				UIInput input = (UIInput) component;
+				String submittedValie = enclosedRepeater.getRowKey()+":"+repeater.getRowKey();
+				input.setSubmittedValue(submittedValie);
+				System.out.println("decode component "+component.getClientId(facesContext)+" with value "+submittedValie);
+			}
+		});
+		renderKit.addRenderer(repeater.getFamily(), repeater.getRendererType(), new RepeatRenderer());
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.tests.AbstractAjax4JsfTestCase#tearDown()
+	 */
+	public void tearDown() throws Exception {
+		super.tearDown();
+		repeater = null;
+		child = null;
+		childChild = null;
+		childChildFacet = null;
+		facetChild = null;
+		enclosedRepeater = null;
+	}
+
+
+	private void createDataTree(){
+		enclosedRepeater.setId("data");
+		repeater.setId("adaptor");
+		repeater.setVar("row");
+		ArrayList value = new ArrayList(2);
+		value.add("first");
+		value.add("second");
+		enclosedRepeater.setValue(value);
+		enclosedRepeater.setVar("var");
+		UIColumn column = new UIColumn();
+		enclosedRepeater.getChildren().add(column);
+		column.getChildren().add(repeater);
+		facesContext.getViewRoot().getChildren().add(enclosedRepeater);
+	}
+	
+	private void printChildMap(Map childrenState){
+		System.out.println("{");
+		for (Iterator iter = childrenState.keySet().iterator(); iter.hasNext();) {
+			Object key = iter.next();
+			System.out.println(" "+key+" : "+childrenState.get(key));
+		}
+		System.out.println("}");
+	}
+	/**
+	 * Test method for {@link javax.faces.component.UIData#processDecodes(javax.faces.context.FacesContext)}.
+	 */
+	public void testProcessDecodesFacesContext() {
+		createDataTree();
+		repeater.setValue(new MockDataModel());
+//		enclosedRepeater.setValue(new MockDataModel());
+		enclosedRepeater.processDecodes(facesContext);
+		enclosedRepeater.setRowIndex(1);
+		repeater.setRowIndex(1);
+		System.out.println("Saved child state for external repeater ");
+		printChildMap(enclosedRepeater.getChildState(facesContext));
+		System.out.println("Saved child state" );
+		printChildMap(repeater.getChildState(facesContext));
+		assertEquals("1:1", child.getSubmittedValue());
+	}
+
+	/**
+	 * Test method for {@link javax.faces.component.UIData#processUpdates(javax.faces.context.FacesContext)}.
+	 */
+	public void testProcessUpdatesFacesContext() {
+		createDataTree();
+		repeater.setValue(new MockDataModel());
+//		enclosedRepeater.setValue(new MockDataModel());
+		enclosedRepeater.processDecodes(facesContext);
+		enclosedRepeater.processValidators(facesContext);
+		enclosedRepeater.processUpdates(facesContext);
+		enclosedRepeater.setRowIndex(1);
+		repeater.setRowIndex(1);		
+		assertEquals("1:1", child.getValue());
+		enclosedRepeater.setRowIndex(0);
+		repeater.setRowIndex(2);		
+		assertEquals("0:2", child.getValue());
+	}
+
+	/**
+	 * Test method for {@link javax.faces.component.UIData#processUpdates(javax.faces.context.FacesContext)}.
+	 */
+	public void testProcessValidatorsFacesContext() {
+		createDataTree();
+		repeater.setValue(new MockDataModel());
+//		enclosedRepeater.setValue(new MockDataModel());
+		enclosedRepeater.processDecodes(facesContext);
+		enclosedRepeater.processValidators(facesContext);
+		enclosedRepeater.setRowIndex(1);
+		repeater.setRowIndex(1);		
+		assertEquals("1:1", child.getLocalValue());
+		enclosedRepeater.setRowIndex(0);
+		repeater.setRowIndex(2);		
+		assertEquals("0:2", child.getLocalValue());
+	}
+	
+	public void testSetRowIndex() throws Exception {
+		createDataTree();
+		repeater.setValue(new MockDataModel());
+		enclosedRepeater.setRowIndex(1);
+		repeater.setRowIndex(1);
+		child.setValue("1:1");
+		repeater.setRowIndex(-1);
+		enclosedRepeater.setRowIndex(-1);
+		// -----------------------------
+		enclosedRepeater.setRowIndex(0);
+		repeater.setRowIndex(2);
+		child.setValue("0:2");
+		// -----------------------------
+		repeater.setRowIndex(-1);
+		enclosedRepeater.setRowIndex(-1);
+		System.out.println("Saved child state for external repeater ");
+		printChildMap(enclosedRepeater.getChildState(facesContext));
+		System.out.println("Saved child state" );
+		printChildMap(repeater.getChildState(facesContext));
+		// -----------------------------
+		enclosedRepeater.setRowIndex(1);
+		repeater.setRowIndex(1);		
+		assertEquals("1:1", child.getValue());
+		repeater.setRowIndex(-1);
+		enclosedRepeater.setRowIndex(-1);
+		// -----------------------------
+		enclosedRepeater.setRowIndex(0);
+		repeater.setRowIndex(2);		
+		assertEquals("0:2", child.getValue());
+		
+	}
+}
                                
                         
                        
                                
                                18 years, 4 months
                        
                        
                 
         
 
        
            
        
        
        
                
                        
                                
                                
                                        
                                
                         
                        
                                
                                
                                        
                                                
                                        
                                        
                                        JBoss Rich Faces SVN: r1423 - in branches/refactor1: ui/core/src/main and 3 other directories.
                                
                                
                                
                                    
                                        by richfaces-svn-commits@lists.jboss.org
                                    
                                
                                
                                        Author: alexsmirnov
Date: 2007-06-29 15:42:46 -0400 (Fri, 29 Jun 2007)
New Revision: 1423
Added:
   branches/refactor1/ui/core/src/main/templates/
Removed:
   branches/refactor1/framework/impl/src/main/templates/
Modified:
   branches/refactor1/ui/core/src/main/java/org/ajax4jsf/ajax/UIAjaxRegion.java
   branches/refactor1/ui/core/src/main/java/org/ajax4jsf/ajax/resource/UIMediaOutput.java
   branches/refactor1/ui/core/src/test/java/org/ajax4jsf/ajax/RepeatTestCase.java
Log:
continue refactoring. Restore core UI project
Modified: branches/refactor1/ui/core/src/main/java/org/ajax4jsf/ajax/UIAjaxRegion.java
===================================================================
--- branches/refactor1/ui/core/src/main/java/org/ajax4jsf/ajax/UIAjaxRegion.java	2007-06-29 19:32:26 UTC (rev 1422)
+++ branches/refactor1/ui/core/src/main/java/org/ajax4jsf/ajax/UIAjaxRegion.java	2007-06-29 19:42:46 UTC (rev 1423)
@@ -36,6 +36,7 @@
 
 import org.ajax4jsf.framework.ajax.AjaxContainer;
 import org.ajax4jsf.framework.ajax.AjaxContext;
+import org.ajax4jsf.framework.ajax.AjaxContextImpl;
 import org.ajax4jsf.framework.ajax.AjaxListener;
 import org.ajax4jsf.framework.ajax.AjaxRegionBrige;
 import org.ajax4jsf.framework.ajax.AjaxViewRoot;
@@ -112,7 +113,7 @@
 				(viewRoot instanceof AjaxViewRoot) &&
 				((AjaxViewRoot) viewRoot).isHavePage() &&
 				(ajaxContext.isAjaxRequest())) {
-			AjaxContext.invokeOnRegionOrRoot((AjaxViewRoot) viewRoot, context, _ajaxInvoker);
+			AjaxContextImpl.invokeOnRegionOrRoot((AjaxViewRoot) viewRoot, context, _ajaxInvoker);
 		} else {
 			super.encodeChildren(context);
 		}
Modified: branches/refactor1/ui/core/src/main/java/org/ajax4jsf/ajax/resource/UIMediaOutput.java
===================================================================
--- branches/refactor1/ui/core/src/main/java/org/ajax4jsf/ajax/resource/UIMediaOutput.java	2007-06-29 19:32:26 UTC (rev 1422)
+++ branches/refactor1/ui/core/src/main/java/org/ajax4jsf/ajax/resource/UIMediaOutput.java	2007-06-29 19:42:46 UTC (rev 1423)
@@ -22,6 +22,7 @@
 package org.ajax4jsf.ajax.resource;
 
 import javax.faces.component.UIOutput;
+import org.ajax4jsf.framework.resource.ResourceComponent;
 
 /**
  * @author shura
Copied: branches/refactor1/ui/core/src/main/templates (from rev 1393, branches/refactor1/framework/impl/src/main/templates)
Modified: branches/refactor1/ui/core/src/test/java/org/ajax4jsf/ajax/RepeatTestCase.java
===================================================================
--- branches/refactor1/ui/core/src/test/java/org/ajax4jsf/ajax/RepeatTestCase.java	2007-06-29 19:32:26 UTC (rev 1422)
+++ branches/refactor1/ui/core/src/test/java/org/ajax4jsf/ajax/RepeatTestCase.java	2007-06-29 19:42:46 UTC (rev 1423)
@@ -31,6 +31,7 @@
 import javax.faces.component.UIInput;
 import javax.faces.context.FacesContext;
 
+import org.ajax4jsf.ajax.repeat.UIRepeat;
 import org.ajax4jsf.renderkit.html.RepeatRenderer;
 import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
 import org.ajax4jsf.tests.MockDataModel;
                                
                         
                        
                                
                                18 years, 4 months
                        
                        
                 
         
 
        
            
        
        
        
                
                        
                                
                                
                                        
                                
                         
                        
                                
                                
                                        
                                                
                                        
                                        
                                        JBoss Rich Faces SVN: r1422 - in branches/refactor1: framework/impl and 12 other directories.
                                
                                
                                
                                    
                                        by richfaces-svn-commits@lists.jboss.org
                                    
                                
                                
                                        Author: alexsmirnov
Date: 2007-06-29 15:32:26 -0400 (Fri, 29 Jun 2007)
New Revision: 1422
Added:
   branches/refactor1/framework/impl/src/main/java/org/richfaces/renderkit/MacroDefinitionJSContentHandler.jav
   branches/refactor1/framework/test/src/main/java/org/ajax4jsf/tests/MockComponentState.java
   branches/refactor1/framework/test/src/main/java/org/ajax4jsf/tests/MockDataAdaptor.java
   branches/refactor1/framework/test/src/main/java/org/ajax4jsf/tests/MockDataModel.java
   branches/refactor1/framework/test/src/main/java/org/ajax4jsf/tests/MockRange.java
   branches/refactor1/framework/test/src/main/java/org/ajax4jsf/tests/MockSerializableDataModel.java
   branches/refactor1/framework/test/src/test/java/org/richfaces/renderkit/TemplateUtilTest.jav
   branches/refactor1/ui/core/src/test/
   branches/refactor1/ui/core/src/test/java/
   branches/refactor1/ui/core/src/test/java/org/
   branches/refactor1/ui/core/src/test/java/org/ajax4jsf/
   branches/refactor1/ui/core/src/test/java/org/ajax4jsf/ajax/
   branches/refactor1/ui/core/src/test/java/org/ajax4jsf/ajax/ActionListenerTest.java
   branches/refactor1/ui/core/src/test/java/org/ajax4jsf/ajax/RepeatTestCase.java
Removed:
   branches/refactor1/framework/impl/src/main/java/org/richfaces/renderkit/MacroDefinitionJSContentHandler.java
   branches/refactor1/framework/test/src/test/java/org/ajax4jsf/ajax/ActionListenerTest.java
   branches/refactor1/framework/test/src/test/java/org/ajax4jsf/ajax/repeat/AllUIRepeatTests.java
   branches/refactor1/framework/test/src/test/java/org/ajax4jsf/ajax/repeat/MockComponentState.java
   branches/refactor1/framework/test/src/test/java/org/ajax4jsf/ajax/repeat/MockDataAdaptor.java
   branches/refactor1/framework/test/src/test/java/org/ajax4jsf/ajax/repeat/MockDataModel.java
   branches/refactor1/framework/test/src/test/java/org/ajax4jsf/ajax/repeat/MockRange.java
   branches/refactor1/framework/test/src/test/java/org/ajax4jsf/ajax/repeat/MockSerializableDataModel.java
   branches/refactor1/framework/test/src/test/java/org/ajax4jsf/ajax/repeat/RepeatTestCase.java
   branches/refactor1/framework/test/src/test/java/org/richfaces/renderkit/TemplateUtilTest.java
Modified:
   branches/refactor1/framework/api/src/main/java/org/ajax4jsf/framework/resource/ResourceComponent.java
   branches/refactor1/framework/impl/pom.xml
   branches/refactor1/framework/impl/src/main/java/org/richfaces/renderkit/TemplateEncoderRendererBase.java
   branches/refactor1/framework/test/src/main/java/org/ajax4jsf/tests/AbstractAjax4JsfTestCase.java
   branches/refactor1/framework/test/src/main/java/org/ajax4jsf/tests/AbstractThreadedAjax4JsfTestCase.java
   branches/refactor1/framework/test/src/test/java/org/ajax4jsf/ajax/repeat/DataAdaptorTestCase.java
   branches/refactor1/framework/test/src/test/java/org/ajax4jsf/framework/renderer/BeforeRendererListenerTestCase.java
Log:
continue refactoring. Implementation & test projects are restored
Modified: branches/refactor1/framework/api/src/main/java/org/ajax4jsf/framework/resource/ResourceComponent.java
===================================================================
--- branches/refactor1/framework/api/src/main/java/org/ajax4jsf/framework/resource/ResourceComponent.java	2007-06-29 19:07:21 UTC (rev 1421)
+++ branches/refactor1/framework/api/src/main/java/org/ajax4jsf/framework/resource/ResourceComponent.java	2007-06-29 19:32:26 UTC (rev 1422)
@@ -19,7 +19,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
  */
 
-package org.ajax4jsf.ajax.resource;
+package org.ajax4jsf.framework.resource;
 
 import java.util.Date;
 
Modified: branches/refactor1/framework/impl/pom.xml
===================================================================
--- branches/refactor1/framework/impl/pom.xml	2007-06-29 19:07:21 UTC (rev 1421)
+++ branches/refactor1/framework/impl/pom.xml	2007-06-29 19:32:26 UTC (rev 1422)
@@ -1,292 +1,306 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <parent>
-    <artifactId>framework</artifactId>
-    <groupId>org.richfaces</groupId>
-    <version>3.1.0-SNAPSHOT</version>
-  </parent>
-  <modelVersion>4.0.0</modelVersion>
-  <groupId>org.richfaces.framework</groupId>
-  <artifactId>impl</artifactId>
-  <name>Java Server Faces AJAX framework implementation</name>
-  <build>
-    <resources>
-      <resource>
-        <directory>src/main/resources</directory>
-      </resource>
-      <resource>
-        <directory>target/javascript</directory>
-      </resource>
-    </resources>
-    <plugins>
-      <plugin>
-        <artifactId>maven-antrun-plugin</artifactId>
-        <executions>
-          <execution>
-            <phase>generate-resources</phase>
-            <goals>
-              <goal>run</goal>
-            </goals>
-            <configuration>
-              <tasks>
-                <ant>
-                  <target />
-                  <property />
-                </ant>
-              </tasks>
-              <resourceRoot>${project.build.directory}/javascript</resourceRoot>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <artifactId>maven-source-plugin</artifactId>
-        <executions>
-          <execution>
-            <id>attach-source</id>
-            <goals>
-              <goal>jar</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <artifactId>maven-antrun-plugin</artifactId>
-        <executions>
-          <execution>
-            <phase>generate-sources</phase>
-            <goals>
-              <goal>run</goal>
-            </goals>
-            <configuration>
-              <tasks>
-                <java>
-                  <arg />
-                  <arg />
-                </java>
-              </tasks>
-              <sourceRoot>${project.build.directory}/generated-sources/antlr</sourceRoot>
-            </configuration>
-          </execution>
-        </executions>
-        <dependencies>
-          <dependency>
-            <groupId>org.antlr</groupId>
-            <artifactId>antlr</artifactId>
-            <version>3.0</version>
-            <scope>compile</scope>
-          </dependency>
-        </dependencies>
-      </plugin>
-    </plugins>
-  </build>
-  <profiles>
-    <profile>
-      <id>jsf1_1</id>
-      <activation>
-        <activeByDefault>true</activeByDefault>
-        <property>
-          <name>jsfVersion</name>
-          <value>1.1</value>
-        </property>
-      </activation>
-      <build>
-        <plugins>
-          <plugin>
-            <artifactId>maven-compiler-plugin</artifactId>
-            <configuration>
-              <source>1.4</source>
-              <target>1.4</target>
-            </configuration>
-          </plugin>
-        </plugins>
-      </build>
-      <dependencies>
-        <dependency>
-          <groupId>javax.servlet</groupId>
-          <artifactId>servlet-api</artifactId>
-          <version>2.4</version>
-          <scope>provided</scope>
-        </dependency>
-        <dependency>
-          <groupId>javax.servlet</groupId>
-          <artifactId>jsp-api</artifactId>
-          <version>2.0</version>
-          <scope>provided</scope>
-        </dependency>
-        <dependency>
-          <groupId>javax.faces</groupId>
-          <artifactId>jsf-api</artifactId>
-          <version>1.1_02</version>
-          <exclusions>
-            <exclusion>
-              <artifactId>jsp-api</artifactId>
-              <groupId>javax.servlet.jsp</groupId>
-            </exclusion>
-            <exclusion>
-              <artifactId>jstl</artifactId>
-              <groupId>javax.servlet.jsp.jstl</groupId>
-            </exclusion>
-          </exclusions>
-        </dependency>
-        <dependency>
-          <groupId>javax.faces</groupId>
-          <artifactId>jsf-impl</artifactId>
-          <version>1.1_02</version>
-          <scope>runtime</scope>
-          <exclusions>
-            <exclusion>
-              <artifactId>jsp-api</artifactId>
-              <groupId>javax.servlet.jsp</groupId>
-            </exclusion>
-            <exclusion>
-              <artifactId>jstl</artifactId>
-              <groupId>javax.servlet.jsp.jstl</groupId>
-            </exclusion>
-          </exclusions>
-        </dependency>
-        <dependency>
-          <groupId>javax.servlet</groupId>
-          <artifactId>jstl</artifactId>
-          <version>1.0</version>
-        </dependency>
-      </dependencies>
-    </profile>
-    <profile>
-      <id>jsf1_2</id>
-      <activation>
-        <property>
-          <name>jsfVersion</name>
-          <value>1.2</value>
-        </property>
-      </activation>
-      <build>
-        <plugins>
-          <plugin>
-            <artifactId>maven-compiler-plugin</artifactId>
-            <version>2.0</version>
-            <configuration>
-              <source>1.5</source>
-              <target>1.5</target>
-            </configuration>
-          </plugin>
-          <plugin>
-            <groupId>org.codehaus.mojo</groupId>
-            <artifactId>build-helper-maven-plugin</artifactId>
-            <executions>
-              <execution>
-                <id>add-source</id>
-                <phase>process-sources</phase>
-                <goals>
-                  <goal>add-source</goal>
-                </goals>
-                <configuration>
-                  <sources>
-                    <source>src/main/jsf12</source>
-                  </sources>
-                </configuration>
-              </execution>
-            </executions>
-          </plugin>
-        </plugins>
-      </build>
-      <dependencies>
-        <dependency>
-          <groupId>javax.servlet</groupId>
-          <artifactId>servlet-api</artifactId>
-          <version>2.5</version>
-          <scope>provided</scope>
-        </dependency>
-        <dependency>
-          <groupId>javax.servlet.jsp</groupId>
-          <artifactId>jsp-api</artifactId>
-          <version>2.1</version>
-          <scope>provided</scope>
-        </dependency>
-        <dependency>
-          <groupId>javax.faces</groupId>
-          <artifactId>jsf-api</artifactId>
-          <version>1.2_03</version>
-        </dependency>
-        <dependency>
-          <groupId>javax.faces</groupId>
-          <artifactId>jsf-impl</artifactId>
-          <version>1.2_03</version>
-          <scope>runtime</scope>
-        </dependency>
-      </dependencies>
-    </profile>
-  </profiles>
-  <dependencies>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>3.8.1</version>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>opensymphony</groupId>
-      <artifactId>oscache</artifactId>
-      <version>2.3</version>
-      <optional>true</optional>
-    </dependency>
-    <dependency>
-      <groupId>com.sun.facelets</groupId>
-      <artifactId>jsf-facelets</artifactId>
-      <version>1.1.11</version>
-      <optional>true</optional>
-    </dependency>
-    <dependency>
-      <groupId>javax.el</groupId>
-      <artifactId>el-api</artifactId>
-      <version>1.0</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>nekohtml</groupId>
-      <artifactId>nekohtml</artifactId>
-      <version>0.9.5</version>
-      <optional>true</optional>
-    </dependency>
-    <dependency>
-      <groupId>commons-logging</groupId>
-      <artifactId>commons-logging</artifactId>
-      <version>1.0.4</version>
-    </dependency>
-    <dependency>
-      <groupId>log4j</groupId>
-      <artifactId>log4j</artifactId>
-      <version>1.2.14</version>
-      <optional>true</optional>
-    </dependency>
-    <dependency>
-      <groupId>commons-beanutils</groupId>
-      <artifactId>commons-beanutils</artifactId>
-      <version>1.7.0</version>
-    </dependency>
-    <dependency>
-      <groupId>commons-digester</groupId>
-      <artifactId>commons-digester</artifactId>
-      <version>1.8</version>
-    </dependency>
-    <dependency>
-      <groupId>commons-collections</groupId>
-      <artifactId>commons-collections</artifactId>
-      <version>3.2</version>
-    </dependency>
-    <dependency>
-      <groupId>org.richfaces.framework</groupId>
-      <artifactId>api</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.antlr</groupId>
-      <artifactId>antlr</artifactId>
-      <version>3.0</version>
-    </dependency>
-  </dependencies>
-  <properties>
-    <jsfVersion>1.1</jsfVersion>
-  </properties>
-</project>
-
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<parent>
+		<artifactId>framework</artifactId>
+		<groupId>org.richfaces</groupId>
+		<version>3.1.0-SNAPSHOT</version>
+	</parent>
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>org.richfaces.framework</groupId>
+	<artifactId>impl</artifactId>
+	<name>Java Server Faces AJAX framework implementation</name>
+	<build>
+		<resources>
+			<resource>
+				<directory>src/main/resources</directory>
+			</resource>
+			<resource>
+				<directory>target/javascript</directory>
+			</resource>
+		</resources>
+		<plugins>
+			<plugin>
+				<artifactId>maven-source-plugin</artifactId>
+				<executions>
+					<execution>
+						<id>attach-source</id>
+						<goals>
+							<goal>jar</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+			<plugin>
+				<artifactId>maven-antrun-plugin</artifactId>
+				<executions>
+					<!--
+						<execution>
+						<id>antlr</id>
+						<phase>generate-sources</phase>
+						<goals>
+						<goal>run</goal>
+						</goals>
+						<configuration>
+						<tasks>
+						<java classname="org.antlr.Tool"
+						classpathref="maven.plugin.classpath"
+						fork="true"
+						dir="src/main/antlr">
+						<arg value="RichMacroDefinition.g"/>
+						<arg line="-o ${project.build.directory}/generated-sources/antlr/org/richfaces"/>
+						</java>
+						</tasks>
+						<sourceRoot>${project.build.directory}/generated-sources/antlr</sourceRoot>
+						</configuration>
+						</execution>
+					-->
+					<execution>
+						<id>javascript</id>
+						<phase>generate-resources</phase>
+						<goals>
+							<goal>run</goal>
+						</goals>
+						<configuration>
+							<tasks>
+								<ant
+									antfile="${basedir}/generatescript.xml" inheritRefs="true">
+									<target name="assembly" />
+									<property name="target-dir"
+										value="${project.build.directory}/javascript">
+									</property>
+								</ant>
+							</tasks>
+							<resourceRoot>
+								${project.build.directory}/javascript
+							</resourceRoot>
+						</configuration>
+					</execution>
+				</executions>
+				<!--
+					<dependencies>
+					<dependency>
+					<groupId>org.antlr</groupId>
+					<artifactId>antlr</artifactId>
+					<version>3.0</version>
+					</dependency>
+					</dependencies>
+				-->
+			</plugin>
+		</plugins>
+	</build>
+	<profiles>
+		<profile>
+			<id>jsf1_1</id>
+			<activation>
+				<activeByDefault>true</activeByDefault>
+				<property>
+					<name>jsfVersion</name>
+					<value>1.1</value>
+				</property>
+			</activation>
+			<build>
+				<plugins>
+					<plugin>
+						<artifactId>maven-compiler-plugin</artifactId>
+						<configuration>
+							<source>1.4</source>
+							<target>1.4</target>
+						</configuration>
+					</plugin>
+				</plugins>
+			</build>
+			<dependencies>
+				<dependency>
+					<groupId>javax.servlet</groupId>
+					<artifactId>servlet-api</artifactId>
+					<version>2.4</version>
+					<scope>provided</scope>
+				</dependency>
+				<dependency>
+					<groupId>javax.servlet</groupId>
+					<artifactId>jsp-api</artifactId>
+					<version>2.0</version>
+					<scope>provided</scope>
+				</dependency>
+				<dependency>
+					<groupId>javax.faces</groupId>
+					<artifactId>jsf-api</artifactId>
+					<version>1.1_02</version>
+					<exclusions>
+						<exclusion>
+							<artifactId>jsp-api</artifactId>
+							<groupId>javax.servlet.jsp</groupId>
+						</exclusion>
+						<exclusion>
+							<artifactId>jstl</artifactId>
+							<groupId>javax.servlet.jsp.jstl</groupId>
+						</exclusion>
+					</exclusions>
+				</dependency>
+				<dependency>
+					<groupId>javax.faces</groupId>
+					<artifactId>jsf-impl</artifactId>
+					<version>1.1_02</version>
+					<scope>runtime</scope>
+					<exclusions>
+						<exclusion>
+							<artifactId>jsp-api</artifactId>
+							<groupId>javax.servlet.jsp</groupId>
+						</exclusion>
+						<exclusion>
+							<artifactId>jstl</artifactId>
+							<groupId>javax.servlet.jsp.jstl</groupId>
+						</exclusion>
+					</exclusions>
+				</dependency>
+				<dependency>
+					<groupId>javax.servlet</groupId>
+					<artifactId>jstl</artifactId>
+					<version>1.0</version>
+				</dependency>
+			</dependencies>
+		</profile>
+		<profile>
+			<id>jsf1_2</id>
+			<activation>
+				<property>
+					<name>jsfVersion</name>
+					<value>1.2</value>
+				</property>
+			</activation>
+			<build>
+				<plugins>
+					<plugin>
+						<artifactId>maven-compiler-plugin</artifactId>
+						<version>2.0</version>
+						<configuration>
+							<source>1.5</source>
+							<target>1.5</target>
+						</configuration>
+					</plugin>
+					<plugin>
+						<groupId>org.codehaus.mojo</groupId>
+						<artifactId>
+							build-helper-maven-plugin
+						</artifactId>
+						<executions>
+							<execution>
+								<id>add-source</id>
+								<phase>process-sources</phase>
+								<goals>
+									<goal>add-source</goal>
+								</goals>
+								<configuration>
+									<sources>
+										<source>src/main/jsf12</source>
+									</sources>
+								</configuration>
+							</execution>
+						</executions>
+					</plugin>
+				</plugins>
+			</build>
+			<dependencies>
+				<dependency>
+					<groupId>javax.servlet</groupId>
+					<artifactId>servlet-api</artifactId>
+					<version>2.5</version>
+					<scope>provided</scope>
+				</dependency>
+				<dependency>
+					<groupId>javax.servlet.jsp</groupId>
+					<artifactId>jsp-api</artifactId>
+					<version>2.1</version>
+					<scope>provided</scope>
+				</dependency>
+				<dependency>
+					<groupId>javax.faces</groupId>
+					<artifactId>jsf-api</artifactId>
+					<version>1.2_03</version>
+				</dependency>
+				<dependency>
+					<groupId>javax.faces</groupId>
+					<artifactId>jsf-impl</artifactId>
+					<version>1.2_03</version>
+					<scope>runtime</scope>
+				</dependency>
+			</dependencies>
+		</profile>
+	</profiles>
+	<dependencies>
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<version>3.8.1</version>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>opensymphony</groupId>
+			<artifactId>oscache</artifactId>
+			<version>2.3</version>
+			<optional>true</optional>
+		</dependency>
+		<dependency>
+			<groupId>com.sun.facelets</groupId>
+			<artifactId>jsf-facelets</artifactId>
+			<version>1.1.11</version>
+			<optional>true</optional>
+		</dependency>
+		<dependency>
+			<groupId>javax.el</groupId>
+			<artifactId>el-api</artifactId>
+			<version>1.0</version>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>nekohtml</groupId>
+			<artifactId>nekohtml</artifactId>
+			<version>0.9.5</version>
+			<optional>true</optional>
+		</dependency>
+		<dependency>
+			<groupId>commons-logging</groupId>
+			<artifactId>commons-logging</artifactId>
+			<version>1.0.4</version>
+		</dependency>
+		<dependency>
+			<groupId>log4j</groupId>
+			<artifactId>log4j</artifactId>
+			<version>1.2.14</version>
+			<optional>true</optional>
+		</dependency>
+		<dependency>
+			<groupId>commons-beanutils</groupId>
+			<artifactId>commons-beanutils</artifactId>
+			<version>1.7.0</version>
+		</dependency>
+		<dependency>
+			<groupId>commons-digester</groupId>
+			<artifactId>commons-digester</artifactId>
+			<version>1.8</version>
+		</dependency>
+		<dependency>
+			<groupId>commons-collections</groupId>
+			<artifactId>commons-collections</artifactId>
+			<version>3.2</version>
+		</dependency>
+		<dependency>
+			<groupId>org.richfaces.framework</groupId>
+			<artifactId>api</artifactId>
+			<version>${project.version}</version>
+		</dependency>
+		<!--
+			<dependency>
+			<groupId>org.antlr</groupId>
+			<artifactId>antlr</artifactId>
+			<version>3.0</version>
+			</dependency>
+		-->
+	</dependencies>
+	<properties>
+		<jsfVersion>1.1</jsfVersion>
+	</properties>
+</project>
+
Copied: branches/refactor1/framework/impl/src/main/java/org/richfaces/renderkit/MacroDefinitionJSContentHandler.jav (from rev 1418, branches/refactor1/framework/impl/src/main/java/org/richfaces/renderkit/MacroDefinitionJSContentHandler.java)
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/richfaces/renderkit/MacroDefinitionJSContentHandler.jav	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/richfaces/renderkit/MacroDefinitionJSContentHandler.jav	2007-06-29 19:32:26 UTC (rev 1422)
@@ -0,0 +1,168 @@
+/**
+ * 
+ */
+package org.richfaces.renderkit;
+
+import java.io.IOException;
+import java.io.Writer;
+import java.util.Iterator;
+import java.util.List;
+
+import org.richfaces.json.JSContentHandler;
+import org.xml.sax.Attributes;
+import org.xml.sax.SAXException;
+
+/**
+ * @author Nick Belaevski - mailto:nbelaevski@exadel.com created 21.06.2007
+ * 
+ */
+public class MacroDefinitionJSContentHandler extends JSContentHandler {
+	private String prolog;
+	private String epilog;
+
+	public MacroDefinitionJSContentHandler(Writer writer, String prolog,
+			String epilog) {
+		super(writer);
+		this.prolog = prolog;
+		this.epilog = epilog;
+	}
+
+	private List parseExpressiion(String expressionString) throws SAXException {
+		ANTLRStringStream stream = new ANTLRStringStream(expressionString);
+		RichMacroDefinitionLexer lexer = new RichMacroDefinitionLexer(stream);
+		RichMacroDefinitionParser macroParser = new RichMacroDefinitionParser(
+				new CommonTokenStream(lexer));
+		try {
+			expression_return expression = macroParser.expression();
+			List result = expression.result;
+
+			return result;
+		} catch (RecognitionException e) {
+			throw new SAXException(e.getMessage(), e);
+		}
+	}
+
+	private void encodeExpressionString(String string) throws IOException,
+			SAXException {
+		List parsedExpressiion = parseExpressiion(string);
+
+		boolean isExpression = false;
+		for (Iterator iterator = parsedExpressiion.iterator(); iterator
+				.hasNext();) {
+			Object next = (Object) iterator.next();
+			if (next instanceof Expression) {
+				isExpression = true;
+				break;
+			}
+		}
+
+		if (isExpression) {
+			this.outputWriter.write("function (context) { return ");
+		}
+
+		boolean first = true;
+		for (Iterator iterator = parsedExpressiion.iterator(); iterator
+				.hasNext();) {
+			Object next = (Object) iterator.next();
+
+			if (next == null) {
+				continue;
+			}
+
+			if (!first) {
+				this.outputWriter.write('+');
+			}
+
+			if (next instanceof Expression) {
+				Expression macroExpression = (Expression) next;
+
+				this.outputWriter.write(prolog);
+				this.encode(macroExpression.getExpression().toString());
+				this.outputWriter.write(epilog);
+			} else {
+				this.outputWriter.write('\'');
+				this.encode(next.toString());
+				this.outputWriter.write('\'');
+			}
+
+			first = false;
+		}
+
+		if (isExpression) {
+			this.outputWriter.write(";}");
+		}
+	}
+
+	protected void encodeAttributeValue(Attributes attributes, int idx)
+			throws SAXException, IOException {
+
+		String value = attributes.getValue(idx);
+		encodeExpressionString(value);
+	}
+
+	public void characters(char[] ch, int start, int length)
+			throws SAXException {
+		if (isProcessingCdata()) {
+			super.characters(ch, start, length);
+		} else {
+			List parsedExpression = parseExpressiion(new String(ch, start, length));
+			for (Iterator iterator = parsedExpression.iterator(); iterator
+					.hasNext();) {
+
+				Object next = iterator.next();
+				
+				if (next instanceof Expression) {
+					Expression expression = (Expression) next;
+					
+			        if (this.isBeforeDocumentStart() || level < 0)
+			            return;
+			        try {
+			        	if (level != 0 && !this.closeElement(false) && this.isProcessingCdata() == false) {
+			                this.outputWriter.write(',');
+			            }
+
+			        	if (this.isProcessingCdata() == false) {
+			                this.outputWriter.write("new ET(");
+			            }
+						
+			            this.outputWriter.write("function (context) { return ");
+			            this.outputWriter.write(prolog);
+						this.encode(expression.getExpression().toString());
+						this.outputWriter.write(epilog);
+			            this.outputWriter.write("}");
+
+						if (this.isProcessingCdata() == false) {
+			                this.outputWriter.write(")");
+			            }
+			        } catch (IOException e) {
+			            throw new SAXException("Write error",e);
+			        }
+
+				} else {
+					char[] cs = next.toString().toCharArray();
+					super.characters(cs, 0, cs.length);
+				}
+
+				if (iterator.hasNext()) {
+		        	try {
+						this.outputWriter.write(',');
+					} catch (IOException e) {
+						// TODO Auto-generated catch block
+						e.printStackTrace();
+					}
+                }
+			}
+		}
+	}
+
+	protected void encodeText(char[] chars, int start, int length)
+			throws SAXException, IOException {
+		if (!isProcessingCdata()) {
+			String str = new String(chars, start, length);
+			encodeExpressionString(str);
+		} else {
+			super.encodeText(chars, start, length);
+		}
+	}
+
+}
Deleted: branches/refactor1/framework/impl/src/main/java/org/richfaces/renderkit/MacroDefinitionJSContentHandler.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/richfaces/renderkit/MacroDefinitionJSContentHandler.java	2007-06-29 19:07:21 UTC (rev 1421)
+++ branches/refactor1/framework/impl/src/main/java/org/richfaces/renderkit/MacroDefinitionJSContentHandler.java	2007-06-29 19:32:26 UTC (rev 1422)
@@ -1,168 +0,0 @@
-/**
- * 
- */
-package org.richfaces.renderkit;
-
-import java.io.IOException;
-import java.io.Writer;
-import java.util.Iterator;
-import java.util.List;
-
-import org.richfaces.json.JSContentHandler;
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-
-/**
- * @author Nick Belaevski - mailto:nbelaevski@exadel.com created 21.06.2007
- * 
- */
-public class MacroDefinitionJSContentHandler extends JSContentHandler {
-	private String prolog;
-	private String epilog;
-
-	public MacroDefinitionJSContentHandler(Writer writer, String prolog,
-			String epilog) {
-		super(writer);
-		this.prolog = prolog;
-		this.epilog = epilog;
-	}
-
-	private List parseExpressiion(String expressionString) throws SAXException {
-		ANTLRStringStream stream = new ANTLRStringStream(expressionString);
-		RichMacroDefinitionLexer lexer = new RichMacroDefinitionLexer(stream);
-		RichMacroDefinitionParser macroParser = new RichMacroDefinitionParser(
-				new CommonTokenStream(lexer));
-		try {
-			expression_return expression = macroParser.expression();
-			List result = expression.result;
-
-			return result;
-		} catch (RecognitionException e) {
-			throw new SAXException(e.getMessage(), e);
-		}
-	}
-
-	private void encodeExpressionString(String string) throws IOException,
-			SAXException {
-		List parsedExpressiion = parseExpressiion(string);
-
-		boolean isExpression = false;
-		for (Iterator iterator = parsedExpressiion.iterator(); iterator
-				.hasNext();) {
-			Object next = (Object) iterator.next();
-			if (next instanceof Expression) {
-				isExpression = true;
-				break;
-			}
-		}
-
-		if (isExpression) {
-			this.outputWriter.write("function (context) { return ");
-		}
-
-		boolean first = true;
-		for (Iterator iterator = parsedExpressiion.iterator(); iterator
-				.hasNext();) {
-			Object next = (Object) iterator.next();
-
-			if (next == null) {
-				continue;
-			}
-
-			if (!first) {
-				this.outputWriter.write('+');
-			}
-
-			if (next instanceof Expression) {
-				Expression macroExpression = (Expression) next;
-
-				this.outputWriter.write(prolog);
-				this.encode(macroExpression.getExpression().toString());
-				this.outputWriter.write(epilog);
-			} else {
-				this.outputWriter.write('\'');
-				this.encode(next.toString());
-				this.outputWriter.write('\'');
-			}
-
-			first = false;
-		}
-
-		if (isExpression) {
-			this.outputWriter.write(";}");
-		}
-	}
-
-	protected void encodeAttributeValue(Attributes attributes, int idx)
-			throws SAXException, IOException {
-
-		String value = attributes.getValue(idx);
-		encodeExpressionString(value);
-	}
-
-	public void characters(char[] ch, int start, int length)
-			throws SAXException {
-		if (isProcessingCdata()) {
-			super.characters(ch, start, length);
-		} else {
-			List parsedExpression = parseExpressiion(new String(ch, start, length));
-			for (Iterator iterator = parsedExpression.iterator(); iterator
-					.hasNext();) {
-
-				Object next = iterator.next();
-				
-				if (next instanceof Expression) {
-					Expression expression = (Expression) next;
-					
-			        if (this.isBeforeDocumentStart() || level < 0)
-			            return;
-			        try {
-			        	if (level != 0 && !this.closeElement(false) && this.isProcessingCdata() == false) {
-			                this.outputWriter.write(',');
-			            }
-
-			        	if (this.isProcessingCdata() == false) {
-			                this.outputWriter.write("new ET(");
-			            }
-						
-			            this.outputWriter.write("function (context) { return ");
-			            this.outputWriter.write(prolog);
-						this.encode(expression.getExpression().toString());
-						this.outputWriter.write(epilog);
-			            this.outputWriter.write("}");
-
-						if (this.isProcessingCdata() == false) {
-			                this.outputWriter.write(")");
-			            }
-			        } catch (IOException e) {
-			            throw new SAXException("Write error",e);
-			        }
-
-				} else {
-					char[] cs = next.toString().toCharArray();
-					super.characters(cs, 0, cs.length);
-				}
-
-				if (iterator.hasNext()) {
-		        	try {
-						this.outputWriter.write(',');
-					} catch (IOException e) {
-						// TODO Auto-generated catch block
-						e.printStackTrace();
-					}
-                }
-			}
-		}
-	}
-
-	protected void encodeText(char[] chars, int start, int length)
-			throws SAXException, IOException {
-		if (!isProcessingCdata()) {
-			String str = new String(chars, start, length);
-			encodeExpressionString(str);
-		} else {
-			super.encodeText(chars, start, length);
-		}
-	}
-
-}
Modified: branches/refactor1/framework/impl/src/main/java/org/richfaces/renderkit/TemplateEncoderRendererBase.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/richfaces/renderkit/TemplateEncoderRendererBase.java	2007-06-29 19:07:21 UTC (rev 1421)
+++ branches/refactor1/framework/impl/src/main/java/org/richfaces/renderkit/TemplateEncoderRendererBase.java	2007-06-29 19:32:26 UTC (rev 1422)
@@ -67,29 +67,29 @@
 
 		writer.write("[");
 
-		try {
-			Transformer transformer;
+//		try {
+//			Transformer transformer;
+//
+//			synchronized (transformerFactory) {
+//				transformer = transformerFactory.newTransformer();
+//			}
+//
+//			transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
+//			transformer.setOutputProperty(OutputKeys.METHOD, "xml");
+//
+//			JSContentHandler contentHandler = new MacroDefinitionJSContentHandler(writer, "Richfaces.eval(\"", "\", context)");
+//			Result result = new SAXResult(contentHandler);
+//
+//			for (int i = 0; i < bodyChildrenLength; i++) {
+//				if (i != 0) {
+//					writer.write(", ");
+//				}
+//				transformer.transform(new DOMSource(bodyChildren.item(i)), result);
+//			}
+//		} catch (TransformerException e) {
+//			throw new IOException(e.getMessage());
+//		}
 
-			synchronized (transformerFactory) {
-				transformer = transformerFactory.newTransformer();
-			}
-
-			transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
-			transformer.setOutputProperty(OutputKeys.METHOD, "xml");
-
-			JSContentHandler contentHandler = new MacroDefinitionJSContentHandler(writer, "Richfaces.eval(\"", "\", context)");
-			Result result = new SAXResult(contentHandler);
-
-			for (int i = 0; i < bodyChildrenLength; i++) {
-				if (i != 0) {
-					writer.write(", ");
-				}
-				transformer.transform(new DOMSource(bodyChildren.item(i)), result);
-			}
-		} catch (TransformerException e) {
-			throw new IOException(e.getMessage());
-		}
-
 		writer.write("];\n");
 	}
 	
Modified: branches/refactor1/framework/test/src/main/java/org/ajax4jsf/tests/AbstractAjax4JsfTestCase.java
===================================================================
--- branches/refactor1/framework/test/src/main/java/org/ajax4jsf/tests/AbstractAjax4JsfTestCase.java	2007-06-29 19:07:21 UTC (rev 1421)
+++ branches/refactor1/framework/test/src/main/java/org/ajax4jsf/tests/AbstractAjax4JsfTestCase.java	2007-06-29 19:32:26 UTC (rev 1422)
@@ -49,6 +49,7 @@
 import javax.servlet.http.HttpServletResponse;
 
 import org.ajax4jsf.framework.ajax.AjaxContext;
+import org.ajax4jsf.framework.ajax.AjaxContextImpl;
 import org.ajax4jsf.framework.renderer.AjaxViewRootRenderer;
 import org.ajax4jsf.framework.renderer.ChameleonRenderKitImpl;
 import org.ajax4jsf.framework.resource.InternetResource;
@@ -113,7 +114,7 @@
 		// setup nessesary components.
 		application.addComponent("javax.faces.ViewRoot", MockViewRoot.class.getName());
 		// setup AjaxContext.
-		ajaxContext = new AjaxContext();
+		ajaxContext = new AjaxContextImpl();
 		request.setAttribute(AjaxContext.AJAX_CONTEXT_KEY, ajaxContext);
 		// Setup ViewHandler / ViewRoot.
 		application.setViewHandler(new MockViewHandler(application.getViewHandler()));
Modified: branches/refactor1/framework/test/src/main/java/org/ajax4jsf/tests/AbstractThreadedAjax4JsfTestCase.java
===================================================================
--- branches/refactor1/framework/test/src/main/java/org/ajax4jsf/tests/AbstractThreadedAjax4JsfTestCase.java	2007-06-29 19:07:21 UTC (rev 1421)
+++ branches/refactor1/framework/test/src/main/java/org/ajax4jsf/tests/AbstractThreadedAjax4JsfTestCase.java	2007-06-29 19:32:26 UTC (rev 1422)
@@ -27,6 +27,7 @@
 import junit.framework.TestResult;
 
 import org.ajax4jsf.framework.ajax.AjaxContext;
+import org.ajax4jsf.framework.ajax.AjaxContextImpl;
 import org.apache.shale.test.mock.MockFacesContext;
 import org.apache.shale.test.mock.MockHttpServletRequest;
 import org.apache.shale.test.mock.MockHttpServletResponse;
@@ -220,7 +221,7 @@
     protected FacesContext createFacesContext() {
         MockHttpSession tsession = new MockHttpSession();
         MockHttpServletRequest trequest = new MockHttpServletRequest(tsession);
-        trequest.setAttribute(AjaxContext.AJAX_CONTEXT_KEY, new AjaxContext());
+        trequest.setAttribute(AjaxContext.AJAX_CONTEXT_KEY, new AjaxContextImpl());
         MockHttpServletResponse tresponse = new MockHttpServletResponse();
         MockFacesContext tfacesContext = (MockFacesContext)
         facesContextFactory.getFacesContext(servletContext,
Copied: branches/refactor1/framework/test/src/main/java/org/ajax4jsf/tests/MockComponentState.java (from rev 1395, branches/refactor1/framework/test/src/test/java/org/ajax4jsf/ajax/repeat/MockComponentState.java)
===================================================================
--- branches/refactor1/framework/test/src/main/java/org/ajax4jsf/tests/MockComponentState.java	                        (rev 0)
+++ branches/refactor1/framework/test/src/main/java/org/ajax4jsf/tests/MockComponentState.java	2007-06-29 19:32:26 UTC (rev 1422)
@@ -0,0 +1,96 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.tests;
+
+import java.io.Serializable;
+
+import javax.faces.context.FacesContext;
+
+import org.ajax4jsf.ajax.repeat.DataComponentState;
+import org.ajax4jsf.ajax.repeat.Range;
+
+/**
+ * @author shura
+ *
+ */
+public class MockComponentState implements DataComponentState,Serializable {
+	
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = -4278697745017092414L;
+	private int _count = 2;
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.ajax.repeat.DataComponentState#getRange()
+	 */
+	public Range getRange() {
+		// TODO Auto-generated method stub
+		return new MockRange(_count);
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.component.StateHolder#isTransient()
+	 */
+	public boolean isTransient() {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.component.StateHolder#restoreState(javax.faces.context.FacesContext, java.lang.Object)
+	 */
+	public void restoreState(FacesContext context, Object state) {
+		_count = ((Integer)state).intValue();
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.component.StateHolder#saveState(javax.faces.context.FacesContext)
+	 */
+	public Object saveState(FacesContext context) {
+		// TODO Auto-generated method stub
+		return new Integer(_count);
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.component.StateHolder#setTransient(boolean)
+	 */
+	public void setTransient(boolean newTransientValue) {
+		// TODO Auto-generated method stub
+
+	}
+
+	/**
+	 * @return the count
+	 */
+	public int getCount() {
+		return _count;
+	}
+
+	/**
+	 * @param count the count to set
+	 */
+	public void setCount(int count) {
+		_count = count;
+	}
+
+}
Copied: branches/refactor1/framework/test/src/main/java/org/ajax4jsf/tests/MockDataAdaptor.java (from rev 1395, branches/refactor1/framework/test/src/test/java/org/ajax4jsf/ajax/repeat/MockDataAdaptor.java)
===================================================================
--- branches/refactor1/framework/test/src/main/java/org/ajax4jsf/tests/MockDataAdaptor.java	                        (rev 0)
+++ branches/refactor1/framework/test/src/main/java/org/ajax4jsf/tests/MockDataAdaptor.java	2007-06-29 19:32:26 UTC (rev 1422)
@@ -0,0 +1,68 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.tests;
+
+import java.util.Iterator;
+
+import org.ajax4jsf.ajax.repeat.DataComponentState;
+import org.ajax4jsf.ajax.repeat.ExtendedDataModel;
+import org.ajax4jsf.ajax.repeat.UIDataAdaptor;
+
+/**
+ * @author shura
+ *
+ */
+public class MockDataAdaptor extends UIDataAdaptor {
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.ajax.repeat.UIDataAdaptor#createComponentState()
+	 */
+	protected DataComponentState createComponentState() {
+		// TODO Auto-generated method stub
+		return new MockComponentState();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.ajax.repeat.UIDataAdaptor#createDataModel()
+	 */
+	protected ExtendedDataModel createDataModel() {
+		// TODO Auto-generated method stub
+		return new MockDataModel();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.ajax.repeat.UIDataAdaptor#dataChildren()
+	 */
+	protected Iterator dataChildren() {
+		// TODO Auto-generated method stub
+		return getChildren().iterator();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.ajax.repeat.UIDataAdaptor#fixedChildren()
+	 */
+	protected Iterator fixedChildren() {
+		// TODO Auto-generated method stub
+		return getFacets().values().iterator();
+	}
+
+}
Copied: branches/refactor1/framework/test/src/main/java/org/ajax4jsf/tests/MockDataModel.java (from rev 1395, branches/refactor1/framework/test/src/test/java/org/ajax4jsf/ajax/repeat/MockDataModel.java)
===================================================================
--- branches/refactor1/framework/test/src/main/java/org/ajax4jsf/tests/MockDataModel.java	                        (rev 0)
+++ branches/refactor1/framework/test/src/main/java/org/ajax4jsf/tests/MockDataModel.java	2007-06-29 19:32:26 UTC (rev 1422)
@@ -0,0 +1,171 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.tests;
+
+import java.io.IOException;
+import java.util.Iterator;
+
+import javax.faces.context.FacesContext;
+
+import org.ajax4jsf.ajax.repeat.DataVisitor;
+import org.ajax4jsf.ajax.repeat.ExtendedDataModel;
+import org.ajax4jsf.ajax.repeat.Range;
+import org.ajax4jsf.ajax.repeat.SequenceRange;
+
+/**
+ * @author shura
+ *
+ */
+public class MockDataModel extends ExtendedDataModel {
+	
+	public static final int ROWS = 10;
+	
+	private int rowIndex = 0;
+	
+	private int minRow = 0;
+	
+	private int maxRow = ROWS;
+
+	/**
+	 * @return the maxRow
+	 */
+	public int getMaxRow() {
+		return maxRow;
+	}
+
+	/**
+	 * @param maxRow the maxRow to set
+	 */
+	public void setMaxRow(int maxRow) {
+		this.maxRow = maxRow;
+	}
+
+	/**
+	 * @return the minRow
+	 */
+	public int getMinRow() {
+		return minRow;
+	}
+
+	/**
+	 * @param minRow the minRow to set
+	 */
+	public void setMinRow(int minRow) {
+		this.minRow = minRow;
+	}
+
+	
+	public void walk(FacesContext context, DataVisitor visitor, Range range, Object argument) throws IOException {
+		int first=0;
+		int count=ROWS;
+		if (range instanceof MockRange) {			
+		 MockRange mockRange = (MockRange) range;
+		 count = mockRange.getCount();
+		} else if (range instanceof SequenceRange) {
+			SequenceRange seqRange = (SequenceRange) range;
+			first = seqRange.getFirstRow();
+			int rows = seqRange.getRows();
+			if(rows>0){
+				count = rows+first;
+			}
+		}
+		for(int row = first; row < count && row < ROWS;row++){
+			visitor.process(context, new Integer(row), argument);
+		}
+		
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.ajax.repeat.ExtendedDataModel#getRowKey()
+	 */
+	public Object getRowKey() {
+		// TODO Auto-generated method stub
+		return rowIndex<0?null:new Integer(rowIndex);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.ajax.repeat.ExtendedDataModel#setRowKey(java.lang.Object)
+	 */
+	public void setRowKey(Object key) {
+		if(null == key){
+			rowIndex = -1;
+		} else {
+			rowIndex = ((Integer) key).intValue();
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.model.DataModel#getRowCount()
+	 */
+	public int getRowCount() {
+		// TODO Auto-generated method stub
+		return getMaxRow();
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.model.DataModel#getRowData()
+	 */
+	public Object getRowData() {
+		// TODO Auto-generated method stub
+		return isRowAvailable()?String.valueOf(rowIndex):null;
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.model.DataModel#getRowIndex()
+	 */
+	public int getRowIndex() {
+		// TODO Auto-generated method stub
+		return rowIndex;
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.model.DataModel#getWrappedData()
+	 */
+	public Object getWrappedData() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.model.DataModel#isRowAvailable()
+	 */
+	public boolean isRowAvailable() {
+		// TODO Auto-generated method stub
+		return rowIndex>=getMinRow() && rowIndex<getMaxRow();
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.model.DataModel#setRowIndex(int)
+	 */
+	public void setRowIndex(int rowIndex) {
+		this.rowIndex = rowIndex;
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.model.DataModel#setWrappedData(java.lang.Object)
+	 */
+	public void setWrappedData(Object data) {
+		// TODO Auto-generated method stub
+
+	}
+
+}
Copied: branches/refactor1/framework/test/src/main/java/org/ajax4jsf/tests/MockRange.java (from rev 1395, branches/refactor1/framework/test/src/test/java/org/ajax4jsf/ajax/repeat/MockRange.java)
===================================================================
--- branches/refactor1/framework/test/src/main/java/org/ajax4jsf/tests/MockRange.java	                        (rev 0)
+++ branches/refactor1/framework/test/src/main/java/org/ajax4jsf/tests/MockRange.java	2007-06-29 19:32:26 UTC (rev 1422)
@@ -0,0 +1,41 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.tests;
+
+import org.ajax4jsf.ajax.repeat.Range;
+
+/**
+ * @author shura
+ *
+ */
+public class MockRange implements Range {
+	
+	private int count;
+
+	public MockRange(int count) {
+		this.count = count;
+	}
+
+	public int getCount(){
+		return count;
+	}
+}
Copied: branches/refactor1/framework/test/src/main/java/org/ajax4jsf/tests/MockSerializableDataModel.java (from rev 1395, branches/refactor1/framework/test/src/test/java/org/ajax4jsf/ajax/repeat/MockSerializableDataModel.java)
===================================================================
--- branches/refactor1/framework/test/src/main/java/org/ajax4jsf/tests/MockSerializableDataModel.java	                        (rev 0)
+++ branches/refactor1/framework/test/src/main/java/org/ajax4jsf/tests/MockSerializableDataModel.java	2007-06-29 19:32:26 UTC (rev 1422)
@@ -0,0 +1,100 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.tests;
+
+import java.io.IOException;
+
+import javax.faces.context.FacesContext;
+
+import org.ajax4jsf.ajax.repeat.DataVisitor;
+import org.ajax4jsf.ajax.repeat.Range;
+import org.ajax4jsf.ajax.repeat.SerializableDataModel;
+
+/**
+ * @author shura
+ *
+ */
+public class MockSerializableDataModel extends MockDataModel {
+
+	public SerializableDataModel getSerializableModel(Range range) {
+		MockRange mockRange = (MockRange) range;
+		SerializableDataModel model = new SerializableDataModel(){
+
+			public void update() {
+				// TODO Auto-generated method stub
+				
+			}
+
+			public Object getRowKey() {
+				// TODO Auto-generated method stub
+				return null;
+			}
+
+			public void setRowKey(Object key) {
+				// TODO Auto-generated method stub
+				
+			}
+
+			public void walk(FacesContext context, DataVisitor visitor, Range range, Object argument) throws IOException {
+				// TODO Auto-generated method stub
+				
+			}
+
+			public int getRowCount() {
+				// TODO Auto-generated method stub
+				return 0;
+			}
+
+			public Object getRowData() {
+				// TODO Auto-generated method stub
+				return null;
+			}
+
+			public int getRowIndex() {
+				// TODO Auto-generated method stub
+				return 0;
+			}
+
+			public Object getWrappedData() {
+				// TODO Auto-generated method stub
+				return null;
+			}
+
+			public boolean isRowAvailable() {
+				// TODO Auto-generated method stub
+				return false;
+			}
+
+			public void setRowIndex(int arg0) {
+				// TODO Auto-generated method stub
+				
+			}
+
+			public void setWrappedData(Object arg0) {
+				// TODO Auto-generated method stub
+				
+			}
+			
+		};
+		return model;
+	}
+}
Deleted: branches/refactor1/framework/test/src/test/java/org/ajax4jsf/ajax/ActionListenerTest.java
===================================================================
--- branches/refactor1/framework/test/src/test/java/org/ajax4jsf/ajax/ActionListenerTest.java	2007-06-29 19:07:21 UTC (rev 1421)
+++ branches/refactor1/framework/test/src/test/java/org/ajax4jsf/ajax/ActionListenerTest.java	2007-06-29 19:32:26 UTC (rev 1422)
@@ -1,154 +0,0 @@
-/**
- * License Agreement.
- *
- * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- */
-
-package org.ajax4jsf.ajax;
-
-import java.io.Serializable;
-
-import javax.faces.component.UICommand;
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-import javax.faces.convert.Converter;
-import javax.faces.convert.IntegerConverter;
-import javax.faces.event.ActionEvent;
-
-import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
-
-import junit.framework.TestCase;
-
-/**
- * @author shura
- *
- */
-public class ActionListenerTest extends AbstractAjax4JsfTestCase {
-
-	/**
-	 * @param name
-	 */
-	public ActionListenerTest(String name) {
-		super(name);
-	}
-
-	/* (non-Javadoc)
-	 * @see junit.framework.TestCase#setUp()
-	 */
-	public void setUp() throws Exception {
-		super.setUp();
-	}
-
-	/* (non-Javadoc)
-	 * @see junit.framework.TestCase#tearDown()
-	 */
-	public void tearDown() throws Exception {
-		super.tearDown();
-	}
-
-	/**
-	 * Test method for {@link org.ajax4jsf.ajax.UIActionParameter#getValue()}.
-	 */
-	public void testGetValue() {
-		Bean bean = new Bean();
-		bean.setFirst(1);
-		bean.setSecond(2.0);
-		UIActionParameter param = new UIActionParameter();
-		param.setConverter(new TestConverter());
-		param.setValue(bean);
-		assertEquals("1;2.0", param.getValue());
-	}
-	
-	public void testGetIntValue() throws Exception {
-		UIActionParameter param = new UIActionParameter();
-		application.addConverter(Integer.class, IntegerConverter.class.getName());
-		param.setValue(new Integer(1));
-		assertEquals("1", param.getValue());		
-	}
-	
-	static class TestConverter implements Converter {
-
-		/* (non-Javadoc)
-		 * @see javax.faces.convert.Converter#getAsObject(javax.faces.context.FacesContext, javax.faces.component.UIComponent, java.lang.String)
-		 */
-		public Object getAsObject(FacesContext context, UIComponent comp, String str) {
-			Bean bean = new Bean();
-			String[] values = str.split(";");
-			bean.setFirst(Integer.parseInt(values[0]));
-			bean.setSecond(Double.parseDouble(values[1]));
-			return bean;
-		}
-
-		/* (non-Javadoc)
-		 * @see javax.faces.convert.Converter#getAsString(javax.faces.context.FacesContext, javax.faces.component.UIComponent, java.lang.Object)
-		 */
-		public String getAsString(FacesContext context, UIComponent comp, Object value) {
-			Bean bean = (Bean) value;
-			return String.valueOf(bean.getFirst())+";"+String.valueOf(bean.getSecond());
-		}
-		
-	}
-	
-	public static class Bean implements Serializable {
-		int _first;
-		double _second;
-		/**
-		 * @return the first
-		 */
-		public int getFirst() {
-			return this._first;
-		}
-		/**
-		 * @param first the first to set
-		 */
-		public void setFirst(int first) {
-			this._first = first;
-		}
-		/**
-		 * @return the second
-		 */
-		public double getSecond() {
-			return this._second;
-		}
-		/**
-		 * @param second the second to set
-		 */
-		public void setSecond(double second) {
-			this._second = second;
-		}
-	}
-
-	/**
-	 * Test method for {@link org.ajax4jsf.ajax.UIActionParameter#processAction(javax.faces.event.ActionEvent)}.
-	 */
-	public void testProcessAction() {
-		UICommand command = new UICommand();
-		UIActionParameter param = new UIActionParameter();
-		param.setConverter(new IntegerConverter());
-		param.setName("param");
-		param.setAssignToBinding(application.createValueBinding("#{bean.first}"));
-		Bean bean = new Bean();
-		request.setAttribute("bean", bean);
-		request.addParameter("param", "123");
-		externalContext.getRequestParameterMap().put("param", "123");
-		command.addActionListener(param);
-		command.broadcast(new ActionEvent(command));
-		assertEquals(123, bean.getFirst());
-	}
-
-}
Deleted: branches/refactor1/framework/test/src/test/java/org/ajax4jsf/ajax/repeat/AllUIRepeatTests.java
===================================================================
--- branches/refactor1/framework/test/src/test/java/org/ajax4jsf/ajax/repeat/AllUIRepeatTests.java	2007-06-29 19:07:21 UTC (rev 1421)
+++ branches/refactor1/framework/test/src/test/java/org/ajax4jsf/ajax/repeat/AllUIRepeatTests.java	2007-06-29 19:32:26 UTC (rev 1422)
@@ -1,38 +0,0 @@
-/**
- * License Agreement.
- *
- * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- */
-
-package org.ajax4jsf.ajax.repeat;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-public class AllUIRepeatTests {
-
-	public static Test suite() {
-		TestSuite suite = new TestSuite("Test for org.ajax4jsf.ajax.repeat");
-		//$JUnit-BEGIN$
-		suite.addTestSuite(DataAdaptorTestCase.class);
-		suite.addTestSuite(RepeatTestCase.class);
-		//$JUnit-END$
-		return suite;
-	}
-
-}
Modified: branches/refactor1/framework/test/src/test/java/org/ajax4jsf/ajax/repeat/DataAdaptorTestCase.java
===================================================================
--- branches/refactor1/framework/test/src/test/java/org/ajax4jsf/ajax/repeat/DataAdaptorTestCase.java	2007-06-29 19:07:21 UTC (rev 1421)
+++ branches/refactor1/framework/test/src/test/java/org/ajax4jsf/ajax/repeat/DataAdaptorTestCase.java	2007-06-29 19:32:26 UTC (rev 1422)
@@ -32,6 +32,9 @@
 import javax.faces.context.FacesContext;
 
 import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+import org.ajax4jsf.tests.MockComponentState;
+import org.ajax4jsf.tests.MockDataAdaptor;
+import org.ajax4jsf.tests.MockDataModel;
 import org.ajax4jsf.tests.MockUIInputRenderer;
 
 /**
Deleted: branches/refactor1/framework/test/src/test/java/org/ajax4jsf/ajax/repeat/MockComponentState.java
===================================================================
--- branches/refactor1/framework/test/src/test/java/org/ajax4jsf/ajax/repeat/MockComponentState.java	2007-06-29 19:07:21 UTC (rev 1421)
+++ branches/refactor1/framework/test/src/test/java/org/ajax4jsf/ajax/repeat/MockComponentState.java	2007-06-29 19:32:26 UTC (rev 1422)
@@ -1,93 +0,0 @@
-/**
- * License Agreement.
- *
- * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- */
-
-package org.ajax4jsf.ajax.repeat;
-
-import java.io.Serializable;
-
-import javax.faces.context.FacesContext;
-
-/**
- * @author shura
- *
- */
-public class MockComponentState implements DataComponentState,Serializable {
-	
-	/**
-	 * 
-	 */
-	private static final long serialVersionUID = -4278697745017092414L;
-	private int _count = 2;
-
-	/* (non-Javadoc)
-	 * @see org.ajax4jsf.ajax.repeat.DataComponentState#getRange()
-	 */
-	public Range getRange() {
-		// TODO Auto-generated method stub
-		return new MockRange(_count);
-	}
-
-	/* (non-Javadoc)
-	 * @see javax.faces.component.StateHolder#isTransient()
-	 */
-	public boolean isTransient() {
-		// TODO Auto-generated method stub
-		return false;
-	}
-
-	/* (non-Javadoc)
-	 * @see javax.faces.component.StateHolder#restoreState(javax.faces.context.FacesContext, java.lang.Object)
-	 */
-	public void restoreState(FacesContext context, Object state) {
-		_count = ((Integer)state).intValue();
-	}
-
-	/* (non-Javadoc)
-	 * @see javax.faces.component.StateHolder#saveState(javax.faces.context.FacesContext)
-	 */
-	public Object saveState(FacesContext context) {
-		// TODO Auto-generated method stub
-		return new Integer(_count);
-	}
-
-	/* (non-Javadoc)
-	 * @see javax.faces.component.StateHolder#setTransient(boolean)
-	 */
-	public void setTransient(boolean newTransientValue) {
-		// TODO Auto-generated method stub
-
-	}
-
-	/**
-	 * @return the count
-	 */
-	public int getCount() {
-		return _count;
-	}
-
-	/**
-	 * @param count the count to set
-	 */
-	public void setCount(int count) {
-		_count = count;
-	}
-
-}
Deleted: branches/refactor1/framework/test/src/test/java/org/ajax4jsf/ajax/repeat/MockDataAdaptor.java
===================================================================
--- branches/refactor1/framework/test/src/test/java/org/ajax4jsf/ajax/repeat/MockDataAdaptor.java	2007-06-29 19:07:21 UTC (rev 1421)
+++ branches/refactor1/framework/test/src/test/java/org/ajax4jsf/ajax/repeat/MockDataAdaptor.java	2007-06-29 19:32:26 UTC (rev 1422)
@@ -1,64 +0,0 @@
-/**
- * License Agreement.
- *
- * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- */
-
-package org.ajax4jsf.ajax.repeat;
-
-import java.util.Iterator;
-
-/**
- * @author shura
- *
- */
-public class MockDataAdaptor extends UIDataAdaptor {
-
-	/* (non-Javadoc)
-	 * @see org.ajax4jsf.ajax.repeat.UIDataAdaptor#createComponentState()
-	 */
-	protected DataComponentState createComponentState() {
-		// TODO Auto-generated method stub
-		return new MockComponentState();
-	}
-
-	/* (non-Javadoc)
-	 * @see org.ajax4jsf.ajax.repeat.UIDataAdaptor#createDataModel()
-	 */
-	protected ExtendedDataModel createDataModel() {
-		// TODO Auto-generated method stub
-		return new MockDataModel();
-	}
-
-	/* (non-Javadoc)
-	 * @see org.ajax4jsf.ajax.repeat.UIDataAdaptor#dataChildren()
-	 */
-	protected Iterator dataChildren() {
-		// TODO Auto-generated method stub
-		return getChildren().iterator();
-	}
-
-	/* (non-Javadoc)
-	 * @see org.ajax4jsf.ajax.repeat.UIDataAdaptor#fixedChildren()
-	 */
-	protected Iterator fixedChildren() {
-		// TODO Auto-generated method stub
-		return getFacets().values().iterator();
-	}
-
-}
Deleted: branches/refactor1/framework/test/src/test/java/org/ajax4jsf/ajax/repeat/MockDataModel.java
===================================================================
--- branches/refactor1/framework/test/src/test/java/org/ajax4jsf/ajax/repeat/MockDataModel.java	2007-06-29 19:07:21 UTC (rev 1421)
+++ branches/refactor1/framework/test/src/test/java/org/ajax4jsf/ajax/repeat/MockDataModel.java	2007-06-29 19:32:26 UTC (rev 1422)
@@ -1,166 +0,0 @@
-/**
- * License Agreement.
- *
- * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- */
-
-package org.ajax4jsf.ajax.repeat;
-
-import java.io.IOException;
-import java.util.Iterator;
-
-import javax.faces.context.FacesContext;
-
-/**
- * @author shura
- *
- */
-public class MockDataModel extends ExtendedDataModel {
-	
-	public static final int ROWS = 10;
-	
-	private int rowIndex = 0;
-	
-	private int minRow = 0;
-	
-	private int maxRow = ROWS;
-
-	/**
-	 * @return the maxRow
-	 */
-	public int getMaxRow() {
-		return maxRow;
-	}
-
-	/**
-	 * @param maxRow the maxRow to set
-	 */
-	public void setMaxRow(int maxRow) {
-		this.maxRow = maxRow;
-	}
-
-	/**
-	 * @return the minRow
-	 */
-	public int getMinRow() {
-		return minRow;
-	}
-
-	/**
-	 * @param minRow the minRow to set
-	 */
-	public void setMinRow(int minRow) {
-		this.minRow = minRow;
-	}
-
-	
-	public void walk(FacesContext context, DataVisitor visitor, Range range, Object argument) throws IOException {
-		int first=0;
-		int count=ROWS;
-		if (range instanceof MockRange) {			
-		 MockRange mockRange = (MockRange) range;
-		 count = mockRange.getCount();
-		} else if (range instanceof SequenceRange) {
-			SequenceRange seqRange = (SequenceRange) range;
-			first = seqRange.getFirstRow();
-			int rows = seqRange.getRows();
-			if(rows>0){
-				count = rows+first;
-			}
-		}
-		for(int row = first; row < count && row < ROWS;row++){
-			visitor.process(context, new Integer(row), argument);
-		}
-		
-	}
-
-	/* (non-Javadoc)
-	 * @see org.ajax4jsf.ajax.repeat.ExtendedDataModel#getRowKey()
-	 */
-	public Object getRowKey() {
-		// TODO Auto-generated method stub
-		return rowIndex<0?null:new Integer(rowIndex);
-	}
-
-	/* (non-Javadoc)
-	 * @see org.ajax4jsf.ajax.repeat.ExtendedDataModel#setRowKey(java.lang.Object)
-	 */
-	public void setRowKey(Object key) {
-		if(null == key){
-			rowIndex = -1;
-		} else {
-			rowIndex = ((Integer) key).intValue();
-		}
-	}
-
-	/* (non-Javadoc)
-	 * @see javax.faces.model.DataModel#getRowCount()
-	 */
-	public int getRowCount() {
-		// TODO Auto-generated method stub
-		return getMaxRow();
-	}
-
-	/* (non-Javadoc)
-	 * @see javax.faces.model.DataModel#getRowData()
-	 */
-	public Object getRowData() {
-		// TODO Auto-generated method stub
-		return isRowAvailable()?String.valueOf(rowIndex):null;
-	}
-
-	/* (non-Javadoc)
-	 * @see javax.faces.model.DataModel#getRowIndex()
-	 */
-	public int getRowIndex() {
-		// TODO Auto-generated method stub
-		return rowIndex;
-	}
-
-	/* (non-Javadoc)
-	 * @see javax.faces.model.DataModel#getWrappedData()
-	 */
-	public Object getWrappedData() {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	/* (non-Javadoc)
-	 * @see javax.faces.model.DataModel#isRowAvailable()
-	 */
-	public boolean isRowAvailable() {
-		// TODO Auto-generated method stub
-		return rowIndex>=getMinRow() && rowIndex<getMaxRow();
-	}
-
-	/* (non-Javadoc)
-	 * @see javax.faces.model.DataModel#setRowIndex(int)
-	 */
-	public void setRowIndex(int rowIndex) {
-		this.rowIndex = rowIndex;
-	}
-
-	/* (non-Javadoc)
-	 * @see javax.faces.model.DataModel#setWrappedData(java.lang.Object)
-	 */
-	public void setWrappedData(Object data) {
-		// TODO Auto-generated method stub
-
-	}
-
-}
Deleted: branches/refactor1/framework/test/src/test/java/org/ajax4jsf/ajax/repeat/MockRange.java
===================================================================
--- branches/refactor1/framework/test/src/test/java/org/ajax4jsf/ajax/repeat/MockRange.java	2007-06-29 19:07:21 UTC (rev 1421)
+++ branches/refactor1/framework/test/src/test/java/org/ajax4jsf/ajax/repeat/MockRange.java	2007-06-29 19:32:26 UTC (rev 1422)
@@ -1,39 +0,0 @@
-/**
- * License Agreement.
- *
- * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- */
-
-package org.ajax4jsf.ajax.repeat;
-
-/**
- * @author shura
- *
- */
-public class MockRange implements Range {
-	
-	private int count;
-
-	public MockRange(int count) {
-		this.count = count;
-	}
-
-	public int getCount(){
-		return count;
-	}
-}
Deleted: branches/refactor1/framework/test/src/test/java/org/ajax4jsf/ajax/repeat/MockSerializableDataModel.java
===================================================================
--- branches/refactor1/framework/test/src/test/java/org/ajax4jsf/ajax/repeat/MockSerializableDataModel.java	2007-06-29 19:07:21 UTC (rev 1421)
+++ branches/refactor1/framework/test/src/test/java/org/ajax4jsf/ajax/repeat/MockSerializableDataModel.java	2007-06-29 19:32:26 UTC (rev 1422)
@@ -1,96 +0,0 @@
-/**
- * License Agreement.
- *
- * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- */
-
-package org.ajax4jsf.ajax.repeat;
-
-import java.io.IOException;
-
-import javax.faces.context.FacesContext;
-
-/**
- * @author shura
- *
- */
-public class MockSerializableDataModel extends MockDataModel {
-
-	public SerializableDataModel getSerializableModel(Range range) {
-		MockRange mockRange = (MockRange) range;
-		SerializableDataModel model = new SerializableDataModel(){
-
-			public void update() {
-				// TODO Auto-generated method stub
-				
-			}
-
-			public Object getRowKey() {
-				// TODO Auto-generated method stub
-				return null;
-			}
-
-			public void setRowKey(Object key) {
-				// TODO Auto-generated method stub
-				
-			}
-
-			public void walk(FacesContext context, DataVisitor visitor, Range range, Object argument) throws IOException {
-				// TODO Auto-generated method stub
-				
-			}
-
-			public int getRowCount() {
-				// TODO Auto-generated method stub
-				return 0;
-			}
-
-			public Object getRowData() {
-				// TODO Auto-generated method stub
-				return null;
-			}
-
-			public int getRowIndex() {
-				// TODO Auto-generated method stub
-				return 0;
-			}
-
-			public Object getWrappedData() {
-				// TODO Auto-generated method stub
-				return null;
-			}
-
-			public boolean isRowAvailable() {
-				// TODO Auto-generated method stub
-				return false;
-			}
-
-			public void setRowIndex(int arg0) {
-				// TODO Auto-generated method stub
-				
-			}
-
-			public void setWrappedData(Object arg0) {
-				// TODO Auto-generated method stub
-				
-			}
-			
-		};
-		return model;
-	}
-}
Deleted: branches/refactor1/framework/test/src/test/java/org/ajax4jsf/ajax/repeat/RepeatTestCase.java
===================================================================
--- branches/refactor1/framework/test/src/test/java/org/ajax4jsf/ajax/repeat/RepeatTestCase.java	2007-06-29 19:07:21 UTC (rev 1421)
+++ branches/refactor1/framework/test/src/test/java/org/ajax4jsf/ajax/repeat/RepeatTestCase.java	2007-06-29 19:32:26 UTC (rev 1422)
@@ -1,246 +0,0 @@
-/**
- * License Agreement.
- *
- * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- */
-
-package org.ajax4jsf.ajax.repeat;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.Map;
-
-import javax.faces.component.UIColumn;
-import javax.faces.component.UIComponent;
-import javax.faces.component.UIData;
-import javax.faces.component.UIInput;
-import javax.faces.context.FacesContext;
-
-import org.ajax4jsf.renderkit.html.RepeatRenderer;
-import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
-import org.ajax4jsf.tests.MockUIInputRenderer;
-
-/**
- * @author shura
- *
- */
-public class RepeatTestCase extends AbstractAjax4JsfTestCase {
-
-	private UIRepeat repeater;
-	
-	private UIInput child;
-	
-	private int childInvoked;
-	
-	private UIInput facetChild;
-	
-	private int facetInvoked;
-
-	private UIInput childChild;
-	
-	private int childChildInvoked;
-
-	private UIInput childChildFacet;
-	
-	private int childChildFacetInvoked;
-
-	private UIRepeat enclosedRepeater;
-	/**
-	 * @param name
-	 */
-	public RepeatTestCase(String name) {
-		super(name);
-	}
-
-	/* (non-Javadoc)
-	 * @see org.ajax4jsf.tests.AbstractAjax4JsfTestCase#setUp()
-	 */
-	public void setUp() throws Exception {
-		super.setUp();
-		// Create mock DataAdaptor and childs.
-		repeater = new UIRepeat();
-		child = new UIInput(){
-			public void processDecodes(FacesContext context) {
-				childInvoked++;
-				super.processDecodes(context);
-			}
-		};
-		childInvoked = 0;
-		child.setId("child");
-		repeater.getChildren().add(child);
-		facetChild = new UIInput(){
-			public void processDecodes(FacesContext context) {
-				facetInvoked++;
-				super.processDecodes(context);
-			}
-		};
-		facetInvoked = 0;
-		facetChild.setId("facetChild");
-		repeater.getFacets().put("facet", facetChild);
-		childChild = new UIInput(){
-			public void processDecodes(FacesContext context) {
-				childChildInvoked++;
-				super.processDecodes(context);
-			}
-		};;
-		childChildInvoked = 0;
-		childChild.setId("childChild");
-		child.getChildren().add(childChild);
-		childChildFacet = new UIInput(){
-			public void processDecodes(FacesContext context) {
-				childChildFacetInvoked++;
-				super.processDecodes(context);
-			}
-		};;
-		childChildFacetInvoked = 0;
-		childChildFacet.setId("childChildFacet");
-		childChild.getFacets().put("facet", childChildFacet);
-		enclosedRepeater = new UIRepeat();
-		renderKit.addRenderer(child.getFamily(), child.getRendererType(), new MockUIInputRenderer(){
-			public void decode(FacesContext context, UIComponent component) {
-				super.decode(context, component);
-				UIInput input = (UIInput) component;
-				String submittedValie = enclosedRepeater.getRowKey()+":"+repeater.getRowKey();
-				input.setSubmittedValue(submittedValie);
-				System.out.println("decode component "+component.getClientId(facesContext)+" with value "+submittedValie);
-			}
-		});
-		renderKit.addRenderer(repeater.getFamily(), repeater.getRendererType(), new RepeatRenderer());
-	}
-
-	/* (non-Javadoc)
-	 * @see org.ajax4jsf.tests.AbstractAjax4JsfTestCase#tearDown()
-	 */
-	public void tearDown() throws Exception {
-		super.tearDown();
-		repeater = null;
-		child = null;
-		childChild = null;
-		childChildFacet = null;
-		facetChild = null;
-		enclosedRepeater = null;
-	}
-
-
-	private void createDataTree(){
-		enclosedRepeater.setId("data");
-		repeater.setId("adaptor");
-		repeater.setVar("row");
-		ArrayList value = new ArrayList(2);
-		value.add("first");
-		value.add("second");
-		enclosedRepeater.setValue(value);
-		enclosedRepeater.setVar("var");
-		UIColumn column = new UIColumn();
-		enclosedRepeater.getChildren().add(column);
-		column.getChildren().add(repeater);
-		facesContext.getViewRoot().getChildren().add(enclosedRepeater);
-	}
-	
-	private void printChildMap(Map childrenState){
-		System.out.println("{");
-		for (Iterator iter = childrenState.keySet().iterator(); iter.hasNext();) {
-			Object key = iter.next();
-			System.out.println(" "+key+" : "+childrenState.get(key));
-		}
-		System.out.println("}");
-	}
-	/**
-	 * Test method for {@link javax.faces.component.UIData#processDecodes(javax.faces.context.FacesContext)}.
-	 */
-	public void testProcessDecodesFacesContext() {
-		createDataTree();
-		repeater.setValue(new MockDataModel());
-//		enclosedRepeater.setValue(new MockDataModel());
-		enclosedRepeater.processDecodes(facesContext);
-		enclosedRepeater.setRowIndex(1);
-		repeater.setRowIndex(1);
-		System.out.println("Saved child state for external repeater ");
-		printChildMap(enclosedRepeater.getChildState(facesContext));
-		System.out.println("Saved child state" );
-		printChildMap(repeater.getChildState(facesContext));
-		assertEquals("1:1", child.getSubmittedValue());
-	}
-
-	/**
-	 * Test method for {@link javax.faces.component.UIData#processUpdates(javax.faces.context.FacesContext)}.
-	 */
-	public void testProcessUpdatesFacesContext() {
-		createDataTree();
-		repeater.setValue(new MockDataModel());
-//		enclosedRepeater.setValue(new MockDataModel());
-		enclosedRepeater.processDecodes(facesContext);
-		enclosedRepeater.processValidators(facesContext);
-		enclosedRepeater.processUpdates(facesContext);
-		enclosedRepeater.setRowIndex(1);
-		repeater.setRowIndex(1);		
-		assertEquals("1:1", child.getValue());
-		enclosedRepeater.setRowIndex(0);
-		repeater.setRowIndex(2);		
-		assertEquals("0:2", child.getValue());
-	}
-
-	/**
-	 * Test method for {@link javax.faces.component.UIData#processUpdates(javax.faces.context.FacesContext)}.
-	 */
-	public void testProcessValidatorsFacesContext() {
-		createDataTree();
-		repeater.setValue(new MockDataModel());
-//		enclosedRepeater.setValue(new MockDataModel());
-		enclosedRepeater.processDecodes(facesContext);
-		enclosedRepeater.processValidators(facesContext);
-		enclosedRepeater.setRowIndex(1);
-		repeater.setRowIndex(1);		
-		assertEquals("1:1", child.getLocalValue());
-		enclosedRepeater.setRowIndex(0);
-		repeater.setRowIndex(2);		
-		assertEquals("0:2", child.getLocalValue());
-	}
-	
-	public void testSetRowIndex() throws Exception {
-		createDataTree();
-		repeater.setValue(new MockDataModel());
-		enclosedRepeater.setRowIndex(1);
-		repeater.setRowIndex(1);
-		child.setValue("1:1");
-		repeater.setRowIndex(-1);
-		enclosedRepeater.setRowIndex(-1);
-		// -----------------------------
-		enclosedRepeater.setRowIndex(0);
-		repeater.setRowIndex(2);
-		child.setValue("0:2");
-		// -----------------------------
-		repeater.setRowIndex(-1);
-		enclosedRepeater.setRowIndex(-1);
-		System.out.println("Saved child state for external repeater ");
-		printChildMap(enclosedRepeater.getChildState(facesContext));
-		System.out.println("Saved child state" );
-		printChildMap(repeater.getChildState(facesContext));
-		// -----------------------------
-		enclosedRepeater.setRowIndex(1);
-		repeater.setRowIndex(1);		
-		assertEquals("1:1", child.getValue());
-		repeater.setRowIndex(-1);
-		enclosedRepeater.setRowIndex(-1);
-		// -----------------------------
-		enclosedRepeater.setRowIndex(0);
-		repeater.setRowIndex(2);		
-		assertEquals("0:2", child.getValue());
-		
-	}
-}
Modified: branches/refactor1/framework/test/src/test/java/org/ajax4jsf/framework/renderer/BeforeRendererListenerTestCase.java
===================================================================
--- branches/refactor1/framework/test/src/test/java/org/ajax4jsf/framework/renderer/BeforeRendererListenerTestCase.java	2007-06-29 19:07:21 UTC (rev 1421)
+++ branches/refactor1/framework/test/src/test/java/org/ajax4jsf/framework/renderer/BeforeRendererListenerTestCase.java	2007-06-29 19:32:26 UTC (rev 1422)
@@ -29,7 +29,7 @@
 import org.ajax4jsf.framework.ajax.AjaxContext;
 import org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter;
 import org.ajax4jsf.framework.ajax.xmlfilter.FilterServletResponseWrapper;
-import org.ajax4jsf.renderkit.html.CommandButtonRenderer;
+
 import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
 
 /**
@@ -69,8 +69,8 @@
 	public void testAfterPhase() throws Exception {
 		PhaseListener listener = new AjaxPhaseListener();
 		PhaseEvent event = new PhaseEvent(facesContext,PhaseId.RENDER_RESPONSE,lifecycle);
-		UIComponent ajaxButton = createComponent("org.ajax4jsf.ajax.AjaxButton", "org.ajax4jsf.ajax.html.HtmlAjaxCommandButton", "org.ajax4jsf.ajax.AjaxButton", CommandButtonRenderer.class, null);
-		facesContext.getViewRoot().getChildren().add(ajaxButton);
+//		UIComponent ajaxButton = createComponent("org.ajax4jsf.ajax.AjaxButton", "org.ajax4jsf.ajax.html.HtmlAjaxCommandButton", "org.ajax4jsf.ajax.AjaxButton", CommandButtonRenderer.class, null);
+//		facesContext.getViewRoot().getChildren().add(ajaxButton);
 		AjaxContext.getCurrentInstance(facesContext).setAjaxRequest(true);
 		// TODO Must be used different StateManager !
 //		listener.afterPhase(event);
Copied: branches/refactor1/framework/test/src/test/java/org/richfaces/renderkit/TemplateUtilTest.jav (from rev 1396, branches/refactor1/framework/test/src/test/java/org/richfaces/renderkit/TemplateUtilTest.java)
===================================================================
--- branches/refactor1/framework/test/src/test/java/org/richfaces/renderkit/TemplateUtilTest.jav	                        (rev 0)
+++ branches/refactor1/framework/test/src/test/java/org/richfaces/renderkit/TemplateUtilTest.jav	2007-06-29 19:32:26 UTC (rev 1422)
@@ -0,0 +1,70 @@
+/**
+ * License Agreement.
+ *
+ *  JBoss RichFaces 3.0 - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007  Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.richfaces.renderkit;
+
+import java.io.IOException;
+import java.util.List;
+
+import junit.framework.TestCase;
+
+import org.antlr.runtime.ANTLRStringStream;
+import org.antlr.runtime.CommonTokenStream;
+import org.antlr.runtime.tree.Tree;
+import org.richfaces.RichMacroDefinitionLexer;
+import org.richfaces.RichMacroDefinitionParser;
+import org.richfaces.RichMacroDefinitionParser.expression_return;
+
+/**
+ * @author Nick Belaevski - mailto:nbelaevski@exadel.com
+ * created 17.06.2007
+ *
+ */
+public class TemplateUtilTest extends TestCase {
+
+	private String doWrite(String in) throws IOException {
+		return in;
+	}
+
+	private void printTree(Tree tree, int indent) {
+		int childCount = tree.getChildCount();
+		for (int i = 0; i < indent; i++) {
+			System.out.print('\t');
+			System.out.print(tree.getText() + " : " + tree.getType());
+			System.out.println();
+		}
+		for (int j = 1; j < childCount; j++) {
+			printTree(tree.getChild(j), ++indent);
+		}
+	}
+
+
+	public void testAntlr() throws Exception {
+		ANTLRStringStream stream = new ANTLRStringStream("{aa{b\\}}a}\\\\ a\\}b\\{c");
+		RichMacroDefinitionLexer lexer = new RichMacroDefinitionLexer(stream);
+		RichMacroDefinitionParser macroParser = new RichMacroDefinitionParser(new CommonTokenStream(lexer));
+		expression_return expression = macroParser.expression();
+		List result = expression.result;
+		Expression holder = (Expression) result.get(0);
+		assertEquals("aa{b}}a", holder.getExpression());
+		assertEquals("\\ a}b{c", result.get(1));
+	}
+}
Deleted: branches/refactor1/framework/test/src/test/java/org/richfaces/renderkit/TemplateUtilTest.java
===================================================================
--- branches/refactor1/framework/test/src/test/java/org/richfaces/renderkit/TemplateUtilTest.java	2007-06-29 19:07:21 UTC (rev 1421)
+++ branches/refactor1/framework/test/src/test/java/org/richfaces/renderkit/TemplateUtilTest.java	2007-06-29 19:32:26 UTC (rev 1422)
@@ -1,70 +0,0 @@
-/**
- * License Agreement.
- *
- *  JBoss RichFaces 3.0 - Ajax4jsf Component Library
- *
- * Copyright (C) 2007  Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- */
-
-package org.richfaces.renderkit;
-
-import java.io.IOException;
-import java.util.List;
-
-import junit.framework.TestCase;
-
-import org.antlr.runtime.ANTLRStringStream;
-import org.antlr.runtime.CommonTokenStream;
-import org.antlr.runtime.tree.Tree;
-import org.richfaces.RichMacroDefinitionLexer;
-import org.richfaces.RichMacroDefinitionParser;
-import org.richfaces.RichMacroDefinitionParser.expression_return;
-
-/**
- * @author Nick Belaevski - mailto:nbelaevski@exadel.com
- * created 17.06.2007
- *
- */
-public class TemplateUtilTest extends TestCase {
-
-	private String doWrite(String in) throws IOException {
-		return in;
-	}
-
-	private void printTree(Tree tree, int indent) {
-		int childCount = tree.getChildCount();
-		for (int i = 0; i < indent; i++) {
-			System.out.print('\t');
-			System.out.print(tree.getText() + " : " + tree.getType());
-			System.out.println();
-		}
-		for (int j = 1; j < childCount; j++) {
-			printTree(tree.getChild(j), ++indent);
-		}
-	}
-
-
-	public void testAntlr() throws Exception {
-		ANTLRStringStream stream = new ANTLRStringStream("{aa{b\\}}a}\\\\ a\\}b\\{c");
-		RichMacroDefinitionLexer lexer = new RichMacroDefinitionLexer(stream);
-		RichMacroDefinitionParser macroParser = new RichMacroDefinitionParser(new CommonTokenStream(lexer));
-		expression_return expression = macroParser.expression();
-		List result = expression.result;
-		Expression holder = (Expression) result.get(0);
-		assertEquals("aa{b}}a", holder.getExpression());
-		assertEquals("\\ a}b{c", result.get(1));
-	}
-}
Copied: branches/refactor1/ui/core/src/test/java/org/ajax4jsf/ajax/ActionListenerTest.java (from rev 1395, branches/refactor1/framework/test/src/test/java/org/ajax4jsf/ajax/ActionListenerTest.java)
===================================================================
--- branches/refactor1/ui/core/src/test/java/org/ajax4jsf/ajax/ActionListenerTest.java	                        (rev 0)
+++ branches/refactor1/ui/core/src/test/java/org/ajax4jsf/ajax/ActionListenerTest.java	2007-06-29 19:32:26 UTC (rev 1422)
@@ -0,0 +1,154 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.ajax;
+
+import java.io.Serializable;
+
+import javax.faces.component.UICommand;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
+import javax.faces.convert.IntegerConverter;
+import javax.faces.event.ActionEvent;
+
+import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+
+import junit.framework.TestCase;
+
+/**
+ * @author shura
+ *
+ */
+public class ActionListenerTest extends AbstractAjax4JsfTestCase {
+
+	/**
+	 * @param name
+	 */
+	public ActionListenerTest(String name) {
+		super(name);
+	}
+
+	/* (non-Javadoc)
+	 * @see junit.framework.TestCase#setUp()
+	 */
+	public void setUp() throws Exception {
+		super.setUp();
+	}
+
+	/* (non-Javadoc)
+	 * @see junit.framework.TestCase#tearDown()
+	 */
+	public void tearDown() throws Exception {
+		super.tearDown();
+	}
+
+	/**
+	 * Test method for {@link org.ajax4jsf.ajax.UIActionParameter#getValue()}.
+	 */
+	public void testGetValue() {
+		Bean bean = new Bean();
+		bean.setFirst(1);
+		bean.setSecond(2.0);
+		UIActionParameter param = new UIActionParameter();
+		param.setConverter(new TestConverter());
+		param.setValue(bean);
+		assertEquals("1;2.0", param.getValue());
+	}
+	
+	public void testGetIntValue() throws Exception {
+		UIActionParameter param = new UIActionParameter();
+		application.addConverter(Integer.class, IntegerConverter.class.getName());
+		param.setValue(new Integer(1));
+		assertEquals("1", param.getValue());		
+	}
+	
+	static class TestConverter implements Converter {
+
+		/* (non-Javadoc)
+		 * @see javax.faces.convert.Converter#getAsObject(javax.faces.context.FacesContext, javax.faces.component.UIComponent, java.lang.String)
+		 */
+		public Object getAsObject(FacesContext context, UIComponent comp, String str) {
+			Bean bean = new Bean();
+			String[] values = str.split(";");
+			bean.setFirst(Integer.parseInt(values[0]));
+			bean.setSecond(Double.parseDouble(values[1]));
+			return bean;
+		}
+
+		/* (non-Javadoc)
+		 * @see javax.faces.convert.Converter#getAsString(javax.faces.context.FacesContext, javax.faces.component.UIComponent, java.lang.Object)
+		 */
+		public String getAsString(FacesContext context, UIComponent comp, Object value) {
+			Bean bean = (Bean) value;
+			return String.valueOf(bean.getFirst())+";"+String.valueOf(bean.getSecond());
+		}
+		
+	}
+	
+	public static class Bean implements Serializable {
+		int _first;
+		double _second;
+		/**
+		 * @return the first
+		 */
+		public int getFirst() {
+			return this._first;
+		}
+		/**
+		 * @param first the first to set
+		 */
+		public void setFirst(int first) {
+			this._first = first;
+		}
+		/**
+		 * @return the second
+		 */
+		public double getSecond() {
+			return this._second;
+		}
+		/**
+		 * @param second the second to set
+		 */
+		public void setSecond(double second) {
+			this._second = second;
+		}
+	}
+
+	/**
+	 * Test method for {@link org.ajax4jsf.ajax.UIActionParameter#processAction(javax.faces.event.ActionEvent)}.
+	 */
+	public void testProcessAction() {
+		UICommand command = new UICommand();
+		UIActionParameter param = new UIActionParameter();
+		param.setConverter(new IntegerConverter());
+		param.setName("param");
+		param.setAssignToBinding(application.createValueBinding("#{bean.first}"));
+		Bean bean = new Bean();
+		request.setAttribute("bean", bean);
+		request.addParameter("param", "123");
+		externalContext.getRequestParameterMap().put("param", "123");
+		command.addActionListener(param);
+		command.broadcast(new ActionEvent(command));
+		assertEquals(123, bean.getFirst());
+	}
+
+}
Copied: branches/refactor1/ui/core/src/test/java/org/ajax4jsf/ajax/RepeatTestCase.java (from rev 1395, branches/refactor1/framework/test/src/test/java/org/ajax4jsf/ajax/repeat/RepeatTestCase.java)
===================================================================
--- branches/refactor1/ui/core/src/test/java/org/ajax4jsf/ajax/RepeatTestCase.java	                        (rev 0)
+++ branches/refactor1/ui/core/src/test/java/org/ajax4jsf/ajax/RepeatTestCase.java	2007-06-29 19:32:26 UTC (rev 1422)
@@ -0,0 +1,247 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.ajax.repeat;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.Map;
+
+import javax.faces.component.UIColumn;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIData;
+import javax.faces.component.UIInput;
+import javax.faces.context.FacesContext;
+
+import org.ajax4jsf.renderkit.html.RepeatRenderer;
+import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+import org.ajax4jsf.tests.MockDataModel;
+import org.ajax4jsf.tests.MockUIInputRenderer;
+
+/**
+ * @author shura
+ *
+ */
+public class RepeatTestCase extends AbstractAjax4JsfTestCase {
+
+	private UIRepeat repeater;
+	
+	private UIInput child;
+	
+	private int childInvoked;
+	
+	private UIInput facetChild;
+	
+	private int facetInvoked;
+
+	private UIInput childChild;
+	
+	private int childChildInvoked;
+
+	private UIInput childChildFacet;
+	
+	private int childChildFacetInvoked;
+
+	private UIRepeat enclosedRepeater;
+	/**
+	 * @param name
+	 */
+	public RepeatTestCase(String name) {
+		super(name);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.tests.AbstractAjax4JsfTestCase#setUp()
+	 */
+	public void setUp() throws Exception {
+		super.setUp();
+		// Create mock DataAdaptor and childs.
+		repeater = new UIRepeat();
+		child = new UIInput(){
+			public void processDecodes(FacesContext context) {
+				childInvoked++;
+				super.processDecodes(context);
+			}
+		};
+		childInvoked = 0;
+		child.setId("child");
+		repeater.getChildren().add(child);
+		facetChild = new UIInput(){
+			public void processDecodes(FacesContext context) {
+				facetInvoked++;
+				super.processDecodes(context);
+			}
+		};
+		facetInvoked = 0;
+		facetChild.setId("facetChild");
+		repeater.getFacets().put("facet", facetChild);
+		childChild = new UIInput(){
+			public void processDecodes(FacesContext context) {
+				childChildInvoked++;
+				super.processDecodes(context);
+			}
+		};;
+		childChildInvoked = 0;
+		childChild.setId("childChild");
+		child.getChildren().add(childChild);
+		childChildFacet = new UIInput(){
+			public void processDecodes(FacesContext context) {
+				childChildFacetInvoked++;
+				super.processDecodes(context);
+			}
+		};;
+		childChildFacetInvoked = 0;
+		childChildFacet.setId("childChildFacet");
+		childChild.getFacets().put("facet", childChildFacet);
+		enclosedRepeater = new UIRepeat();
+		renderKit.addRenderer(child.getFamily(), child.getRendererType(), new MockUIInputRenderer(){
+			public void decode(FacesContext context, UIComponent component) {
+				super.decode(context, component);
+				UIInput input = (UIInput) component;
+				String submittedValie = enclosedRepeater.getRowKey()+":"+repeater.getRowKey();
+				input.setSubmittedValue(submittedValie);
+				System.out.println("decode component "+component.getClientId(facesContext)+" with value "+submittedValie);
+			}
+		});
+		renderKit.addRenderer(repeater.getFamily(), repeater.getRendererType(), new RepeatRenderer());
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.tests.AbstractAjax4JsfTestCase#tearDown()
+	 */
+	public void tearDown() throws Exception {
+		super.tearDown();
+		repeater = null;
+		child = null;
+		childChild = null;
+		childChildFacet = null;
+		facetChild = null;
+		enclosedRepeater = null;
+	}
+
+
+	private void createDataTree(){
+		enclosedRepeater.setId("data");
+		repeater.setId("adaptor");
+		repeater.setVar("row");
+		ArrayList value = new ArrayList(2);
+		value.add("first");
+		value.add("second");
+		enclosedRepeater.setValue(value);
+		enclosedRepeater.setVar("var");
+		UIColumn column = new UIColumn();
+		enclosedRepeater.getChildren().add(column);
+		column.getChildren().add(repeater);
+		facesContext.getViewRoot().getChildren().add(enclosedRepeater);
+	}
+	
+	private void printChildMap(Map childrenState){
+		System.out.println("{");
+		for (Iterator iter = childrenState.keySet().iterator(); iter.hasNext();) {
+			Object key = iter.next();
+			System.out.println(" "+key+" : "+childrenState.get(key));
+		}
+		System.out.println("}");
+	}
+	/**
+	 * Test method for {@link javax.faces.component.UIData#processDecodes(javax.faces.context.FacesContext)}.
+	 */
+	public void testProcessDecodesFacesContext() {
+		createDataTree();
+		repeater.setValue(new MockDataModel());
+//		enclosedRepeater.setValue(new MockDataModel());
+		enclosedRepeater.processDecodes(facesContext);
+		enclosedRepeater.setRowIndex(1);
+		repeater.setRowIndex(1);
+		System.out.println("Saved child state for external repeater ");
+		printChildMap(enclosedRepeater.getChildState(facesContext));
+		System.out.println("Saved child state" );
+		printChildMap(repeater.getChildState(facesContext));
+		assertEquals("1:1", child.getSubmittedValue());
+	}
+
+	/**
+	 * Test method for {@link javax.faces.component.UIData#processUpdates(javax.faces.context.FacesContext)}.
+	 */
+	public void testProcessUpdatesFacesContext() {
+		createDataTree();
+		repeater.setValue(new MockDataModel());
+//		enclosedRepeater.setValue(new MockDataModel());
+		enclosedRepeater.processDecodes(facesContext);
+		enclosedRepeater.processValidators(facesContext);
+		enclosedRepeater.processUpdates(facesContext);
+		enclosedRepeater.setRowIndex(1);
+		repeater.setRowIndex(1);		
+		assertEquals("1:1", child.getValue());
+		enclosedRepeater.setRowIndex(0);
+		repeater.setRowIndex(2);		
+		assertEquals("0:2", child.getValue());
+	}
+
+	/**
+	 * Test method for {@link javax.faces.component.UIData#processUpdates(javax.faces.context.FacesContext)}.
+	 */
+	public void testProcessValidatorsFacesContext() {
+		createDataTree();
+		repeater.setValue(new MockDataModel());
+//		enclosedRepeater.setValue(new MockDataModel());
+		enclosedRepeater.processDecodes(facesContext);
+		enclosedRepeater.processValidators(facesContext);
+		enclosedRepeater.setRowIndex(1);
+		repeater.setRowIndex(1);		
+		assertEquals("1:1", child.getLocalValue());
+		enclosedRepeater.setRowIndex(0);
+		repeater.setRowIndex(2);		
+		assertEquals("0:2", child.getLocalValue());
+	}
+	
+	public void testSetRowIndex() throws Exception {
+		createDataTree();
+		repeater.setValue(new MockDataModel());
+		enclosedRepeater.setRowIndex(1);
+		repeater.setRowIndex(1);
+		child.setValue("1:1");
+		repeater.setRowIndex(-1);
+		enclosedRepeater.setRowIndex(-1);
+		// -----------------------------
+		enclosedRepeater.setRowIndex(0);
+		repeater.setRowIndex(2);
+		child.setValue("0:2");
+		// -----------------------------
+		repeater.setRowIndex(-1);
+		enclosedRepeater.setRowIndex(-1);
+		System.out.println("Saved child state for external repeater ");
+		printChildMap(enclosedRepeater.getChildState(facesContext));
+		System.out.println("Saved child state" );
+		printChildMap(repeater.getChildState(facesContext));
+		// -----------------------------
+		enclosedRepeater.setRowIndex(1);
+		repeater.setRowIndex(1);		
+		assertEquals("1:1", child.getValue());
+		repeater.setRowIndex(-1);
+		enclosedRepeater.setRowIndex(-1);
+		// -----------------------------
+		enclosedRepeater.setRowIndex(0);
+		repeater.setRowIndex(2);		
+		assertEquals("0:2", child.getValue());
+		
+	}
+}
                                
                         
                        
                                
                                18 years, 4 months
                        
                        
                 
         
 
        
            
        
        
        
                
                        
                                
                                
                                        
                                
                         
                        
                                
                                
                                        
                                                
                                        
                                        
                                        JBoss Rich Faces SVN: r1421 - in trunk/sandbox/scrollable-grid/src/main: resources/org/richfaces/renderkit/html/css and 1 other directories.
                                
                                
                                
                                    
                                        by richfaces-svn-commits@lists.jboss.org
                                    
                                
                                
                                        Author: konstantin.mishin
Date: 2007-06-29 15:07:21 -0400 (Fri, 29 Jun 2007)
New Revision: 1421
Modified:
   trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridHeader.js
   trunk/sandbox/scrollable-grid/src/main/resources/org/richfaces/renderkit/html/css/grid.xcss
   trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid.jspx
Log:
RF-368
Modified: trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridHeader.js
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridHeader.js	2007-06-29 18:37:12 UTC (rev 1420)
+++ trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridHeader.js	2007-06-29 19:07:21 UTC (rev 1421)
@@ -392,12 +392,9 @@
 		}
 	},
 	_createSplitter: function() {
-		this.columnSplitter = new ClientUI.common.box.Box(null, this.grid.getElement());
+		this.columnSplitter = new ClientUI.common.box.Box(this.grid.getElement().id +":cs", this.grid.getElement());
 		this.columnSplitter.makeAbsolute();
-		this.columnSplitter.getElement().addClassName("ClientUI_Grid_HSplit");
 		this.columnSplitter.setWidth(10);
-		this.columnSplitter.getElement().setStyle({backgroundColor: ''});
-		this.columnSplitter.getElement().setStyle({zIndex: '100'});
 		this.columnSplitter.hide();
 	},
 	adjustScrollPosition: function(pos) {
Modified: trunk/sandbox/scrollable-grid/src/main/resources/org/richfaces/renderkit/html/css/grid.xcss
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/resources/org/richfaces/renderkit/html/css/grid.xcss	2007-06-29 18:37:12 UTC (rev 1420)
+++ trunk/sandbox/scrollable-grid/src/main/resources/org/richfaces/renderkit/html/css/grid.xcss	2007-06-29 19:07:21 UTC (rev 1421)
@@ -129,9 +129,8 @@
 .ClientUI_Grid_HSplit {
 	width:1px;
 	border-right:1px dashed #6593cf;
-	background:none;
 	cursor: col-resize;
-	z-index: 70;
+	z-index: 100;
 }
 
 /**
Modified: trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid.jspx
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid.jspx	2007-06-29 18:37:12 UTC (rev 1420)
+++ trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid.jspx	2007-06-29 19:07:21 UTC (rev 1421)
@@ -28,7 +28,7 @@
 	
 	
 	<div id="#{clientId}" style="width: #{component.attributes['width']};height: #{component.attributes['height']};" class="ClientUI_Grid  #{component.attributes['styleClass']}" >
-
+		<div id="#{clientId}:cs" class="ClientUI_Grid_HSplit" />
 		<div id="#{clientId}_GridHeaderTemplate" class="ClientUI_InlineBox" style="width: #{component.attributes['width']};">
 			<div style="display: block; left: 0px; top: 0px; width: #{sumWidth}px;">			
 					<span class="ClientUI_TmplBox ClientUI_FrozenBox" id="#{clientId}:header:FrozenBox">
                                
                         
                        
                                
                                18 years, 4 months
                        
                        
                 
         
 
        
            
        
        
        
                
                        
                                
                                
                                        
                                
                         
                        
                                
                                
                                        
                                                
                                        
                                        
                                        JBoss Rich Faces SVN: r1420 - in trunk/sandbox/scrollable-grid/src/main: templates/org/richfaces and 1 other directory.
                                
                                
                                
                                    
                                        by richfaces-svn-commits@lists.jboss.org
                                    
                                
                                
                                        Author: dmorozov
Date: 2007-06-29 14:37:12 -0400 (Fri, 29 Jun 2007)
New Revision: 1420
Modified:
   trunk/sandbox/scrollable-grid/src/main/resources/org/richfaces/renderkit/html/css/grid.xcss
   trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-cell.jspx
Log:
Remove unnecessary div element
Modified: trunk/sandbox/scrollable-grid/src/main/resources/org/richfaces/renderkit/html/css/grid.xcss
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/resources/org/richfaces/renderkit/html/css/grid.xcss	2007-06-29 18:13:40 UTC (rev 1419)
+++ trunk/sandbox/scrollable-grid/src/main/resources/org/richfaces/renderkit/html/css/grid.xcss	2007-06-29 18:37:12 UTC (rev 1420)
@@ -308,18 +308,13 @@
 .ClientUI_Grid_BCBody {
 	cursor: default;
 	font: normal 8pt arial;
-	padding: 3px 5px;
-	white-space: nowrap;
-}
-.ClientUI_Grid_BCBody1 {
-	cursor: default;
-	font: normal 8pt arial;
+	white-space: nowrap;	
 	padding: 0px 0px;
-	white-space: nowrap;
  	position: relative;
 	display: block;
-	overflow: hidden;		
+	overflow: hidden;
 	width: 100%;
+	height: 16px;
 }
 
 /** 
Modified: trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-cell.jspx
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-cell.jspx	2007-06-29 18:13:40 UTC (rev 1419)
+++ trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-cell.jspx	2007-06-29 18:37:12 UTC (rev 1420)
@@ -12,10 +12,8 @@
 	>
 	
 	<td class="ClientUI_Grid_BC Idg-column-cell #{columnClass} #{component.attributes['styleClass']}" id="#{client_id}:c_#{cell_id}">
-		<div id="#{client_id}:bc_#{cell_index}" class="ClientUI_Grid_BCBody1">
-			<div class="ClientUI_Grid_BCBody" id="#{client_id}:bc_#{cell_id}">
-				<vcp:body/>
-			</div>
+		<div id="#{client_id}:bc_#{cell_id}" class="ClientUI_Grid_BCBody">
+			<vcp:body/>
 		</div>
 	</td>
 
                                
                         
                        
                                
                                18 years, 4 months