myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Mahoney (JIRA)" <...@myfaces.apache.org>
Subject [jira] Commented: (MYFACES-921) NullPointerException using inputSuggestAjax with Facelets
Date Fri, 16 Dec 2005 16:46:46 GMT
    [ http://issues.apache.org/jira/browse/MYFACES-921?page=comments#action_12360603 ] 

Peter Mahoney commented on MYFACES-921:
---------------------------------------

I am having problems implementing the component handler. I have started by assuming the two
argument method  version, but I do not get the MethodBinding property set. Here is the code
so far:

public class InputSuggestAjaxHandler extends HtmlComponentHandler {

	public InputSuggestAjaxHandler(ComponentConfig tagConfig) {
		super(tagConfig);
	}

	protected MetaRuleset createMetaRuleset(Class type)
    {
        MetaRuleset m = super.createMetaRuleset(type);
        m.addRule(getSuggestedItemsMethodRule());

        return m;
    }

	private MetaRule getSuggestedItemsMethodRule() {
		MethodRule rule = new MethodRule("getSuggestedItemsMethod", List.class, new Class[]{String.class,
Integer.class});

		return rule;
	}
}

I don't think I understand quite what should be happening. When should the MethodBinding property
actually set?

Thanks

> 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


Mime
View raw message