0 Replies Latest reply on Nov 6, 2008 11:05 PM by Robert Traversi

    Nesting selectOneMenu in listShuttle

    Robert Traversi Newbie
      I am trying to nest a selectOneMenu within a listShuttle.

      The list diplays OK on the screen but when the Save button is clicked to continue processing, the following error is displayed.
      This error shows even when no changes have been made.

      |13:51:35,534 INFO  [lifecycle] WARNING: FacesMessage(s) have been enqueued, but may not have been displayed.
      sourceId=masterStaffRequirements:j_id439[severity=(ERROR 2), summary=("Component masterProject:j_id439 has invalid value expression null"), detail=("Component masterProject:j_id439 has invalid value expression null")]

      The class structure (simplified) is as follows:

        class MasterProject {
          Set<ProjectTaskReqs> reqTasks;

        class ProjectTaskReqs {
          MasterProject masterProject;
          Tasks tasks;
          TaskTypes taskType;

        class Tasks
          String name;
        class TaskTypes
          long id;

      There is a master list of Tasks and there is a master list of TaskTypes.
      I want to have a listShuffle to put the reqTasks into the MasterProject and use a selectOneMenu to put in the taskType.  (The task type determines, for that project, what kind of oversight is required, among other things.)

      possibleTaskTypes and selectedTaskTypes are each a List of ProjectTaskReqs.
      taskTypeList is a framework:entity-query component defined in components.xml and simply reads all the TaskTypes from the database.

      The code within MasterProjectEdit.xhtml is :

      <rich:listShuttle var="taskItem"
        <s:convertEntity />
           <f:facet name="header">
                <h:outputText value="Task" />
           <h:outputText value="#{taskItem.tasks.name}" />
           <f:facet name="header">
             <h:outputText value="Type" />
           <h:selectOneMenu value="#{taskItem.taskType.id}">
                   noSelectionLabel="" />