[
https://issues.jboss.org/browse/AS7-6186?page=com.atlassian.jira.plugin.s...
]
Marek Schmidt commented on AS7-6186:
------------------------------------
Another weird problem. In the following app, I put things into the viewMap in the
converter getAsString method (which is needed for implementing things, such as Seam
EntityConverter) .if I have the
"event.getFacesContext().getViewRoot().getViewMap(true);" call in the after
restore view (which should be perfectly fine, as after restore view the UIViewRoot is
set), I have to click the Record button twice to see the "bar". Removing the
getViewMap call in the after restore view phase listner, I can see it after the first
click.
{code}
@Model
public class Action
{
private String foo;
public String getFoo() {
return foo;
}
public void recordViewMap() {
foo =
(String)FacesContext.getCurrentInstance().getViewRoot().getViewMap().get("foo");
}
}
{code}
{code}
@FacesConverter("org.jboss.seam.test.MyConverter")
public class MyConverter implements Converter
{
public MyConverter() {
}
@Override
public Object getAsObject(FacesContext context, UIComponent component, String value)
{
return null;
}
@Override
public String getAsString(FacesContext context, UIComponent component, Object value)
{
context.getViewRoot().getViewMap().put("foo", "bar");
return (String)value;
}
}
{code}
{code}
public class MyPhaseListener implements PhaseListener {
@Override
public void afterPhase(PhaseEvent event) {
if (event.getPhaseId().equals(PhaseId.RESTORE_VIEW)) {
// Removing this makes it work:
event.getFacesContext().getViewRoot().getViewMap(true);
}
}
@Override
public void beforePhase(PhaseEvent event) {
}
@Override
public PhaseId getPhaseId() {
// TODO Auto-generated method stub
return PhaseId.ANY_PHASE;
}
}
{code}
{code}
<h:form>
<div>
Foo:
<h:outputText value="#{action.getFoo()}" />
</div>
<div>
Converter:
<h:outputText value="#{'converter'}">
<f:converter
converterId="org.jboss.seam.test.MyConverter"/>
</h:outputText>
</div>
<div>
<h:commandButton value="Record"
action="#{action.recordViewMap()}"/>
</div>
</h:form>
{code}
Mojarra 2.1.16 upgrade breaks Seam2.3.0 conversations
-----------------------------------------------------
Key: AS7-6186
URL:
https://issues.jboss.org/browse/AS7-6186
Project: Application Server 7
Issue Type: Bug
Components: JSF
Affects Versions: 7.1.4.Final (EAP)
Environment: Current 7.1.4.Final-SNAPSHOT (2012-12-15), Mojarra 2.1.16,
Seam2.3.0.Final
Reporter: Marek Schmidt
Assignee: Stan Silvert
Priority: Critical
Attachments: AS7-6186-viewMap.tar, AS7-6186-viewMap.war, seam-booking.ear
Recent Mojarra upgrade seems to break Seam 2.3.0 conversations.
Not exactly sure yet what has changed and whether it is a Mojarra bug or Seam depending
on something it shouldn't.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira