Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [faces-dev] Property mismatch ?

I used   @lombok annotation.


Manually deleted the deployment war file.

I restarted eclipse IDE and the application server.

Then the  problem solved itself.








On Mon, 1 Mar 2021, 14:22 Manfred Riem, <m_riem@xxxxxxxxxxx> wrote:

Hi,

 

Where is the getter method for the ExpenseTypeOptions field?

 

Thanks!

 

Kind regards,

Manfred Riem

 

From: faces-dev <faces-dev-bounces@xxxxxxxxxxx> On Behalf Of Som Lima
Sent: Sunday, February 28, 2021 1:36 AM
To: faces-dev@xxxxxxxxxxx
Subject: [faces-dev] Property mismatch ?

 

This error is normally due to a mismatch between .xhtml declaration and the Bean Class declaration.
However I do not believe that to be the case.
I have copied and  pasted the code here.

What could be the cause of the error ?
 
 javax.el.PropertyNotFoundException: The class 'jsfgui.Accounting' does not have the property 'ExpenseTypeOptions'.
 
 
 --- Java Code ---

    private String [] expenseType ;
  private SelectItem [] ExpenseTypeOptions;




public @PostConstruct  void init() {
      setExpenseTypeOptions(new SelectItem[] {
new SelectItem("Food","Food"),
            new SelectItem("Clothing","Clothing"),
   new SelectItem("Car","Car"),
   new SelectItem("Fun","Fun"),
   new SelectItem("Other","Other")
      });
}

--- .xhtml file

      <h:selectManyListbox
 value="#{accounting.expenseType}">
        <f:selectItems
         value="#{accounting.expenseTypeOptions}"/>
       </h:selectManyListbox>
    <p/>

   
prevously I was having another issue because this code was meant to work but produced blank values.

private Map<String, String> availableItems = new HashMap<>();

I had to change it to this , added string parameters for the dynamic values to be picked up.

 

private Map<String, String> availableItems = new HashMap<String, String>();


There was no error just  blank values rendered on page. I thought this new issue may be related so I thought I should post it.

_______________________________________________
faces-dev mailing list
faces-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/faces-dev

Back to the top