cancel
Showing results for 
Search instead for 
Did you mean: 

Component javax.faces.component.UIViewRoot is no ValueHolder

esource
Champ on-the-rise
Champ on-the-rise
I'm getting this error:

Component javax.faces.component.UIViewRoot is no ValueHolder, cannot set value

11:33:24,062 User:admin ERROR [shared_impl.taglib.UIComponentTagUtils] Component
javax.faces.component.UIViewRoot is no ValueHolder, cannot set value.

What does this mean?

I have a .jsp in a dialog that calls a method in the backing bean:


<h:dataTable binding="#{DialogManager.bean.dataTable}" value="#{DialogManager.bean.dataList}" var="dataItem">
    <h:column>
        <f:facet name="header">
            <h:outputText value="ID" />
        </f:facet>
        <h:commandLink value="#{dataItem.id}" action="#{MyBeanDialog.editDataItem}" />
    </h:column>

    <h:column>
        <f:facet name="header">
            <h:outputText value="Name" />
        </f:facet>
       <h:outputText value="#{dataItem.name}" />
    </h:column>

    <h:column>
        <f:facet name="header">
            <h:outputText value="Author" />
        </f:facet>
        <h:outputText value="#{dataItem.author}" />
    </h:column>
</h:dataTable>


in my backing bean dialog:



public class MyBeanDialog extends BaseDialogBean {

    public String editDataItem() {

       if (logger.isDebugEnabled()) logger.debug("editDataItem");      

        // Get selected MyData item to be edited.
        dataItem = (customNode) dataTable.getRowData();

        // Store the ID of the data item in hidden input element.
        dataItemId.setValue(dataItem.getId());

        return "edit"; // Navigation case.
    }   



in my faces-config.xml:


      <navigation-case>
           <from-action>#{MyBeanDialog.editDataItem}</from-action>
           <from-outcome>edit</from-outcome>
           <to-view-id>/jsp/extension/dialogs/edit-data-item.jsp</to-view-id>
       </navigation-case> 

in edit-data-item.jsp:


<h:panelGrid>
    <h:outputText value="ID" />
    <h:outputText value="#{MyBeanDialog.dataItem.id}" />

    <h:outputText value="Name" />
    <h:inputText value="#{MyBeanDialog.dataItem.name}" />

    <h:outputText value="Author" />
    <h:inputText value="#{MyBeanDialog.dataItem.author}" />
</h:panelGrid>


When clicking on

 <h:commandLink value="#{dataItem.id}" action="#{MyBeanDialog.editDataItem}" />

edit-data-item.jsp appears on a screen blank.

What is causing the error? Why aren't the jsf components appearing on the screen?
2 REPLIES 2

targa2000
Champ in-the-making
Champ in-the-making
It means you are missing <f:view></f:view> tags around your jsf tags.  Check your code once again.  It's a jsf issue not alfresco.

esource
Champ on-the-rise
Champ on-the-rise
Yes, thank you.  It resolved the error.  Another question.  Currently, when clicking on:


<h:commandLink value="#{dataItem.id}" action="#{MyBeanDialog.editDataItem}" />

edit-data-item.jsp appears, but it covers the entire browser display.  What do I have to do so that it displays within the Dialog?
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.