<h:form acceptcharset="UTF-8" id="form" >
<h:inputHidden value="#{MyBean.tam}" id="tam"/>
<h:dataTable id="contentList" value="#{MyBean.content}" binding="#{MyBean.dataTable}" var="r" width="100%" styleClass="recordSet"
rendered="#{not empty MyBean.content}">
<h:column>
<f:facet name="header">
<h:selectBooleanCheckbox id="checkCabecera" onclick="javascript:seleccionar(this.name);"/>
</f:facet>
<h:selectBooleanCheckbox id="checkboxes" value="#{MyBean.selectedIds[r.id]}" />
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="#{msg.observaciones}"/>
</f:facet>
<h:outputText value="#{r.observaciones}" />
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="#{msg.acciones}"/>
</f:facet>
<h:commandButton image="../images/delete.gif" onclick="enviar();" actionListener="#{MyBean.borrarPedido}" />
</h:column>
</h:dataTable>
</h:form>
public void borrarPedido(ActionEvent event){
HttpServletRequest req = (HttpServletRequest)FacesContext.getCurrentInstance().getExternalContext().getRequest();
AuthenticationDetails details = (AuthenticationDetails)req.getSession().getAttribute("authenticationDetails");
RepositoryServiceSoapBindingStub repositoryService = WebServiceClient.getRepositoryService(details);
Pedido pedido = (Pedido)getDataTable().getRowData();
Reference nodeRef = new Reference(STORE, pedido.getId(), pedido.getPath());
Predicate predicate = new Predicate(new Reference[]{nodeRef}, null, null);
CMLDelete delete = new CMLDelete(predicate);
CML cml = new CML();
cml.setDelete(new CMLDelete[]{delete});
try {
repositoryService.update(cml);
} catch (RepositoryFault e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (RemoteException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
// invoke some business logic here
}
<faces-config>
<application>
<locale-config>
<default-locale>es_ES</default-locale>
<supported-locale>es_ES</supported-locale>
</locale-config>
<message-bundle>messages</message-bundle>
<!– <message-bundle>errors</message-bundle>–>
</application>
<managed-bean>
<managed-bean-name>LoginBean</managed-bean-name>
<managed-bean-class>beans.LoginBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
<managed-bean>
<managed-bean-name>MyBean</managed-bean-name>
<managed-bean-class>beans.ContentBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
<navigation-rule>
<from-view-id>/jsp/login.jsp</from-view-id>
<navigation-case>
<from-outcome>fail</from-outcome>
<to-view-id>/jsp/login.jsp</to-view-id>
<redirect />
</navigation-case>
<navigation-case>
<from-outcome>logout</from-outcome>
<to-view-id>/jsp/login.jsp</to-view-id>
<redirect />
</navigation-case>
<navigation-case>
<from-outcome>success</from-outcome>
<to-view-id>/jsp/tareas.jsp</to-view-id>
</navigation-case>
</navigation-rule>
</faces-config>
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.