aspose file tools*
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

Win a copy of Spring in Action this week in the Spring forum!
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.
It is sorta covered in the JavaRanch Style Guide.
subject: problem with findComponent()