Deal of the Day

Home » Main » Manning Forums » 2004 » JavaServer Faces in Action

Thread: Unable to find component with ID 'helloinput' in view

Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 2 - Pages: 1 - Last Post: May 22, 2006 9:38 AM by: ssht968
jocfro


Posts: 2
Registered: 2/24/06
Unable to find component with ID 'helloinput' in view
Posted: Feb 24, 2006 2:02 AM
  Click to reply to this thread Reply

Hi folks!

I've tried the first example from JSF in Action and get all the time this warning messages:

24.02.2006 09:01:11 com.sun.faces.renderkit.html_basic.HtmlBasicRenderer getForComponent
WARNING: Unable to find component with ID 'helloinput' in view.
24.02.2006 09:01:11 com.sun.faces.renderkit.html_basic.HtmlBasicRenderer getForComponent
WARNING: Unable to find component with ID 'helloinput' in view.

I post the code, like it is. Maybe that is helpful for the solution:

......
<f:view>
<h:form id="welcomeForm">
<h:outputText id="welcomeOutput"
value="Willkommen zu Java Server Faces!"
style="color:green"/>

<h:message id="errors"
for="helloinput"
style="color:red"/>

<h:outputLabel for="helloinput">
<h:outputText
id="helloinputLabel"
value="Bitte geben Sie ein, wie häufig die
Kontrolle angezeigt werden soll: "/>
</h:outputLabel>

<h:inputText id="helloinput"
value="#{helloBean.count}"
required="true">
<f:validateLongRange minimum="1" maximum="500"/>
</h:inputText>
.......
</f:view>
.....

The "funny" thing is, if I change the sequence, at first the "helloinput" inputText-Field and after this all the components whose are references the "helloinput" inputText-Field, i don't get the warnings. But that can't be the solution, because they are in the wrong order.

Kind regards,

Jochen

Message was edited by:
jocfro

jocfro


Posts: 2
Registered: 2/24/06
Re: Unable to find component with ID 'helloinput' in view
Posted: Feb 24, 2006 2:38 AM   in response to: jocfro in response to: jocfro
  Click to reply to this thread Reply

Ok, I got it for myself.

There is a known problem with jsp and jsf rendering process. There is a workaround available. Put all your components that depends of each other, like in my example inside a <h:panelGroup>


Please look also here: http://www.onjava.com/pub/a/onjava/2004/06/09/jsf.html

Jochen

ssht968

Posts: 3
Registered: 5/22/06
Re: Unable to find component with ID 'helloinput' in view
Posted: May 22, 2006 9:38 AM   in response to: jocfro in response to: jocfro
  Click to reply to this thread Reply

I think you could put a message for the component ,check the error

Legend
Gold: 300 + pts
Silver: 100 - 299 pts
Bronze: 25 - 99 pts
Manning Author
Manning Staff