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

        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");
        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.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: