aspose file tools
The moose likes JSF and the fly likes setPropertyActionListener throwing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "setPropertyActionListener throwing "Illegal Syntax for Set Operation"" Watch "setPropertyActionListener throwing "Illegal Syntax for Set Operation"" New topic

setPropertyActionListener throwing "Illegal Syntax for Set Operation"

Sam Mc Kee

Joined: Aug 20, 2010
Posts: 3
I've got a commandlink within a ui:repeat that is supposed to set some values on a bean. The loop looks like this.

The first three setPropertyActionListeners work just fine (they set booleans on the timecardBean) but the timecardBean year and month, not matter which one I put first throws an error that says " target="timecardBean.year": Illegal Syntax for Set Operation."

This is the set operation in TimecardBean:

That's it, nothing more to it. The getMonth() and getYear() methods on the Timecard (the variable for the ui:repeat) also return integers.

I've googled this to death and am at wit's end. Any advice would be greatly appreciated.

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16895

View Definition Language is not a procedural programming language. It's a template for a web page (View).

Before worrying about why it doesn't work, consider why you tried to design what should be a specification as though it was a program. View-based looping and parameter setting and other such programming constructs are rarely needed in JSF. Misuse of them, however, results in more complex, less reliable code than what you'd get if you didn't try to force JSF down paths for which is wasn't designed.

Customer surveys are for companies who didn't pay proper attention to begin with.
It is sorta covered in the JavaRanch Style Guide.
subject: setPropertyActionListener throwing "Illegal Syntax for Set Operation"
It's not a secret anymore!