tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthew Broadhead (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (TOMEE-1476) ManagedProperty annotation seems to be broken
Date Sun, 14 Dec 2014 16:50:13 GMT

    [ https://issues.apache.org/jira/browse/TOMEE-1476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14245984#comment-14245984
] 

Matthew Broadhead commented on TOMEE-1476:
------------------------------------------

It doesn't matter as the parameter can be accessed like this
{code}
	public int getAgencyid() {
		FacesContext context = FacesContext.getCurrentInstance();
		return context.getApplication().evaluateExpressionGet(context, "#{param.id}", Integer.class);
	}
{code}
According to MyFaces you should be able access other beans and parameters using @ManagedProperty
annotation. [https://myfaces.apache.org/wiki/core/user-guide/jsf-and-myfaces-howtos/backend/accessing-one-managed-bean-from-another.html]

> ManagedProperty annotation seems to be broken
> ---------------------------------------------
>
>                 Key: TOMEE-1476
>                 URL: https://issues.apache.org/jira/browse/TOMEE-1476
>             Project: TomEE
>          Issue Type: Bug
>    Affects Versions: 1.7.2
>            Reporter: Matthew Broadhead
>         Attachments: test.war, test.war
>
>
> If a ManagedBean is set in faces-config.xml and a ManagedProperty declared it does not
seem to get set.
> {code}
> import javax.faces.bean.ManagedProperty;
> public class Test {
>     @ManagedProperty("#{param.id}")
>     private int id;
>     public int getId() {
>         return id;
>     }
>     
>     public void setId(int id) {
>         this.id = id;
>     }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message