It's kinda hard to follow what you're doing without seeing some of the
java code and the page code.
Source code is included below.
Are you updating the value of subscriptionCategoryBean.subscriptions
in your category clicking action?
Yes. The point is, that the action CategoryBean:select() gets always called, with or without t:saveState, but
The action SubscriptionBean:select() gets called only if t:saveState is used.
I'd also recommend getting away from f:param unless you have a
specific reason to be using it. t:updateActionListener (you'll need
to download a facelets taghandler to support it) allows you to
directly set the value of a property on a bean from a constant or
another property.
This you have me to explain more in detail. A quick google search didn't show
me up anything why I should prefer using t:updateActionListener in place of
f:param.
At the end this isn't part of the problem, as setting the id with f:param does
work as expected - perfectly.
Beside there is a specific reason :-): I don't like to introduce proprietary
tags when there are standard ones.
Anyway, thanks for your ongoing help, it's not self-evident.
Patrick
Source code session
*******************
Ok, there we go, included are:
* index.jsf(.xhtml)
* category.jsf(.xhtml)
* subscription.jsf(.xhtml)
* PortalBean
* CategoryBean
* SubscriptionBean
* faces-config.xml
* web.xml
* tomahawk.taglib.xml
index.jsf(.xhtml)
=================
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:t="http://myfaces.apache.org/tomahawk">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"
/>
<title>Casamento dos Sonhos</title>
</head>
<body>
<h:messages />
<form jsfc="h:form">
<ul id="categories"
jsfc="t:dataList"
layout="unorderedList"
value="#{portalBean.categories}"
var="category">
<li jsfc="h:commandLink" action="#{categoryBean.select}"
immediate="true">
<f:param name="id" value="#{category.id}" />
#{category.name}
</li>
</ul>
</form>
<div id="announcements">
</div>
<div id="banners">
</div>
</body>
</html>
category.jsf(.xhtml)
====================
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:t="http://myfaces.apache.org/tomahawk">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"
/>
<title>Casamento dos Sonhos</title>
</head>
<body>
<h:messages />
<form jsfc="h:form">
<ul id="categories"
jsfc="t:dataList"
layout="unorderedList"
value="#{portalBean.categories}"
var="category">
<li jsfc="h:commandLink" action="#{categoryBean.select}"
immediate="true">
<f:param name="id" value="#{category.id}" />
#{category.name}
</li>
</ul>
<p>
<a jsfc="h:commandLink" action="#{subscriptionBean.select}"
immediate="true">
<f:param name="id" value="1" />
Test
</a>
</p>
<ul id="subscriptions"
jsfc="t:dataList"
layout="unorderedList"
value="#{categoryBean.subscriptions}"
var="subscription">
<li jsfc="h:commandLink" action="#{subscriptionBean.select}"
immediate="true">
<f:param name="id" value="#{subscription.id}" />
#{subscription.title}
</li>
</ul>
</form>
<t:saveState value="#{categoryBean}" />
</body>
</html>
subscription.jsf(.xhtml)
========================
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:t="http://myfaces.apache.org/tomahawk">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"
/>
<title>Casamento dos Sonhos</title>
</head>
<body>
<h:messages />
<form jsfc="h:form">
<ul id="categories"
jsfc="t:dataList"
layout="unorderedList"
value="#{portalBean.categories}"
var="category">
<li jsfc="h:commandLink" action="#{categoryBean.select}"
immediate="true">
<f:param name="id" value="#{category.id}" />
#{category.name}
</li>
</ul>
</form>
<p>
Title: #{subscriptionBean.entry.title}<br />
Text: #{subscriptionBean.entry.text}
</p>
<div id="banners">
</div>
</body>
</html>
PortalBean
==========
public class PortalBean implements Serializable
{
public PortalBean() {
try {
GetPortalCommand cmd =
CommandFactory.create(GetPortalCommand.class);
cmd.execute();
categories =
ResultSupport.toResult(cmd.getCategories());
channels = ResultSupport.toResult(cmd.getChannels());
} catch (CommandException e) {
// FIXME: Auto-generated catch block
e.printStackTrace();
}
}
public Result getCategories() {
return categories;
}
public Result getChannels() {
return channels;
}
private Result categories;
private Result channels;
private static final long serialVersionUID = -3960632327837492650L;
}
CategoryBean
============
public final class CategoryBean implements Serializable
{
public void setId(int id) {
this.id = id;
}
public String select() {
try {
log.debug("select()");
GetSubscriptionsCommand cmd =
CommandFactory.create(GetSubscriptionsCommand.class);
cmd.setCategoryId(id);
cmd.execute();
this.subscriptions =
ResultSupport.toResult(cmd.getSubscriptions());
return "category";
} catch (CommandException e) {
// FIXME: Auto-generated catch block
log.error("select(): ", e);
return "error";
}
}
public Result getSubscriptions() {
return subscriptions;
}
private int id;
private Result subscriptions;
private static final long serialVersionUID = -893321939122059551L;
private Logger log = Logger.getLogger(this.getClass());
}
SubscriptionBean
================
public final class SubscriptionBean implements Serializable
{
public void setId(int id) {
this.id = id;
}
public SubscriptionDTO getEntry() {
return entry;
}
public String select() {
try {
log.debug("select()");
GetSubscriptionCommand cmd =
CommandFactory.create(GetSubscriptionCommand.class);
cmd.setId(id);
cmd.execute();
entry = cmd.getEntry();
return "subscription";
} catch (CommandException e) {
// FIXME: Auto-generated catch block
e.printStackTrace();
log.error("select()", e);
return "error";
}
}
private int id;
private SubscriptionDTO entry;
private static final long serialVersionUID = -2007162911666368007L;
Logger log = Logger.getLogger(this.getClass());
}
web.xml
=======
<?xml version="1.0"?>
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name>CasamentoDosSonhos</display-name>
<!-- JavaServer Faces -->
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
<description>
State saving method: "client" or "server" (= default)
See
JSF Specification 2.5.2
</description>
</context-param>
<context-param>
<param-name>
org.apache.myfaces.COMPRESS_STATE_IN_SESSION
</param-name>
<param-value>false</param-value>
<description>
Compression of state in server. Default: "true"
</description>
</context-param>
<context-param>
<param-name>
org.apache.myfaces.SERIALIZE_STATE_IN_SESSION
</param-name>
<param-value>false</param-value>
<description>
Serialization of state, serialization and
deserialization of
the component tree is a major performance hit. Default:
"true"
</description>
</context-param>
<context-param>
<param-name>
org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION
</param-name>
<param-value>5</param-value>
<description>
Only applicable if state saving method is "server".
Defines the amount of the latest
views are stored in session. Default: 20
</description>
</context-param>
<!-- Apache MyFaces -->
<context-param>
<param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
<param-value>true</param-value>
<description>
This parameter tells MyFaces if javascript code should
be
allowed in the rendered HTML output. If javascript is
allowed, command_link anchors will have javascript code
that
submits the corresponding form. If javascript is not
allowed, the state saving info and nested parameters
will be
added as url parameters. Default: "true"
</description>
</context-param>
<context-param>
<param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
<param-value>false</param-value>
<description>
This is an EXPERIMENTAL feature, so leave it off for
now!
</description>
</context-param>
<context-param>
<param-name>org.apache.myfaces.PRETTY_HTML</param-name>
<param-value>true</param-value>
<description>
If true, rendered HTML code will be formatted, so that
it is
"human readable". i.e. additional line separators and
whitespace will be written, that do not influence the
HTML
code. Default: "true"
</description>
</context-param>
<context-param>
<param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
<param-value>false</param-value>
<description>
DON'T SET TO TRUE, AS THERE IS A BUG PREVENTING
commandLink
FROM WORKING!
If true, a javascript function will be rendered that is
able
to restore the former vertical scroll on every request.
Convenient feature if you have pages with long lists
and you
do not want the browser page to always jump to the top
if
you trigger a link or button action that stays on the
same
page. Default: "false"
</description>
</context-param>
<!-- Facelets -->
<context-param>
<param-name>facelets.DEVELOPMENT</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>facelets.LIBRARIES</param-name>
<param-value>/WEB-INF/tomahawk.taglib.xml</param-value>
</context-param>
<context-param>
<param-name>facelets.SKIP_COMMENTS</param-name>
<param-value>true</param-value>
<description>
If true, prevents HTML comments from being rendered. Default:
"false"
</description>
</context-param>
<!-- Apache Tomahawk -->
<filter>
<filter-name>ApacheTomahawk</filter-name>
<filter-class>
org.apache.myfaces.webapp.filter.ExtensionsFilter
</filter-class>
<init-param>
<param-name>uploadMaxFileSize</param-name>
<param-value>100m</param-value>
<description>
Set the size limit for uploaded files. Format:
10 - 10
bytes 10k - 10 KB 10m - 10 MB 1g - 1 GB
</description>
</init-param>
<init-param>
<param-name>uploadThresholdSize</param-name>
<param-value>100k</param-value>
<description>
Set the threshold size - files below this limit
are
stored in memory, files above this limit are
stored on
disk. Format: 10 - 10 bytes 10k - 10 KB 10m -
10 MB 1g -
1 GB
</description>
</init-param>
<init-param>
<param-name>uploadRepositoryPath</param-name>
<param-value>/upload</param-value>
<description>
Set the path where the intermediary files will
be
stored.
</description>
</init-param>
</filter>
<!-- Apache Tomahawk mapping -->
<filter-mapping>
<filter-name>ApacheTomahawk</filter-name>
<url-pattern>*.xhtml</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>ApacheTomahawk</filter-name>
<url-pattern>/faces/*</url-pattern>
</filter-mapping>
<!-- JavaServer Faces Servlet -->
<servlet>
<servlet-name>JSF</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<!-- JavaServer Faces Servlet Mapping -->
<servlet-mapping>
<servlet-name>JSF</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<!-- Welcome files -->
<welcome-file-list>
<welcome-file>index.jsf</welcome-file>
</welcome-file-list>
</web-app>
faces-config.xml
================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE faces-config PUBLIC
"-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
"http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
<faces-config xmlns="http://java.sun.com/JSF/Configuration">
<application>
<view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
</application>
<managed-bean>
<managed-bean-name>portalBean</managed-bean-name>
<managed-bean-class>br.com.casamentodossonhos.presentation.portal.PortalBean
</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
<managed-bean>
<managed-bean-name>categoryBean</managed-bean-name>
<managed-bean-class>br.com.casamentodossonhos.presentation.portal.CategoryBean
</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
<managed-property>
<property-name>id</property-name>
<property-class>int</property-class>
<value>#{param.id}</value>
</managed-property>
</managed-bean>
<managed-bean>
<managed-bean-name>subscriptionBean</managed-bean-name>
<managed-bean-class>br.com.casamentodossonhos.presentation.portal.SubscriptionBean
</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
<managed-property>
<property-name>id</property-name>
<property-class>int</property-class>
<value>#{param.id}</value>
</managed-property>
</managed-bean>
<navigation-rule>
<display-name>Error</display-name>
<from-view-id>*</from-view-id>
<navigation-case>
<from-outcome>error</from-outcome>
<to-view-id>/error.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<display-name>index.xhtml</display-name>
<from-view-id>/index.xhtml</from-view-id>
<navigation-case>
<from-outcome>category</from-outcome>
<to-view-id>/category.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<display-name>category.xhtml</display-name>
<from-view-id>/category.xhtml</from-view-id>
<navigation-case>
<from-outcome>category</from-outcome>
<to-view-id>/category.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<display-name>category.xhtml</display-name>
<from-view-id>/category.xhtml</from-view-id>
<navigation-case>
<from-outcome>subscription</from-outcome>
<to-view-id>/subscription.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<display-name>subscription.xhtml</display-name>
<from-view-id>/subscription.xhtml</from-view-id>
<navigation-case>
<from-outcome>category</from-outcome>
<to-view-id>/category.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
</faces-config>
tomahawk.taglib.xml
===================
<?xml version="1.0"?>
<!DOCTYPE facelet-taglib PUBLIC
"-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN"
"facelet-taglib_1_0.dtd">
<facelet-taglib>
<!-- author: [EMAIL PROTECTED] -->
<namespace>http://myfaces.apache.org/tomahawk</namespace>
<tag>
<tag-name>commandButton</tag-name>
<component>
<component-type>org.apache.myfaces.HtmlCommandButton</component-type>
<renderer-type>org.apache.myfaces.Button</renderer-type>
</component>
</tag>
<tag>
<tag-name>commandLink</tag-name>
<component>
<component-type>org.apache.myfaces.HtmlCommandLink</component-type>
<renderer-type>org.apache.myfaces.Link</renderer-type>
</component>
</tag>
<tag>
<tag-name>dataTable</tag-name>
<component>
<component-type>org.apache.myfaces.HtmlDataTable</component-type>
<renderer-type>org.apache.myfaces.Table</renderer-type>
</component>
</tag>
<tag>
<tag-name>inputHidden</tag-name>
<component>
<component-type>org.apache.myfaces.HtmlInputHidden</component-type>
</component>
</tag>
<tag>
<tag-name>inputSecret</tag-name>
<component>
<component-type>org.apache.myfaces.HtmlInputSecret</component-type>
<renderer-type>org.apache.myfaces.Secret</renderer-type>
</component>
</tag>
<tag>
<tag-name>inputText</tag-name>
<component>
<component-type>org.apache.myfaces.HtmlInputText</component-type>
<renderer-type>org.apache.myfaces.Text</renderer-type>
</component>
</tag>
<tag>
<tag-name>inputTextHelp</tag-name>
<component>
<component-type>org.apache.myfaces.HtmlInputTextHelp</component-type>
<renderer-type>org.apache.myfaces.TextHelp</renderer-type>
</component>
</tag>
<tag>
<tag-name>inputTextarea</tag-name>
<component>
<component-type>org.apache.myfaces.HtmlInputTextarea</component-type>
<renderer-type>org.apache.myfaces.Textarea</renderer-type>
</component>
</tag>
<tag>
<tag-name>graphicImage</tag-name>
<component>
<component-type>org.apache.myfaces.HtmlGraphicImage</component-type>
<renderer-type>org.apache.myfaces.Image</renderer-type>
</component>
</tag>
<tag>
<tag-name>message</tag-name>
<component>
<component-type>org.apache.myfaces.HtmlMessage</component-type>
<renderer-type>org.apache.myfaces.Message</renderer-type>
</component>
</tag>
<tag>
<tag-name>messages</tag-name>
<component>
<component-type>org.apache.myfaces.HtmlMessages</component-type>
<renderer-type>org.apache.myfaces.Messages</renderer-type>
</component>
</tag>
<tag>
<tag-name>outputLabel</tag-name>
<component>
<component-type>org.apache.myfaces.HtmlOutputLabel</component-type>
</component>
</tag>
<tag>
<tag-name>outputText</tag-name>
<component>
<component-type>org.apache.myfaces.HtmlOutputText</component-type>
<renderer-type>org.apache.myfaces.Text</renderer-type>
</component>
</tag>
<tag>
<tag-name>panelGrid</tag-name>
<component>
<component-type>org.apache.myfaces.HtmlPanelGrid</component-type>
<renderer-type>org.apache.myfaces.Grid</renderer-type>
</component>
</tag>
<tag>
<tag-name>panelGroup</tag-name>
<component>
<component-type>org.apache.myfaces.HtmlPanelGroup</component-type>
<renderer-type>org.apache.myfaces.Group</renderer-type>
</component>
</tag>
<tag>
<tag-name>selectOneMenu</tag-name>
<component>
<component-type>org.apache.myfaces.HtmlSelectOneMenu</component-type>
<renderer-type>org.apache.myfaces.Menu</renderer-type>
</component>
</tag>
<tag>
<tag-name>selectManyMenu</tag-name>
<component>
<component-type>org.apache.myfaces.HtmlSelectManyMenu</component-type>
<renderer-type>org.apache.myfaces.Menu</renderer-type>
</component>
</tag>
<tag>
<tag-name>selectOneRadio</tag-name>
<component>
<component-type>org.apache.myfaces.HtmlSelectOneRadio</component-type>
<renderer-type>org.apache.myfaces.Radio</renderer-type>
</component>
</tag>
<tag>
<tag-name>selectBooleanCheckbox</tag-name>
<component>
<component-type>org.apache.myfaces.HtmlSelectBooleanCheckbox</component-type>
<renderer-type>org.apache.myfaces.Checkbox</renderer-type>
</component>
</tag>
<tag>
<tag-name>selectManyCheckbox</tag-name>
<component>
<component-type>org.apache.myfaces.HtmlSelectManyCheckbox</component-type>
<renderer-type>org.apache.myfaces.Checkbox</renderer-type>
</component>
</tag>
<tag>
<tag-name>selectOneListbox</tag-name>
<component>
<component-type>org.apache.myfaces.HtmlSelectOneListbox</component-type>
<renderer-type>org.apache.myfaces.Listbox</renderer-type>
</component>
</tag>
<tag>
<tag-name>selectManyListbox</tag-name>
<component>
<component-type>org.apache.myfaces.HtmlSelectManyListbox</component-type>
<renderer-type>org.apache.myfaces.Listbox</renderer-type>
</component>
</tag>
<tag>
<tag-name>inputCalendar</tag-name>
<component>
<component-type>org.apache.myfaces.HtmlInputCalendar</component-type>
</component>
</tag>
<tag>
<tag-name>jsValueChangeListener</tag-name>
<component>
<component-type>org.apache.myfaces.JsValueChangeListener</component-type>
</component>
</tag>
<tag>
<tag-name>jsValueSet</tag-name>
<component>
<component-type>org.apache.myfaces.HtmlJsValueSet</component-type>
</component>
</tag>
<tag>
<tag-name>checkbox</tag-name>
<component>
<component-type>org.apache.myfaces.HtmlCheckbox</component-type>
</component>
</tag>
<tag>
<tag-name>commandNavigation</tag-name>
<component>
<component-type>org.apache.myfaces.HtmlCommandNavigation</component-type>
<renderer-type>org.apache.myfaces.Navigation</renderer-type>
</component>
</tag>
<tag>
<tag-name>commandNavigation2</tag-name>
<component>
<component-type>org.apache.myfaces.HtmlCommandNavigationItem</component-type>
<renderer-type>org.apache.myfaces.NavigationMenu</renderer-type>
</component>
</tag>
<tag>
<tag-name>commandSortHeader</tag-name>
<component>
<component-type>org.apache.myfaces.HtmlCommandSortHeader</component-type>
<renderer-type>org.apache.myfaces.SortHeader</renderer-type>
</component>
</tag>
<tag>
<tag-name>dataList</tag-name>
<component>
<component-type>org.apache.myfaces.HtmlDataList</component-type>
</component>
</tag>
<tag>
<tag-name>dataScroller</tag-name>
<component>
<component-type>org.apache.myfaces.HtmlDataScroller</component-type>
</component>
</tag>
<tag>
<tag-name>inputDate</tag-name>
<component>
<component-type>org.apache.myfaces.HtmlInputDate</component-type>
</component>
</tag>
<tag>
<tag-name>inputFileUpload</tag-name>
<component>
<component-type>org.apache.myfaces.HtmlInputFileUpload</component-type>
</component>
</tag>
<tag>
<tag-name>inputHtml</tag-name>
<component>
<component-type>org.apache.myfaces.InputHtml</component-type>
</component>
</tag>
<tag>
<tag-name>navigationMenuItem</tag-name>
<component>
<component-type>org.apache.myfaces.NavigationMenuItem</component-type>
</component>
</tag>
<tag>
<tag-name>navigationMenuItems</tag-name>
<component>
<component-type>javax.faces.SelectItems</component-type>
</component>
</tag>
<tag>
<tag-name>jscookMenu</tag-name>
<component>
<component-type>org.apache.myfaces.JSCookMenu</component-type>
</component>
</tag>
<tag>
<tag-name>panelLayout</tag-name>
<component>
<component-type>org.apache.myfaces.HtmlPanelLayout</component-type>
</component>
</tag>
<tag>
<tag-name>panelNavigation</tag-name>
<component>
<component-type>org.apache.myfaces.HtmlPanelNavigation</component-type>
</component>
</tag>
<tag>
<tag-name>panelNavigation2</tag-name>
<component>
<component-type>org.apache.myfaces.HtmlPanelNavigationMenu</component-type>
<renderer-type>org.apache.myfaces.NavigationMenu</renderer-type>
</component>
</tag>
<tag>
<tag-name>panelTab</tag-name>
<component>
<component-type>org.apache.myfaces.HtmlPanelTab</component-type>
</component>
</tag>
<tag>
<tag-name>panelTabbedPane</tag-name>
<component>
<component-type>org.apache.myfaces.HtmlPanelTabbedPane</component-type>
</component>
</tag>
<!-- deactivated since there's no component! tag>
<tag-name>tabChangeListener</tag-name>
<component>
<component-type></component-type>
</component>
</tag-->
<tag>
<tag-name>collapsiblePanel</tag-name>
<component>
<component-type>org.apache.myfaces.HtmlCollapsiblePanel</component-type>
</component>
</tag>
<tag>
<tag-name>selectOneCountry</tag-name>
<component>
<component-type>org.apache.myfaces.SelectOneCountry</component-type>
</component>
</tag>
<tag>
<tag-name>selectOneLanguage</tag-name>
<component>
<component-type>org.apache.myfaces.SelectOneLanguage</component-type>
</component>
</tag>
<tag>
<tag-name>stylesheet</tag-name>
<component>
<component-type>org.apache.myfaces.Stylesheet</component-type>
</component>
</tag>
<tag>
<tag-name>div</tag-name>
<component>
<component-type>org.apache.myfaces.Div</component-type>
</component>
</tag>
<tag>
<tag-name>htmlTag</tag-name>
<component>
<component-type>org.apache.myfaces.HtmlTag</component-type>
</component>
</tag>
<tag>
<tag-name>radio</tag-name>
<component>
<component-type>org.apache.myfaces.HtmlRadio</component-type>
</component>
</tag>
<tag>
<tag-name>tree</tag-name>
<component>
<component-type>org.apache.myfaces.HtmlTree</component-type>
<renderer-type>org.apache.myfaces.HtmlTree</renderer-type>
</component>
</tag>
<!-- deactivated since there's no component! tag>
<tag-name>treeSelectionListener</tag-name>
<component>
<component-type></component-type>
</component>
</tag-->
<!-- deactivated since there's no component! tag>
<tag-name>iconProvider</tag-name>
<component>
<component-type></component-type>
</component>
</tag-->
<tag>
<tag-name>treeColumn</tag-name>
<component>
<component-type>org.apache.myfaces.HtmlTreeColumn</component-type>
</component>
</tag>
<tag>
<tag-name>treeCheckbox</tag-name>
<component>
<component-type>org.apache.myfaces.HtmlTreeCheckbox</component-type>
</component>
</tag>
<tag>
<tag-name>tree2</tag-name>
<component>
<component-type>org.apache.myfaces.HtmlTree2</component-type>
</component>
</tag>
<tag>
<tag-name>panelStack</tag-name>
<component>
<component-type>org.apache.myfaces.HtmlPanelStack</component-type>
</component>
</tag>
<tag>
<tag-name>popup</tag-name>
<component>
<component-type>org.apache.myfaces.HtmlPopup</component-type>
</component>
</tag>
<tag>
<tag-name>newspaperTable</tag-name>
<component>
<component-type>org.apache.myfaces.HtmlNewspaperTable</component-type>
</component>
</tag>
<tag>
<tag-name>aliasBean</tag-name>
<component>
<component-type>org.apache.myfaces.AliasBean</component-type>
</component>
</tag>
<tag>
<tag-name>aliasBeansScope</tag-name>
<component>
<component-type>org.apache.myfaces.AliasBeansScope</component-type>
</component>
</tag>
<tag>
<tag-name>buffer</tag-name>
<component>
<component-type>org.apache.myfaces.Buffer</component-type>
</component>
</tag>
<tag>
<tag-name>saveState</tag-name>
<component>
<component-type>org.apache.myfaces.SaveState</component-type>
</component>
</tag>
<!-- deactivated since there's no component! tag>
<tag-name>updateActionListener</tag-name>
<component>
<component-type></component-type>
</component>
</tag-->
<tag>
<tag-name>validateCreditCard</tag-name>
<validator>
<validator-id>org.apache.myfaces.validator.CreditCard</validator-id>
</validator>
</tag>
<tag>
<tag-name>validateEmail</tag-name>
<validator>
<validator-id>org.apache.myfaces.validator.Email</validator-id>
</validator>
</tag>
<tag>
<tag-name>validateEqual</tag-name>
<validator>
<validator-id>org.apache.myfaces.validator.Equal</validator-id>
</validator>
</tag>
<tag>
<tag-name>swapImage</tag-name>
<component>
<component-type>org.apache.myfaces.HtmlSwapImage</component-type>
</component>
</tag>
<tag>
<tag-name>columns</tag-name>
<component>
<component-type>org.apache.myfaces.HtmlColumns</component-type>
</component>
</tag>
<tag>
<tag-name>column</tag-name>
<component>
<component-type>org.apache.myfaces.HtmlColumn</component-type>
</component>
</tag>
<!-- additional validators (note: not in tld, so no code completion) -->
<tag>
<tag-name>validateRegExpr</tag-name>
<validator>
<validator-id>org.apache.myfaces.validator.RegExpr</validator-id>
</validator>
</tag>
</facelet-taglib>
On 9/20/06, Patrick Dreyer <[EMAIL PROTECTED]> wrote:
As suggested by Mike, I tried with t:saveState, which solved one problem but
generates an other :-/
I put the project online, so you can play around to see the effects.
1) http://ledz.com.br/CasamentoDosSonhos/index2.jsf
* with NO t:saveState
* Subscription list gets repopulated on every category click
* Links to subscription details do not work <- THE PROBLEM
2) http://ledz.com.br/CasamentoDosSonhos/index.jsf
* WITH t:saveState
* Link to subscription details works <- cool, works now
* Subscription list isn't repopulated upon category clicks <- the NEW problem
As you can see, the "Test link" always works and shows the subscription 1.
And now comes what you sure know:
I need the subscription list being repopulated on every category click AND the
links to the subscription details working.
Any ideas? Thanks in advance
Patrick
Mike Kienenberger schrieb:
Is #{subscriptionCategoryBean.subscriptions} request-scoped? If so,
try using t:saveState to persist it across a page, or change it to
session-scoped, or use some other persisting mechanism.
On 9/15/06, Patrick Dreyer <[EMAIL PROTECTED]> wrote:
Hi,
I don't like the prosa form and so:
* Tomcat 5.5.17
* MyFaces 1.1.3
* Tomahawk 1.1.3
* Page with two dataList; subscriptionCategories and subscriptions
* Links of subscriptionCategories work fine
* Links of subscriptions don't work at all; action doesn't get called
* Using dataTable for subscriptions doesn't work either
* Put each list in a separate form doesn't work either
* "Test" link (between the two lists) works as expected; action gets called,
navigation to other page
* Static values in "Test" link and subscriptions only for testing purposes
Any ideas? Thanks
Patrick
Page snippet:
<body>
<h:messages />
<form jsfc="h:form">
<ul id="subscriptionCategories"
jsfc="t:dataList"
layout="unorderedList"
value="#{portalBean.subscriptionCategories}"
var="subscriptionCategory">
<li jsfc="h:commandLink"
action="#{subscriptionCategoryBean.select}">
<f:param name="id" value="#{subscriptionCategory.id}" />
#{subscriptionCategory.name}
</li>
</ul>
<p>
<a jsfc="h:commandLink" action="#{subscriptionBean.select}">
<f:param name="id" value="1" />
Test
</a>
</p>
<ul id="subscriptions"
jsfc="t:dataList"
layout="unorderedList"
value="#{subscriptionCategoryBean.subscriptions}"
var="subscription">
<li jsfc="h:commandLink" action="#{subscriptionBean.select}">
<f:param name="id" value="1" />
#{subscription.title}
</li>
</ul>
</form>
</body>