<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;
}
}
Content from pre 2016 and from language groups that have been closed.
Content is read-only.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.