ICEfaces
  1. ICEfaces
  2. ICE-7021

Cannot change themes in Compat Showcase if deployed under different context.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.2
    • Fix Version/s: 2.1-Beta, 3.0
    • Component/s: Sample Apps
    • Labels:
      None
    • Environment:
      ICEfaces

      Description

      There is a hard-code reference to the "component-showcase" context in the StyleBean.changeStyle() method:

                  FacesContext.getCurrentInstance().getExternalContext().redirect("/component-showcase/index.jsp");

      This means that if the app is deployed to a different context, changing styles will cause an exception.

        Activity

        Repository Revision Date User Message
        ICEsoft Public SVN Repository #24968 Thu Jul 07 10:38:03 MDT 2011 deryk.sinotte ICE-7021: adjust hard-coded reference to component-showcase as the app context and acquire the context programmatically
        Files Changed
        Commit graph MODIFY /icefaces2/trunk/icefaces/samples/compat/component-showcase/src/main/java/org/icefaces/application/showcase/util/StyleBean.java
        Deryk Sinotte created issue -
        Hide
        Deryk Sinotte added a comment -

        The solution is to programmatically get the application context and use that instead:

        ExternalContext ec = FacesContext.getCurrentInstance().getExternalContext();
        ec.redirect(ec.getRequestContextPath() + "/index.jsp");

        Show
        Deryk Sinotte added a comment - The solution is to programmatically get the application context and use that instead: ExternalContext ec = FacesContext.getCurrentInstance().getExternalContext(); ec.redirect(ec.getRequestContextPath() + "/index.jsp");
        Deryk Sinotte made changes -
        Field Original Value New Value
        Assignee Deryk Sinotte [ deryk.sinotte ]
        Hide
        Deryk Sinotte added a comment -

        Change was made and checked in. Marking as resolved.

        Show
        Deryk Sinotte added a comment - Change was made and checked in. Marking as resolved.
        Deryk Sinotte made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Fix Version/s 2.1-Beta [ 10291 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Deryk Sinotte
            Reporter:
            Deryk Sinotte
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: