[jbossseam-issues] [JBoss JIRA] Closed: (JBSEAM-3604) outjection interferes with page parameters

Norman Richards (JIRA) jira-events at lists.jboss.org
Tue Nov 4 18:17:20 EST 2008


     [ https://jira.jboss.org/jira/browse/JBSEAM-3604?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Norman Richards closed JBSEAM-3604.
-----------------------------------

    Resolution: Rejected


You are outjecting bar into the event context, where the evaluated page parameter is stored.  Since the value is null, this becomes a remove operation, effectively overwriting your incoming parameter value.  You obviously don't want to do this.  I recommend either changing your outjection scope/name or adding @In to your @Out to make the link bidirectional.  (not the most efficient solution, but it should work)


> outjection interferes with page parameters
> ------------------------------------------
>
>                 Key: JBSEAM-3604
>                 URL: https://jira.jboss.org/jira/browse/JBSEAM-3604
>             Project: Seam
>          Issue Type: Bug
>    Affects Versions: 2.0.2.SP1
>         Environment: jboss-4.2.3.GA
> jdk1.5.0_15
>            Reporter: Michael Brackx
>            Assignee: Norman Richards
>             Fix For: 2.1.1.CR1
>
>
> a field that has been set via a page parameter is not displayed if it is outjected
> Bug.java
> ============================
> package com.mydomain.myproject;
> import org.jboss.seam.annotations.Name;
> import org.jboss.seam.annotations.Out;
> @Name("bug")
> public class Bug {
> 	private String foo;
> 	@Out(required = false)
> 	private String bar;
> 	public String getFoo() {
> 		return foo;
> 	}
> 	public void setFoo(String foo) {
> 		this.foo = foo;
> 	}
> 	public String getBar() {
> 		return bar;
> 	}
> 	public void setBar(String bar) {
> 		this.bar = bar;
> 	}
> }
> ============================
> bug.xhtml
> ============================
> <ui:composition xmlns="http://www.w3.org/1999/xhtml"
> 				xmlns:ui="http://java.sun.com/jsf/facelets"
> 				xmlns:h="http://java.sun.com/jsf/html"
> 				template="layout/template.xhtml">
> 	<ui:define name="body">
> 		<h:inputText id="bar" value="#{bug.bar}"/>
> 	</ui:define>
> </ui:composition>
> ============================
> bug.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"
> 	xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.0.xsd">
> 	<param name="foo" value="#{bug.foo}"/>
> 	<param name="bar" value="#{bug.bar}"/>
> </page>
> ============================
> test url: http://localhost:8080/myproject/bug.seam?foo=foo&bar=bar
> bug: bar is not displayed
> when removing the @Out it is

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list