File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes findcomponent returns null value Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "findcomponent returns null value" Watch "findcomponent returns null value" New topic
Author

findcomponent returns null value

Amitkumar Fulambarkar
Greenhorn

Joined: Sep 17, 2008
Posts: 29
Hi,

Can someone please let me know why I get the null for find component? I only get the form01 value which is NOT NULL. rest the component is null.

Please help.

I also tried below, but no luck.


Bean:



JSP:


Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16228
    
  21

Well, I'd have to RTFM to be sure, but I don't think you can code a complex component ID into findComponent. I think you have to do a findComponent on pnreviewform, then run a findComponent on that to get msg3output.

Although in most cases, it's probably going to be easier to just bind the msg3output control straight to the backing bean using the "binding=" attribute.

Just because I take people to task here for overusing bindings doesn't mean that binding is useless. It just has its place, that's all.

Incidentally, my own personal recommendation is to avoid using raw HTML in JSF view definitions. You can use the panelGrid control in place of the raw table definitions. Same end result, but more JSF-friendly.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: findcomponent returns null value