4

I want to direct "from-outcome" to some BIRT report file (with .rptdesign extension) but it append extension as .jsf. My navigation rule is,

<!-- home.xhtml page -->
<navigation-rule>
    <from-view-id>/home.xhtml</from-view-id>
    <!-- navigate to group report -->
    <navigation-case>
        <from-outcome>GROUP_REPORT</from-outcome>
        <to-view-id>frameset?__report=report/new_report_group.rptdesign&amp;__overwrite=true&amp;</to-view-id>
        <redirect>
            <view-param>
                <name>Job Location</name>
                <value>#{homeController.jobLocation}</value>
            </view-param>
        </redirect>
    </navigation-case>
</navigation-rule>

Then I got result URL as, http://192.168.3.111:8080/imc-report-system-1.0/frameset?__report=report%2Fnew_report_group.jsf&Job%20Location=abc but it should be as, http://192.168.3.111:8080/imc-report-system-1.0/frameset?__report=report%2Fnew_report_group.rptdesign&Job%20Location=abc Thanks.

Channa
  • 4,963
  • 14
  • 65
  • 97
  • I don't know whether that works or not but have tried removing `extension-mapping` in the `web.xml`? Mapping `FacesServlet` to `url-pattern` of `*` instead of `*.jsf`? – Bhesh Gurung Sep 06 '11 at 04:23
  • @BheshG, many thanks for the reply, but it is not working with that modification :(. Thanks. – Channa Sep 06 '11 at 06:06
  • As a fix I have rewrite the URL with Servlet Filter, but I don't think it is the optimize solution. – Channa Sep 06 '11 at 09:46

1 Answers1

4

You can't navigate to a non-JSF-view by a JSF navigation case.

Redirect yourself using ExternalContext#redirect().

public void submit() {
    // ...

    String url = "frameset"
        + "?__report=report%2Fnew_report_group.rptdesign"
        + "&amp;__overwrite=true"
        + "&amp;Job%20Location=" + jobLocation;

    FacesContext.getCurrentInstance().getExternalContext().redirect(url);
}
BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555