• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

problem with <h:selectOneMenu component --- identifier 'motorcycleCat' resolved to null

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I have made a simple application with seam but i am facing problems with selectOneMenu and s:selectItems make them work together.

The functionality is as follows:
I have an xhtml page from where i want to use selectOneMenu and s:selectItems (which gives me a list of values from the database) in order to select one value.
After this when i click the button i want to search in another table and render the results in the page. Right now, when i click the link the page renders fine and i can successfully select one falue from the selectOneMenu list. After that, when i click the submit button I get the exception javax.el.PropertyNotFoundException: /motorcycleSearchAction.xhtml @23,44 value="#{motorcycleCat.category}": Target Unreachable, identifier 'motorcycleCat' resolved to null. The property that becomes null is the property that should be set
from the selectOneMenu.

I would be more than greatfull if you could asist me on this as i am stuck two days now.

The contents of my files are:

MotorcycleSearchAction.xhtml



My action jave file MotorcycleActionImpl is:


The interface is:



And below is the stack trace:




Any help would be appreciated.

Thanks in advance,
giannis

 
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Giannis nasdades wrote:I get the exception

javax.el.PropertyNotFoundException: /motorcycleSearchAction.xhtml @23,44 value="#{motorcycleCat.category}":
Target Unreachable, identifier 'motorcycleCat' resolved to null.

The property that becomes null is the property that should be set from the selectOneMenu.

You read it wrong. It is 'motorcycleCat' which is null, not 'category'.
So, this managed bean is nowhere available in the JSF scope?
I am not that familiar with Seam, but shouldn't you declare the bean as managed bean in faces-config.xml?
 
Giannis nasdades
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bauke Scholtz wrote:

Giannis nasdades wrote:I get the exception

javax.el.PropertyNotFoundException: /motorcycleSearchAction.xhtml @23,44 value="#{motorcycleCat.category}":
Target Unreachable, identifier 'motorcycleCat' resolved to null.

The property that becomes null is the property that should be set from the selectOneMenu.

You read it wrong. It is 'motorcycleCat' which is null, not 'category'.
So, this managed bean is nowhere available in the JSF scope?
I am not that familiar with Seam, but shouldn't you declare the bean as managed bean in faces-config.xml?




Hi,

The bean was generated automatically by jboss tools as was geenrated the whole project. So i do not think this is the issue. For your reference i give yuo the whole bean code:



furntermore, this is the content of faces-config.xml "it was also generated by jboss tools".



if you have any more ideas please let me know.

Thanks in advance,
giannis
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Giannis nasdades wrote:
The bean was generated automatically by jboss tools as was geenrated the whole project. So i do not think this is the issue.


Trust me, the exception tells otherwise. I was just translating it. The bean is nowhere in the scope!

So there is either a bug in Seam or you misconfigured it. Try posting the issue at the Seam forums.
I haven't seen high experienced Seam boys walking around here before.
 
Giannis nasdades
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bauke Scholtz wrote:

Giannis nasdades wrote:
The bean was generated automatically by jboss tools as was geenrated the whole project. So i do not think this is the issue.


Trust me, the exception tells otherwise. I was just translating it. The bean is nowhere in the scope!

So there is either a bug in Seam or you misconfigured it. Try posting the issue at the Seam forums.
I haven't seen high experienced Seam boys walking around here before.



ok now you are the man.. you gave me the idea of what the error. The error was that inside the page i was not refering to bean with the name that i have put in @Name annotation. Now this part is working fine .. but my problem is that as soon i click the button the queryMotorcycles is not executed.

Thanks a lot for your help.

Regards,
giannis
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic