[JBoss Seam] - End conversation and h:message
by DiegoCoronel
Hi, im trying to show a message in my xhtml.
| <?xml version="1.0" encoding="ISO-8859-1"?>
| <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
| "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
| <ui:composition xmlns="http://www.w3.org/1999/xhtml"
| xmlns:s="http://jboss.com/products/seam/taglib"
| xmlns:ui="http://java.sun.com/jsf/facelets"
| xmlns:f="http://java.sun.com/jsf/core"
| xmlns:h="http://java.sun.com/jsf/html"
| xmlns:rich="http://richfaces.org/rich"
| xmlns:a4j="http://richfaces.org/a4j"
| xmlns:fpf="http://www.fpf.br/jsf"
| template="/layout/layout.xhtml">
| <ui:define name="content">
| <h:form>
| <fpf:titlePanel title="#{msgCadastroFornecedores.INCLUSAO}" />
| <a4j:outputPanel id="msg">
| <fpf:messages />
| </a4j:outputPanel>
| <s:validateAll>
| <!-- FIELDS -->
| <fpf:input id="nomeFantasia" required="true" fieldName="#{msgCadastroFornecedores.TX_NOME_FANTASIA}" entity="#{cadastroFornecedoresBean.fornecedor.txNomeFantasia}" size="50" />
| <fpf:input id="razaoSocial" required="true" fieldName="#{msgCadastroFornecedores.TX_RAZAO_SOCIAL}" entity="#{cadastroFornecedoresBean.fornecedor.txRazaoSocial}" size="50" />
| <fpf:input id="telefone" fieldName="#{msgCadastroFornecedores.TX_TELEFONE}" entity="#{cadastroFornecedoresBean.fornecedor.txTelefones}" size="50" />
| <fpf:input id="fax" fieldName="#{msgCadastroFornecedores.TX_FAX}" entity="#{cadastroFornecedoresBean.fornecedor.txFax}" size="50" />
| <fpf:input id="mail" fieldName="#{msgCadastroFornecedores.TX_EMAIL}" entity="#{cadastroFornecedoresBean.fornecedor.txEmail}" size="50" />
| <fpf:input id="endereco" fieldName="#{msgCadastroFornecedores.TX_ENDERECO}" entity="#{cadastroFornecedoresBean.fornecedor.txEndereco}" size="50" />
| <fpf:input id="pessoaContato" fieldName="#{msgCadastroFornecedores.TX_CONTATO}" entity="#{cadastroFornecedoresBean.fornecedor.txPessoaContato}" size="50" />
| <fpf:input id="observacao" fieldName="#{msgCadastroFornecedores.TX_OBSERVACAO}" entity="#{cadastroFornecedoresBean.fornecedor.txObservacao}" size="50" />
| </s:validateAll>
| <rich:spacer height="5px" />
|
| <!-- BUTTONS -->
| <table>
| <tr>
| <td>
| <a4j:commandLink action="#{cadastroFornecedoresBean.save}" reRender="msg" styleClass="commandLinkStyle">
| <fpf:button id="searchButton" labelButton="#{msg.BT_SALVAR}"/>
| </a4j:commandLink>
| </td>
| <td>
| <h:commandLink action="#{cadastroFornecedoresBean.actionCancel}" immediate="true" styleClass="commandLinkStyle" >
| <fpf:button id="cancelButton" labelButton="#{msg.BT_CANCELAR}"/>
| </h:commandLink>
| </td>
| </tr>
| </table>
|
| </h:form>
| </ui:define>
| </ui:composition>
|
|
my managedBean, just essential
| @Name("cadastroFornecedoresBean")
| @Scope(ScopeType.CONVERSATION)
| public class CadastroFornecedoresBean {
|
| /**
| * Chamada da classe para auxiliar nas mensagens de comfirmação e erro.
| */
| @In
| private FacesMessages facesMessages;
|
| public String merge() {
| almoxarifadoFacade.mergeFornecedor(fornecedor);
| facesMessages.addFromResourceBundle(FacesMessage.SEVERITY_INFO, "#{msg.SUCESSO}");
| return "sucesso";
| }
|
| .
| .
| .
|
my page xml:
| <?xml version="1.0" encoding="UTF-8"?>
| <page xmlns="http://jboss.com/products/seam/pages"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xmlns:s="http://jboss.com/products/seam/taglib"
| xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.0.xsd"
| login-required="false">
|
| <navigation from-action="#{cadastroFornecedoresBean.merge}">
| <rule if-outcome="sucesso">
| <end-conversation before-redirect="true"/>
| <redirect view-id="/face/almoxarifado/cadastro_fornecedores/pesquisar.seam">
| <message severity="INFO">Operacao com Sucesso</message>
| </redirect>
|
| </rule>
| </navigation>
|
| <navigation from-action="#{cadastroFornecedoresBean.actionCancel}">
| <rule if-outcome="cancel">
| <redirect view-id="/face/almoxarifado/cadastro_fornecedores/pesquisar.seam"/>
| </rule>
| </navigation>
|
| </page>
|
and the code in my xhtml i want the message show
| <h:messages globalOnly="true" fatalClass="faltalMessage"
| errorClass="errorMessage" warnClass="warningMessage" infoClass="infoMessage" id="generalMessages" />
|
my problem is the message not showing.. anyone can help me ?
ty, and sry about english
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4114415#4114415
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4114415
18 years, 4 months
[Installation, Configuration & DEPLOYMENT] - Startup hangs on Log4jService$URLWatchTimerTask
by tresspicher
Hi all,
When I start up my server, it gets this far:
| =========================================================================
|
| JBoss Bootstrap Environment
|
| JBOSS_HOME: /usr/local/jboss-4.2.0.GA
|
| JAVA: /usr/java/bin/java
|
| JAVA_OPTS: -Dprogram.name=run.sh -server -Xms128m -Xmx512m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000
|
| CLASSPATH: /usr/local/jboss-4.2.0.GA/bin/run.jar:/usr/java/lib/tools.jar
|
| =========================================================================
|
| 14:34:48,797 INFO [Server] Starting JBoss (MX MicroKernel)...
| 14:34:48,800 INFO [Server] Release ID: JBoss [Trinity] 4.2.0.GA (build: SVNTag=JBoss_4_2_0_GA date=200705111440)
| 14:34:48,803 INFO [Server] Home Dir: /usr/local/jboss-4.2.0.GA
| 14:34:48,804 INFO [Server] Home URL: file:/usr/local/jboss-4.2.0.GA/
| 14:34:48,806 INFO [Server] Patch URL: null
| 14:34:48,807 INFO [Server] Server Name: default
| 14:34:48,808 INFO [Server] Server Home Dir: /usr/local/jboss-4.2.0.GA/server/default
| 14:34:48,808 INFO [Server] Server Home URL: file:/usr/local/jboss-4.2.0.GA/server/default/
| 14:34:48,809 INFO [Server] Server Log Dir: /usr/local/jboss-4.2.0.GA/server/default/log
| 14:34:48,810 INFO [Server] Server Temp Dir: /usr/local/jboss-4.2.0.GA/server/default/tmp
| 14:34:48,811 INFO [Server] Root Deployment Filename: jboss-service.xml
| 14:34:49,849 INFO [ServerInfo] Java version: 1.5.0_12,Sun Microsystems Inc.
| 14:34:49,850 INFO [ServerInfo] Java VM: Java HotSpot(TM) Server VM 1.5.0_12-b04,Sun Microsystems Inc.
| 14:34:49,851 INFO [ServerInfo] OS-System: SunOS 5.8,sparc
| 14:34:51,912 INFO [Server] Core system initialized
| 14:35:02,530 INFO [WebService] Using RMI server codebase: http://127.0.0.1:8083/
| 14:35:02,537 INFO [Log4jService$URLWatchTimerTask] Configuring from URL: resource:jboss-log4j.xml
|
... but then it hangs indefinitely. I turned on Log4j debug logging, and it tells me this:
| 14:39:27,537 INFO [Log4jService$URLWatchTimerTask] Configuring from URL: resource:jboss-log4j.xml
| log4j: System property is :null
| log4j: Standard DocumentBuilderFactory search succeded.
| log4j: DocumentBuilderFactory is: org.apache.xerces.jaxp.DocumentBuilderFactoryImpl
| log4j: debug attribute= "false".
|
When I remove the jboss-log4j.xml file from the conf directory, the server starts but then (predictably) periodically throws a warning at me:
| 14:58:27,370 WARN [Log4jService$URLWatchTimerTask] Failed to check URL: resource:jboss-log4j.xml
| java.io.FileNotFoundException: Could not locate resource: jboss-log4j.xml
|
I'm sure I'm doing something wrong that's obvious, but please help a newbie out!
Thanks,
Tres
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4114408#4114408
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4114408
18 years, 4 months