ChrisC wrote:
> Hi
>
> I have 5 panels each of which will show data from a database.
> I want to filter the records according to product type and have tried
> putting a <jsp:param> in as follows.
>
> <t:panelTab label="tab1">
> <f:subview id="inc1">
> <jsp:include page="products.jsp" flush="false">
> <jsp:param name="filter" value="all" />
> </jsp:include>
> </f:subview>
> </t:panelTab>
>
> In my backing bean I have:
>
> FacesContext facesContext = FacesContext.getCurrentInstance();
> Map params = facesContext.getExternalContext().getRequestParameterMap();
> String filter = (String) params.get("filter");
>
> but filter is always null.
>
> I have looked at <f:parameter> as well bnut this throws an error.
>
> Is there any way of controlling the contents of a tabbedpanel in this wah or
> do I have to point to a different page for each tab which would involve
> duplication.
>
> Any assistance greatly appreciated as usual :-)
>
Sorry for the delay. Basically, the reason you're not seeing the
request parameter from the
jsp:include is because the RequestParameterMap instance you're using
is from the original request which won't expose any parameters from the
include.
What version of JSP are you using? An alternate approach might be
exposing your
include JSP as a JSP 2.0 tag file (a template of sorts) to which you can
pass parameters
as a tag file is used like a standard JSP tag.