// Path: src/java/com/idega/documentmanager/business/component/Button.java
// public interface Button extends Component {
// 
// 	public abstract PropertiesButton getProperties();
// }
// 
// Path: src/java/com/idega/documentmanager/business/component/properties/PropertiesButton.java
// public interface PropertiesButton extends PropertiesComponent {
// 	
// 	public abstract String getReferAction();
// 		
// 	public abstract void setReferAction(String referAction);
// }
// 
// Path: src/java/com/idega/documentmanager/component/FormComponentButton.java
// public interface FormComponentButton extends FormComponent {
// 
// 	public abstract void setSiblingsAndParentPages(FormComponentPage previous, FormComponentPage next);
// 	
// 	public abstract void setLastPageId(String last_page_id);
// }
// 
// Path: src/java/com/idega/documentmanager/component/FormComponentButtonArea.java
// public interface FormComponentButtonArea extends FormComponentContainer {
// 
// 	public abstract void setButtonMapping(String button_type, String button_id);
// 	
// 	public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next);
// 	
// 	public abstract FormComponentPage getPreviousPage();
// 	
// 	public abstract FormComponentPage getNextPage();
// 	
// 	public abstract FormComponentPage getCurrentPage();
// 	
// 	public abstract void announceLastPage(String last_page_id);
// }
// 
// Path: src/java/com/idega/documentmanager/component/FormComponentPage.java
// public interface FormComponentPage extends FormComponentContainer {
// 
// 	public abstract void setButtonAreaComponentId(String button_area_id);
// 	
// 	public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next);
// 	
// 	public abstract void pagesSiblingsChanged();
// 	
// 	public abstract FormComponentPage getPreviousPage();
// 	
// 	public abstract FormComponentPage getNextPage();
// 	
// 	public abstract void announceLastPage(String last_page_id);
// 	
// 	public abstract ButtonArea getButtonArea();
// }
// 
// Path: src/java/com/idega/documentmanager/component/properties/impl/ComponentPropertiesButton.java
// public class ComponentPropertiesButton extends ComponentProperties implements PropertiesButton {
// 	
// 	private String referAction;
// 	
// 	public String getReferAction() {
// 		return referAction;
// 	}
// 	public void setReferAction(String referAction) {
// 		setReferActionPlain(referAction);
// 		component.update(ConstUpdateType.BUTTON_REFER_TO_ACTION);
// 	}
// 	public void setReferActionPlain(String referAction) {
// 		this.referAction = CoreConstants.EMPTY.equals(referAction) ? null : referAction;
// 	}
// }
// 
// Path: src/java/com/idega/documentmanager/manager/XFormsManagerButton.java
// public interface XFormsManagerButton extends XFormsManager {
// 	
// 	public abstract void renewButtonPageContextPages(FormComponent component, FormComponentPage previous, FormComponentPage next);
// 	
// 	public abstract void setLastPageToSubmitButton(FormComponent component, String last_page_id);
// 	
// 	public abstract String getReferAction(FormComponent component);
// 	
// 	public abstract boolean isSubmitButton(FormComponent component);
// }


import com.idega.documentmanager.business.component.Button;
import com.idega.documentmanager.business.component.properties.PropertiesButton;
import com.idega.documentmanager.component.FormComponentButton;
import com.idega.documentmanager.component.FormComponentButtonArea;
import com.idega.documentmanager.component.FormComponentPage;
import com.idega.documentmanager.component.properties.impl.ComponentPropertiesButton;
import com.idega.documentmanager.manager.XFormsManagerButton;
package com.idega.documentmanager.component.impl;


/**
 * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a>
 * @version $Revision: 1.10 $
 *
 * Last modified: $Date: 2008/10/26 16:47:10 $ by $Author: anton $
 */
public class FormComponentButtonImpl extends FormComponentImpl implements Button, FormComponentButton {
	
	@Override
	public XFormsManagerButton getXFormsManager() {
		return getContext().getXformsManagerFactory().getXformsManagerButton();
	}
	
