You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Mike Kienenberger (JIRA)" <de...@myfaces.apache.org> on 2005/12/12 17:30:45 UTC

[jira] Closed: (MYFACES-921) NullPointerException using inputSuggestAjax with Facelets

     [ http://issues.apache.org/jira/browse/MYFACES-921?page=all ]
     
Mike Kienenberger closed MYFACES-921:
-------------------------------------

    Resolution: Invalid

InputSuggestAjaxTag is pretty trivial.   There's some code in there to create a MethodBinding, but that's it.   You'll need to do the same thing in the facelets tag handler.  The only tricky part is that the method signature changes based on the value of maxSuggestedItems, which is unfortunate.   If you can't make this conditional statement work with facelets, submit a patch and I'll review it.

            	if (((InputSuggestAjax)component).getMaxSuggestedItems()!=null) {
                    MethodBinding mb = context.getApplication().createMethodBinding(suggestedItemsMethod,new Class[]{String.class, Integer.class});
                    ((InputSuggestAjax)component).setSuggestedItemsMethod(mb);
            	} else {
                    MethodBinding mb = context.getApplication().createMethodBinding(suggestedItemsMethod,new Class[]{String.class});
                    ((InputSuggestAjax)component).setSuggestedItemsMethod(mb);
            	}

However, there's no bug here, so I'm marking this as invalid and closing it.

> NullPointerException using inputSuggestAjax with Facelets
> ---------------------------------------------------------
>
>          Key: MYFACES-921
>          URL: http://issues.apache.org/jira/browse/MYFACES-921
>      Project: MyFaces
>         Type: Bug
>   Components: Sandbox
>     Versions: Nightly
>     Reporter: Peter Mahoney

>
> The following exception is generated using inputSuggestAjax with Facelets:
> 005-12-09 11:08:58,776 ERROR [localhost].[/webmail].[FacesServlet]:253 http-8080-Processor25  -> Servlet.service() for servlet FacesServlet threw exception
> java.lang.NullPointerException
> 	at org.apache.myfaces.custom.inputsuggestajax.InputSuggestAjaxRenderer.encodeAjax(InputSuggestAjaxRenderer.java:209)
> It appears that InputSuggestAjaxTag uses its setSuggestedItemsMethodProperty method to set the suggestedItemsMethod property in the component, rather than this being carried out by the component itself.

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