myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "viola.lu (JIRA)" <...@myfaces.apache.org>
Subject [jira] Commented: (MYFACES-2916) "java.lang.NoSuchMethodException" error when call a managedbean int method
Date Tue, 14 Sep 2010 01:27:34 GMT

    [ https://issues.apache.org/jira/browse/MYFACES-2916?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12909085#action_12909085
] 

viola.lu commented on MYFACES-2916:
-----------------------------------

Thanks for your detailed explanation. i will check el implementation from my side. Thanks
again.

> "java.lang.NoSuchMethodException" error when call a managedbean int method
> --------------------------------------------------------------------------
>
>                 Key: MYFACES-2916
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2916
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: General
>    Affects Versions: 2.0.2-SNAPSHOT
>         Environment: OS:winxp
> JDK: 1.6.0_20
> Tomcat 7.0
>            Reporter: viola.lu
>            Priority: Minor
>         Attachments: el-exercises.war
>
>
> 1. Create a managed bean ,defind an int field
> package coreservlets;
> import javax.faces.bean.*;
> @ManagedBean
> public class SpanishColorMapper extends ColorMapper {
>     private int age;
>   public SpanishColorMapper() {
>     super("Spanish", "rojo", "anaranjado", "amarillo",
>           "verde", "negro", "blanco");
>   }
>   public int calYear(int x) {
>       return age + x;
>   }
>   public int getAge() {
>       return age;
>   }
>   public void setAge(int x) {
>       age = x;
>   }
> }
> 2.Direclty call calYear method in xhtml like:
> <td>#{spanishColorMapper.calYear(5)}</td>
> but  it's reported that :
> java.lang.NoSuchMethodException: coreservlets.SpanishColorMapper.calYear(java.lang.Long)
> Caused by:
> java.lang.NoSuchMethodException - coreservlets.SpanishColorMapper.calYear(java.lang.Long)
> Seems number is set as Long by default , not type as managedbean

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message