File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSF and the fly likes problem with findComponent() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "problem with findComponent()" Watch "problem with findComponent()" New topic

problem with findComponent()

lynn fann
Ranch Hand

Joined: Oct 15, 2006
Posts: 115
i try to use this code to get the inputText but it always return me a null value.

code in managed bean:
String cidUserId= (String) component.getAttributes().get("userIdHidd");
UIInput userIdInput = (UIInput)context.getViewRoot().findComponent(cidUserId); // this line return me a null value
String userId= userIdInput.getValue();

code in UI:

Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968

lynn fann
Ranch Hand

Joined: Oct 15, 2006
Posts: 115
oopz,sorry just now that post was incomplete. i have fill in more information.
I agree. Here's the link:
subject: problem with findComponent()
It's not a secret anymore!