As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
<aspect name="dm:obsrvAspect"> <title>Observaciones</title> <properties> <property name="dm:observaciones"> <title>Observaciones</title> <type>d:text</type> </property> </properties> </aspect>
<managed-bean> <managed-bean-name>ModificarObservacionesDialog</managed-bean-name> <managed-bean-class>dialogs.ModificarObservacionesDialog</managed-bean-class> <managed-bean-scope>session</managed-bean-scope> <managed-property> <property-name>nodeService</property-name> <value>#{NodeService}</value> </managed-property> <managed-property> <property-name>browseBean</property-name> <value>#{BrowseBean}</value> </managed-property> </managed-bean>
<action id="modificar_observaciones"> <label>Modificar observaciones</label> <image>/images/icons/edit_icon.gif</image> <evaluator>evaluator.ModificarObservacionesEvaluator</evaluator> <action-listener>#{BrowseBean.setupSpaceAction}</action-listener> <action>dialog:observacionesDialog</action> <params> <param name="id">#{actionContext.id}</param> </params> </action>
<dialog name="observacionesDialog" page="/jsp/custom/modificarObservaciones.jsp" managed-bean="ModificarObservacionesDialog" icon="/images/icons/edit_large.gif"> </dialog>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %> <%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %> <%@ page buffer="32kb" contentType="text/html;charset=UTF-8" %> <script type="text/javascript"> function setFocus(){ document['dialog']['dialog:dialog-body:observaciones'].focus(); } </script> <f:verbatim> <body onload="setFocus();"> <table width="50%"> <tr> <td colspan="2" class="wizardSectionHeading"> </f:verbatim> <h:outputText value="#{msg.modificar_observaciones}" /> <f:verbatim> </td> </tr> <tr><td colspan="2"></td></tr> <tr> <td> </f:verbatim> <h:outputText value="#{msg.observaciones}:" /> <f:verbatim> </td> <td> </f:verbatim> <h:inputTextarea id="observaciones" value="#{DialogManager.bean.observaciones}" cols="50" rows="5"/> <f:verbatim> </td> </tr> <tr> <td></td> </tr> </table> </body> </f:verbatim>
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ import java.util.Map; import javax.faces.context.FacesContext; import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.service.namespace.QName; import org.alfresco.web.bean.dialog.BaseDialogBean; import utils.Constantes; public class ModificarObservacionesDialog extends BaseDialogBean{ private String observaciones = ""; private NodeRef nodeRef; @Override public void init(Map<String, String> parameters) { super.init(parameters); nodeRef = this.browseBean.getActionSpace().getNodeRef(); if(getNodeService().getProperty(nodeRef, Constantes.PROPERTY_OBSERVACIONES) != null){ observaciones = getNodeService().getProperty(nodeRef, Constantes.PROPERTY_OBSERVACIONES).toString(); } } @Override protected String finishImpl(FacesContext fc, String outcome) throws Throwable { nodeRef = this.browseBean.getActionSpace().getNodeRef(); getNodeService().setProperty(nodeRef, Constante.PROPERTY_OBSERVACIONES, observaciones); observaciones = ""; return outcome; } @Override public String cancel() { // TODO Auto-generated method stub observaciones = ""; return super.cancel(); } @Override public boolean getFinishButtonDisabled() { return false; } public String getObservaciones() { return observaciones; } /** * @param observaciones the observaciones to set */ public void setObservaciones(String observaciones) { this.observaciones = observaciones; } @Override public String getContainerTitle() { return "Modificar Observaciones"; } /** * @return the nodeRef */ public NodeRef getNodeRef() { return nodeRef; } /** * @param nodeRef the nodeRef to set */ public void setNodeRef(NodeRef nodeRef) { this.nodeRef = nodeRef; } }