<?xml version="1.0" encoding="ISO-8859-1"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Últimas mensagens do tópico "Jsf - navegação "]]></title>
		<link>http://www.guj.com.br/posts/list/6.java</link>
		<description><![CDATA[Últimas mensagens enviadas no tópico "Jsf - navegação "]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>Jsf - navegação </title>
				<description><![CDATA[ Galera sou iniciante em jsf e tenho uma duvida..... Minha jsp esta chamando um metodo da action ela executando belezinha mas ela nao muda de pagina .... eu gostaria que mostrasse o resultado em uma outra tela algem podeia me ajudar...<br /> <br /> meu metodo na action<br /> <br /> 	public String altera(){<br /> 		HttpServletRequest request=getRequest();<br /> 		ProdutoTeste pt = (ProdutoTeste)(request.getAttribute("produtoTeste"));<br /> 		//ProdutoTeste pt = new ProdutoTeste();<br /> 		//pt.setNome(nome);<br /> 		System.out.println("Item:"+pt.getCod()+" - "+pt.getNome()+"  gravado com sucesso !!! ");<br /> 		//request.setAttribute("produtoTeste",pt);<br /> 		return "result";<br /> 	}<br /> no faces config<br /> <br /> 	            &lt;/navigation-case&gt;<br /> 			&lt;navigation-case&gt;<br /> 			&lt;from-action&gt;#{produtoTesteAction.altera}&lt;/from-action&gt;<br /> 			&lt;from-outcome&gt;result&lt;/from-outcome&gt;<br /> 			&lt;to-view-id&gt;/funil/negocio/result.faces&lt;/to-view-id&gt;<br /> 		&lt;/navigation-case&gt;<br /> <br /> alguem poderia me ajudar ???]]></description>
				<guid isPermaLink="true">http://www.guj.com.br/prepost/110233/594669/jsf---navegacao-
</guid>
				<link>http://www.guj.com.br/prepost/110233/594669/jsf---navegacao-
</link>
				<pubDate><![CDATA[Wed, 19 Nov 2008 15:24:20]]> GMT</pubDate>
				<author><![CDATA[ Fredi]]></author>
			</item>
			<item>
				<title>Jsf - navegação </title>
				<description><![CDATA[ [code]<br /> &lt;navigation-rule&gt;<br />   &lt;from-view-id&gt;/priv/sgc/central/PublicacaoDOPageForm.jsp&lt;/from-view-id&gt;<br />     &lt;navigation-case&gt;<br /> 	&lt;from-outcome&gt;EditalPageForm&lt;/from-outcome&gt;<br />                 &lt;to-view-id&gt;/priv/sgc/central/EditalPageForm.jsp&lt;/to-view-id&gt;<br />    &lt;/navigation-case&gt;<br /> &lt;/navigation-rule&gt;[/code]<br /> <br /> Cara é o seguinte no [code]&lt;from-view-id&gt;[/code] vc está disendo de onde a ação  esta vindo<br /> caso vc queira que em qualquer lugar coloque *.<br /> <br /> no [code]&lt;from-outcome&gt;[/code] vc esta atribuindo um nome para esse redirect no caso eu utilizei "EditalPageForm"<br /> que quando utilizado vc irá ser direcionado para o [code]&lt;to-view-id&gt;/priv/sgc/central/EditalPageForm.jsp&lt;/to-view-id&gt;[/code]<br /> que é uma página minha<br /> <br /> espero q t ajude.<br /> ]]></description>
				<guid isPermaLink="true">http://www.guj.com.br/prepost/110233/594709/jsf---navegacao-
</guid>
				<link>http://www.guj.com.br/prepost/110233/594709/jsf---navegacao-
</link>
				<pubDate><![CDATA[Wed, 19 Nov 2008 16:03:43]]> GMT</pubDate>
				<author><![CDATA[ elugo]]></author>
			</item>
			<item>
				<title>Re:Jsf - navegação </title>
				<description><![CDATA[ Elugo fiz conforme vc me orientou <br /> <br /> 	&lt;navigation-rule&gt;<br /> 		&lt;from-view-id&gt;*&lt;/from-view-id&gt;<br /> 		&lt;navigation-case&gt;<br /> 			&lt;from-outcome&gt;result&lt;/from-outcome&gt;<br /> 			&lt;to-view-id&gt;/funil/negocio/result.faces&lt;/to-view-id&gt;  &lt;!-- Essa e a minha pagina que deveria abrir     --&gt;<br /> 		&lt;/navigation-case&gt;<br /> 	&lt;/navigation-rule&gt;	<br /> <br /> Mas agora quando eu chamo a ação ele chama a mesma pagina (test.faces), porem nao aparece nada..... a tela fica em branco]]></description>
				<guid isPermaLink="true">http://www.guj.com.br/prepost/110233/594742/rejsf---navegacao-
</guid>
				<link>http://www.guj.com.br/prepost/110233/594742/rejsf---navegacao-
</link>
				<pubDate><![CDATA[Wed, 19 Nov 2008 16:44:22]]> GMT</pubDate>
				<author><![CDATA[ Fredi]]></author>
			</item>
			<item>
				<title>Re:Jsf - navegação </title>
				<description><![CDATA[ cara posta seu arquivos completos aew,como tu mapeo no web.xml sua action que executa o metodo dai fica + facil de ajudar,e a pagina tbm.]]></description>
				<guid isPermaLink="true">http://www.guj.com.br/prepost/110233/594811/rejsf---navegacao-
</guid>
				<link>http://www.guj.com.br/prepost/110233/594811/rejsf---navegacao-
</link>
				<pubDate><![CDATA[Wed, 19 Nov 2008 19:29:11]]> GMT</pubDate>
				<author><![CDATA[ lgweb]]></author>
			</item>
			<item>
				<title>Re:Jsf - navegação </title>
				<description><![CDATA[ No web.xml so tem as conf....<br /> <br /> &lt;!-- ######## INDICA LOCAL DE CONFIGURAÇÃO DO Tiles ###########--&gt;    <br />   &lt;context-param&gt;<br />     &lt;param-name&gt;tiles-definitions&lt;/param-name&gt;<br />     &lt;param-value&gt;/WEB-INF/tiles-defs.xml&lt;/param-value&gt;<br />   &lt;/context-param&gt;<br /> <br /> &lt;!-- ######## CONFIGURÇÔES DO FACES ###########--&gt;    <br />   &lt;context-param&gt; <br /> 	&lt;param-name&gt;javax.faces.STATE_SAVING_METHOD&lt;/param-name&gt; <br /> 	&lt;param-value&gt;client&lt;/param-value&gt; <br />   &lt;/context-param&gt;<br /> <br />   &lt;context-param&gt;<br />   	&lt;param-name&gt;org.apache.myfaces.CHECK_EXTENSIONS_FILTER&lt;/param-name&gt;<br />   	&lt;param-value&gt;true&lt;/param-value&gt;<br />   &lt;/context-param&gt;<br />   <br />   &lt;context-param&gt;<br />   	&lt;param-name&gt;org.apache.myfaces.PRETTY_HTML&lt;/param-name&gt;<br />   	&lt;param-value&gt;true&lt;/param-value&gt;<br />   &lt;/context-param&gt;<br />   <br />   &lt;context-param&gt;<br />   	&lt;param-name&gt;org.apache.myfaces.ALLOW_JAVASCRIPT&lt;/param-name&gt;<br />   	&lt;param-value&gt;true&lt;/param-value&gt;<br />   &lt;/context-param&gt;<br />   <br />   &lt;context-param&gt;<br />   	&lt;param-name&gt;org.apache.myfaces.DETECT_JAVASCRIPT&lt;/param-name&gt;<br />   	&lt;param-value&gt;false&lt;/param-value&gt;<br />   &lt;/context-param&gt;<br />   <br />   &lt;context-param&gt;<br />   	&lt;param-name&gt;org.apache.myfaces.AUTO_SCROLL&lt;/param-name&gt;<br />   	&lt;param-value&gt;false&lt;/param-value&gt;<br />   &lt;/context-param&gt;<br />   <br />   &lt;context-param&gt;<br />   	&lt;param-name&gt;org.apache.myfaces.READONLY_AS_DISABLED_FOR_SELECTS&lt;/param-name&gt;<br />   	&lt;param-value&gt;true&lt;/param-value&gt;<br />   &lt;/context-param&gt;<br />   <br />   &lt;context-param&gt;<br />   	&lt;param-name&gt;org.apache.myfaces.RESOURCE_VIRTUAL_PATH&lt;/param-name&gt;<br />   	&lt;param-value&gt;/faces/myFacesExtensionResource&lt;/param-value&gt;<br />   &lt;/context-param&gt;<br />   <br />   &lt;context-param&gt;<br />   	&lt;param-name&gt;org.apache.myfaces.ADD_RESOURCE_CLASS&lt;/param-name&gt;<br />   	&lt;param-value&gt;org.apache.myfaces.renderkit.html.util.DefaultAddResource&lt;/param-value&gt;<br />   &lt;/context-param&gt;<br /> <br /> &lt;!-- ######## LISTENER QUE ATIVA O MyFaces ###########--&gt; <br />   &lt;listener&gt;<br />     &lt;listener-class&gt;org.apache.myfaces.webapp.StartupServletContextListener&lt;/listener-class&gt;<br />   &lt;/listener&gt;  <br /> <br /> &lt;!-- ######## SERVLETS ###########--&gt;  <br />    &lt;servlet&gt;<br />     &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;<br />     &lt;servlet-class&gt;javax.faces.webapp.FacesServlet&lt;/servlet-class&gt;<br />     &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;<br />   &lt;/servlet&gt;<br />   &lt;servlet-mapping&gt;<br />     &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;<br />     &lt;url-pattern&gt;*.faces&lt;/url-pattern&gt;<br />   &lt;/servlet-mapping&gt;<br />   <br />   &lt;servlet&gt;<br /> 	&lt;servlet-name&gt;SourceCodeServlet&lt;/servlet-name&gt;<br />     &lt;servlet-class&gt;org.apache.myfaces.shared_tomahawk.util.servlet.SourceCodeServlet&lt;/servlet-class&gt;<br />   &lt;/servlet&gt; <br />   <br /> &lt;!-- ######## CONFIGURAÇÕES EXTRAS DO MyFaces ###########--&gt; <br />   <br />   &lt;filter&gt;<br />   	&lt;filter-name&gt;extensionsFilter&lt;/filter-name&gt;<br />   	&lt;filter-class&gt;org.apache.myfaces.webapp.filter.ExtensionsFilter&lt;/filter-class&gt;<br />     &lt;init-param&gt;<br />     	&lt;param-name&gt;uploadMaxFileSize&lt;/param-name&gt;<br />         	&lt;param-value&gt;1m&lt;/param-value&gt;<br /> 	&lt;/init-param&gt;<br /> 	&lt;init-param&gt;<br /> 		&lt;param-name&gt;uploadThresholdSize&lt;/param-name&gt;<br /> 		&lt;param-value&gt;200k&lt;/param-value&gt;<br /> 	&lt;/init-param&gt;<br />   &lt;/filter&gt;<br /> <br /> &lt;!--&lt;filter-mapping&gt;<br />     &lt;filter-name&gt;extensionsFilter&lt;/filter-name&gt;<br />     &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;<br />   &lt;/filter-mapping&gt;--&gt;<br />   <br /> &lt;!-- ######## CONFIGURAÇÕES DO AJAX4JSF ###########--&gt;     <br />   &lt;filter&gt;<br />   	&lt;filter-name&gt;ajax4jsf&lt;/filter-name&gt;<br />   	&lt;filter-class&gt;org.ajax4jsf.Filter&lt;/filter-class&gt;<br />   &lt;/filter&gt;<br />    <br /> &lt;!-- ######## MAPEAMENTO ENTRE EXTENSÔES E OS FILTROS ###########--&gt;     <br />   &lt;filter-mapping&gt;<br />     &lt;filter-name&gt;extensionsFilter&lt;/filter-name&gt;<br />     &lt;url-pattern&gt;/faces/myFacesExtensionResource/*&lt;/url-pattern&gt;<br />   &lt;/filter-mapping&gt;<br />     <br />   &lt;filter-mapping&gt;<br />      &lt;filter-name&gt;extensionsFilter&lt;/filter-name&gt;<br />      &lt;url-pattern&gt;*.faces&lt;/url-pattern&gt;<br />   &lt;/filter-mapping&gt;<br />   <br /> &lt;!-- &lt;filter-mapping&gt;<br /> 	 &lt;filter-name&gt;extensionsFilter&lt;/filter-name&gt;<br />  	 &lt;url-pattern&gt;*.jsp&lt;/url-pattern&gt;<br />   &lt;/filter-mapping&gt;--&gt;<br /> <br />    &lt;filter-mapping&gt;<br />   	&lt;filter-name&gt;ajax4jsf&lt;/filter-name&gt;<br />   	&lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;<br />     &lt;dispatcher&gt;REQUEST&lt;/dispatcher&gt;<br />    	&lt;dispatcher&gt;FORWARD&lt;/dispatcher&gt;<br />     &lt;dispatcher&gt;INCLUDE&lt;/dispatcher&gt;<br />   &lt;/filter-mapping&gt;<br />   <br /> &lt;!-- ######## CONFIGURAÇÕES DA SESSÃO DO USUÁRIO ###########--&gt;   <br />   <br />   &lt;session-config&gt;<br />   	&lt;session-timeout&gt;30&lt;/session-timeout&gt;<br />   &lt;/session-config&gt;<br />   <br /> &lt;!-- ######## PÁGINA DE ENTRADA ###########--&gt;   <br />   <br />   &lt;welcome-file-list&gt;<br />   	&lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt; <br />   &lt;/welcome-file-list&gt;<br /> <br /> &lt;!-- ######## PÁGINA DE ERRO ###########--&gt;   <br />   &lt;error-page&gt;<br /> 	&lt;exception-type&gt;java.lang.Exception&lt;/exception-type&gt;<br /> 	&lt;location&gt;/erro.jsp&lt;/location&gt;<br />   &lt;/error-page&gt;<br /> <br /> <br /> a action :<br /> <br /> <br /> import java.util.ArrayList;<br /> <br /> import javax.faces.context.ExternalContext;<br /> import javax.faces.context.FacesContext;<br /> import javax.faces.model.SelectItem;<br /> import javax.servlet.http.HttpServletRequest;<br /> <br /> import dvm.funil.dao.produto.ProdutoTesteDAO;<br /> import dvm.funil.model.produto.ProdutoTeste;<br /> <br /> public class ProdutoTesteAction {<br /> 	<br /> 	private HttpServletRequest getRequest()<br /> 	{<br /> 		FacesContext faces=FacesContext.getCurrentInstance();<br /> 		ExternalContext external=faces.getExternalContext();<br /> 		HttpServletRequest request=(HttpServletRequest) external.getRequest();<br /> 		return request;<br /> 	}<br /> 	public String altera(){<br /> 		HttpServletRequest request=getRequest();<br /> 		ProdutoTeste pt = (ProdutoTeste)(request.getAttribute("produtoTeste"));<br /> 		//ProdutoTeste pt = new ProdutoTeste();<br /> 		//pt.setNome(nome);<br /> 		System.out.println("Item:"+pt.getCod()+" - "+pt.getNome()+"  gravado com sucesso !!! ");<br /> 		//request.setAttribute("produtoTeste",pt);<br /> 		return "result";<br /> 	}<br /> 	<br /> 	public ArrayList&lt;ProdutoTeste&gt; getConsultar(){<br /> 		ArrayList&lt;ProdutoTeste&gt; array = new ArrayList&lt;ProdutoTeste&gt;();<br /> 		//ArrayList&lt;String&gt; array = new ArrayList&lt;String&gt;();<br /> 		ProdutoTesteDAO pDAO = new ProdutoTesteDAO();<br /> 		array=pDAO.getConsulta();	<br /> 		return array;<br /> 	}<br /> 	public ArrayList&lt;SelectItem&gt; getListMenu(){<br /> 		ProdutoTesteDAO pDAO = new ProdutoTesteDAO();<br /> 		ArrayList&lt;SelectItem&gt; arraySel = new ArrayList&lt;SelectItem&gt;();<br /> 		ArrayList&lt;ProdutoTeste&gt; array = pDAO.getConsulta();<br /> 		for(ProdutoTeste p : array){<br /> 			arraySel.add(new SelectItem(p.getCod(),p.getNome()));<br /> 		}<br /> 		return arraySel;<br /> 	}<br /> <br /> }<br /> <br /> os os action só estão mapeados no faces config....<br /> <br /> <br /> ]]></description>
				<guid isPermaLink="true">http://www.guj.com.br/prepost/110233/594903/rejsf---navegacao-
</guid>
				<link>http://www.guj.com.br/prepost/110233/594903/rejsf---navegacao-
</link>
				<pubDate><![CDATA[Thu, 20 Nov 2008 06:37:23]]> GMT</pubDate>
				<author><![CDATA[ Fredi]]></author>
			</item>
			<item>
				<title>Re:Jsf - navegação </title>
				<description><![CDATA[ Galera muito obrigado !! já concegui !!! da forma que o Elugo me informou deu certo só tive que reconstruir o projeto..... vlew até +]]></description>
				<guid isPermaLink="true">http://www.guj.com.br/prepost/110233/594913/rejsf---navegacao-
</guid>
				<link>http://www.guj.com.br/prepost/110233/594913/rejsf---navegacao-
</link>
				<pubDate><![CDATA[Thu, 20 Nov 2008 07:13:16]]> GMT</pubDate>
				<author><![CDATA[ Fredi]]></author>
			</item>
			<item>
				<title>Re:Jsf - navegação </title>
				<description><![CDATA[ [quote=Fredi]Galera muito obrigado !! já concegui !!! da forma que o Elugo me informou deu certo só tive que reconstruir o projeto..... vlew até +[/quote]<br /> <br /> ou melhor tive q adicionar 	&lt;redirect id="result.faces" /&gt;<br /> <br /> <br /> &lt;navigation-case&gt;<br /> 		&lt;from-outcome&gt;result&lt;/from-outcome&gt;<br /> 		&lt;to-view-id&gt;/funil/negocio/result.faces&lt;/to-view-id&gt;<br /> 		&lt;redirect id="result.faces" /&gt;<br /> &lt;/navigation-case&gt;<br /> <br /> Ta certo fazer isso ????  valew !!]]></description>
				<guid isPermaLink="true">http://www.guj.com.br/prepost/110233/594927/rejsf---navegacao-
</guid>
				<link>http://www.guj.com.br/prepost/110233/594927/rejsf---navegacao-
</link>
				<pubDate><![CDATA[Thu, 20 Nov 2008 07:55:00]]> GMT</pubDate>
				<author><![CDATA[ Fredi]]></author>
			</item>
			<item>
				<title>Re:Jsf - navegação </title>
				<description><![CDATA[ erro primario mas eu o cometi nao pode usar &lt;ajax:comandButton&gt;......<br /> <br /> <br /> valew <br /> <br /> <br /> [quote=Fredi][quote=Fredi]Galera muito obrigado !! já concegui !!! da forma que o Elugo me informou deu certo só tive que reconstruir o projeto..... vlew até +[/quote]<br /> <br /> ou melhor tive q adicionar 	&lt;redirect id="result.faces" /&gt;<br /> <br /> <br /> &lt;navigation-case&gt;<br /> 		&lt;from-outcome&gt;result&lt;/from-outcome&gt;<br /> 		&lt;to-view-id&gt;/funil/negocio/result.faces&lt;/to-view-id&gt;<br /> 		&lt;redirect id="result.faces" /&gt;<br /> &lt;/navigation-case&gt;<br /> <br /> Ta certo fazer isso ????  valew !![/quote]]]></description>
				<guid isPermaLink="true">http://www.guj.com.br/prepost/110233/597743/rejsf---navegacao-
</guid>
				<link>http://www.guj.com.br/prepost/110233/597743/rejsf---navegacao-
</link>
				<pubDate><![CDATA[Tue, 25 Nov 2008 15:46:38]]> GMT</pubDate>
				<author><![CDATA[ Fredi]]></author>
			</item>
	</channel>
</rss>