	@Override
	public void render() {
		boolean load = this.load;
		super.render();
		FormComponentButtonArea buttonArea = (FormComponentButtonArea)parent;
// Path: src/java/com/idega/documentmanager/business/component/Button.java
// public interface Button extends Component {
// 
// 	public abstract PropertiesButton getProperties();
// }
// 
// Path: src/java/com/idega/documentmanager/business/component/properties/PropertiesButton.java
// public interface PropertiesButton extends PropertiesComponent {
// 	
// 	public abstract String getReferAction();
// 		
// 	public abstract void setReferAction(String referAction);
// }
// 
// Path: src/java/com/idega/documentmanager/component/FormComponentButton.java
// public interface FormComponentButton extends FormComponent {
// 
// 	public abstract void setSiblingsAndParentPages(FormComponentPage previous, FormComponentPage next);
// 	
// 	public abstract void setLastPageId(String last_page_id);
// }
// 
// Path: src/java/com/idega/documentmanager/component/FormComponentButtonArea.java
// public interface FormComponentButtonArea extends FormComponentContainer {
// 
// 	public abstract void setButtonMapping(String button_type, String button_id);
// 	
// 	public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next);
// 	
// 	public abstract FormComponentPage getPreviousPage();
// 	
// 	public abstract FormComponentPage getNextPage();
// 	
// 	public abstract FormComponentPage getCurrentPage();
// 	
// 	public abstract void announceLastPage(String last_page_id);
// }
// 
// Path: src/java/com/idega/documentmanager/component/FormComponentPage.java
// public interface FormComponentPage extends FormComponentContainer {
// 
// 	public abstract void setButtonAreaComponentId(String button_area_id);
// 	
// 	public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next);
// 	
// 	public abstract void pagesSiblingsChanged();
// 	
// 	public abstract FormComponentPage getPreviousPage();
// 	
// 	public abstract FormComponentPage getNextPage();
// 	
// 	public abstract void announceLastPage(String last_page_id);
// 	
// 	public abstract ButtonArea getButtonArea();
// }
// 
// Path: src/java/com/idega/documentmanager/component/properties/impl/ComponentPropertiesButton.java
// public class ComponentPropertiesButton extends ComponentProperties implements PropertiesButton {
// 	
// 	private String referAction;
// 	
// 	public String getReferAction() {
// 		return referAction;
// 	}
// 	public void setReferAction(String referAction) {
// 		setReferActionPlain(referAction);
// 		component.update(ConstUpdateType.BUTTON_REFER_TO_ACTION);
// 	}
// 	public void setReferActionPlain(String referAction) {
// 		this.referAction = CoreConstants.EMPTY.equals(referAction) ? null : referAction;
// 	}
// }
// 
// Path: src/java/com/idega/documentmanager/manager/XFormsManagerButton.java
// public interface XFormsManagerButton extends XFormsManager {
// 	
// 	public abstract void renewButtonPageContextPages(FormComponent component, FormComponentPage previous, FormComponentPage next);
// 	
// 	public abstract void setLastPageToSubmitButton(FormComponent component, String last_page_id);
// 	
// 	public abstract String getReferAction(FormComponent component);
// 	
// 	public abstract boolean isSubmitButton(FormComponent component);
// }


// Path: src/java/com/idega/documentmanager/component/impl/FormComponentButtonImpl.java
import com.idega.documentmanager.business.component.Button;
import com.idega.documentmanager.business.component.properties.PropertiesButton;
import com.idega.documentmanager.component.FormComponentButton;
import com.idega.documentmanager.component.FormComponentButtonArea;
import com.idega.documentmanager.component.FormComponentPage;
import com.idega.documentmanager.component.properties.impl.ComponentPropertiesButton;
import com.idega.documentmanager.manager.XFormsManagerButton;

package com.idega.documentmanager.component.impl;


/**
 * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a>
 * @version $Revision: 1.10 $
 *
 * Last modified: $Date: 2008/10/26 16:47:10 $ by $Author: anton $
 */
public class FormComponentButtonImpl extends FormComponentImpl implements Button, FormComponentButton {
	
	@Override
	public XFormsManagerButton getXFormsManager() {
		return getContext().getXformsManagerFactory().getXformsManagerButton();
	}
	
	@Override
	public void render() {
		boolean load = this.load;
		super.render();
		FormComponentButtonArea buttonArea = (FormComponentButtonArea)parent;
		if(!load)