I have a simple component called "RadioPropertySelection". This component is
somehow a copy paste from the propertyselection code except that it renders
a list in radio buttons.
Somehow one of the parameters "model" gets lost!
I believe my ognl construct is right and refers a constant:

ognl:@[EMAIL PROTECTED] points to a
public static final IPropertySelectionModel = new
StringPropertySelectionModel(...);

My parameters is obtained using annotations:
   @Parameter(required = true)
   public abstract IPropertySelectionModel getModel();

and here is the piece of code from where the NPE comes from:

   protected void renderFormComponent(IMarkupWriter writer, IRequestCycle
cycle)
   {

       IPropertySelectionModel model = getModel();

       if (model == null)
***line 51            throw Tapestry.createRequiredParameterException(this,
"model");


org.apache.tapestry.BindingException Value for parameter 'model' in
component ListeArticles/$RadioPropertySelection is null, and a non-null
value is required. binding: ExpressionBinding[ListeArticles @
[EMAIL PROTECTED] component:
[EMAIL PROTECTED]/$RadioPropertySelection]
location: context:/WEB-INF/catalogue/ListeArticles.html, line 470

 465 <tr> 466 <td width="691" height="23" valign="middle"> 467
<strong> 468 Trier
par :  469 </strong> 470 <span jwcid="@RadioPropertySelection" model="
ognl:@[EMAIL PROTECTED]"
submitOnChange="true" value="ognl:classement"> 471 D&eacute;signations 472
473 &nbsp;&nbsp;&nbsp;&nbsp; 474 <input type="radio" name="radiobutton"
value="radiobutton" onfocus="this.checked=true; this.submit()"> 475 Montants
Stack Trace:

  - org.apache.tapestry.Tapestry.createRequiredParameterException(
  Tapestry.java:643)
  -
  actualis.web.tapestry.components.RadioPropertySelection.renderFormComponent
  (RadioPropertySelection.java:51)
  - org.apache.tapestry.form.AbstractFormComponent.renderComponent(
  AbstractFormComponent.java:122)
  - org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:617)



Does this make any sense to anyone? How can a constant become null during
render??

Thanks,

Henri.

Reply via email to