// Path: src/java/com/idega/formbuilder/util/FBUtil.java
// public class FBUtil {
// 	
// 	private FBUtil() { }
// 	
// 	public static String getPropertyString(String value) {
// 		return value == null ? FBConstants.NO_VALUE : value;
// 	}
// 	
// 	public static IWBundle getBundle(){
// 		return getBundle(FacesContext.getCurrentInstance());
// 	}
// 
// 	public static IWBundle getBundle(FacesContext context){
// 		return IWContext.getIWContext(context).getIWMainApplication().getBundle(IWBundleStarter.IW_BUNDLE_IDENTIFIER);
// 	}
// 	
// 	public static IWResourceBundle getResourceBundle(FacesContext context){
// 		return getBundle(context).getResourceBundle(context.getExternalContext().getRequestLocale());
// 	}
// 	
// 	public static IWResourceBundle getResourceBundle(){
// 		return getResourceBundle(FacesContext.getCurrentInstance());
// 	}
// 	
// 	public static String getResourceAbsolutePath(IWMainApplication iwma, String url) {
// 		IWBundle iwb = iwma.getBundle(IWBundleStarter.IW_BUNDLE_IDENTIFIER);
//         return iwb.getRealPathWithFileNameString(url);
// 	}
// 	
// 	/**
// 	 *
// 	 * @deprecated - use generateFormId from FormsService 
// 	 * 
// 	 */
// 	@Deprecated
// 	public static String generateFormId(String name) {
// 		
// 		String result = name+"-"+ new Date();
// 		return result.replace(' ', '_').replace(':', '_');
// 	}
// 	
// 	private static String webdav_server_url;
// 	
// 	public static String getWebdavServerUrl(FacesContext ctx) {
// 		
// 		if(webdav_server_url == null)
// 			webdav_server_url = new IWSlideServiceBean().getWebdavServerURL().toString();
// 		
// 		return webdav_server_url;
// 	}
// 
// 	public static Locale getUILocale() {
// 		Workspace workspace = (Workspace) WFUtil.getBeanInstance(Workspace.BEAN_ID);
// 		Locale locale = workspace.getLocale();
// 		if(locale == null) {
// 			locale = CoreUtil.getIWContext().getCurrentLocale();
// 		}
// 		return locale;
// 	}
// }


import com.idega.xformsmanager.business.component.ComponentMultiUpload;
import com.idega.xformsmanager.component.beans.LocalizedStringBean;
import com.idega.formbuilder.util.FBUtil;
package com.idega.formbuilder.presentation.beans;


public class FormMultiUploadComponent extends FormComponent {
	
	public FormMultiUploadComponent(ComponentMultiUpload component) {
		this.component = component;
	}

	public ComponentMultiUpload getComponent() {
		return (ComponentMultiUpload) component;
	}

	public void setComponent(ComponentMultiUpload component) {
		this.component = component;
	}
	
	public void setAddButtonLabel(String value) {
		LocalizedStringBean bean = getComponent().getProperties().getInsertButtonLabel();
		bean.setString(FBUtil.getUILocale(), value);
		getComponent().getProperties().setInsertButtonLabel(bean);
	}
	
	public void setRemoveButtonLabel(String value) {
		LocalizedStringBean bean = getComponent().getProperties().getRemoveButtonLabel();
// Path: src/java/com/idega/formbuilder/util/FBUtil.java
// public class FBUtil {
// 	
// 	private FBUtil() { }
// 	
// 	public static String getPropertyString(String value) {
// 		return value == null ? FBConstants.NO_VALUE : value;
// 	}
// 	
// 	public static IWBundle getBundle(){
// 		return getBundle(FacesContext.getCurrentInstance());
// 	}
// 
// 	public static IWBundle getBundle(FacesContext context){
// 		return IWContext.getIWContext(context).getIWMainApplication().getBundle(IWBundleStarter.IW_BUNDLE_IDENTIFIER);
// 	}
// 	
// 	public static IWResourceBundle getResourceBundle(FacesContext context){
// 		return getBundle(context).getResourceBundle(context.getExternalContext().getRequestLocale());
// 	}
// 	
// 	public static IWResourceBundle getResourceBundle(){
// 		return getResourceBundle(FacesContext.getCurrentInstance());
// 	}
// 	
// 	public static String getResourceAbsolutePath(IWMainApplication iwma, String url) {
// 		IWBundle iwb = iwma.getBundle(IWBundleStarter.IW_BUNDLE_IDENTIFIER);
//         return iwb.getRealPathWithFileNameString(url);
// 	}
// 	
// 	/**
// 	 *
// 	 * @deprecated - use generateFormId from FormsService 
// 	 * 
// 	 */
// 	@Deprecated
// 	public static String generateFormId(String name) {
// 		
// 		String result = name+"-"+ new Date();
// 		return result.replace(' ', '_').replace(':', '_');
// 	}
// 	
// 	private static String webdav_server_url;
// 	
// 	public static String getWebdavServerUrl(FacesContext ctx) {
// 		
// 		if(webdav_server_url == null)
// 			webdav_server_url = new IWSlideServiceBean().getWebdavServerURL().toString();
// 		
// 		return webdav_server_url;
// 	}
// 
// 	public static Locale getUILocale() {
// 		Workspace workspace = (Workspace) WFUtil.getBeanInstance(Workspace.BEAN_ID);
// 		Locale locale = workspace.getLocale();
// 		if(locale == null) {
// 			locale = CoreUtil.getIWContext().getCurrentLocale();
// 		}
// 		return locale;
// 	}
// }


// Path: src/java/com/idega/formbuilder/presentation/beans/FormMultiUploadComponent.java
import com.idega.xformsmanager.business.component.ComponentMultiUpload;
import com.idega.xformsmanager.component.beans.LocalizedStringBean;
import com.idega.formbuilder.util.FBUtil;

package com.idega.formbuilder.presentation.beans;


public class FormMultiUploadComponent extends FormComponent {
	
	public FormMultiUploadComponent(ComponentMultiUpload component) {
		this.component = component;
	}

	public ComponentMultiUpload getComponent() {
		return (ComponentMultiUpload) component;
	}

	public void setComponent(ComponentMultiUpload component) {
		this.component = component;
	}
	
	public void setAddButtonLabel(String value) {
		LocalizedStringBean bean = getComponent().getProperties().getInsertButtonLabel();
		bean.setString(FBUtil.getUILocale(), value);
		getComponent().getProperties().setInsertButtonLabel(bean);
	}
	
	public void setRemoveButtonLabel(String value) {
		LocalizedStringBean bean = getComponent().getProperties().getRemoveButtonLabel();
		bean.setString(FBUtil.getUILocale(), value);