Details

    • Type: Feature Request
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: 3.0.0.CR1
    • Fix Version/s: 3.0.0.CR2
    • Component/s: CDI Integration
    • Labels:
      None
    • Affects:
      Documentation (Ref Guide, User Guide, etc.), Release Notes

      Description

      There is no easy way to reach the project stage from EL, nor can you easily check which ProjectStage is active. The only way to access the ProjectStage is by referencing the context parameter directly:

      #

      {initParam['javax.faces.PROJECT_STAGE']}

      Seam Faces should make it available as

      #

      {projectStage}

      This also makes it possible to check which project stage is active.

      #

      {projectStage eq 'Development'}

      Without an implicit projectStage variable, that's not possible via EL, even with method parameters, because the signature of the comparison method is as follows:

      FacesContext#isProjectStage(ProjectStage)

      Since enums can't be referenced directly from EL (without an explicit producer), there is no way to use this method. Thus, it might make sense to expose a project stage map that allows the enum values to be referenced:

      #

      {projectStages.Development}

      Then it would be possible to execute:

      #

      {facesContext.isProjectStage(projectStages.Production)}

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                bleathem Brian Leathem
                Reporter:
                dan.j.allen Dan Allen
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: