Hello all,
Can someone help me to look through this piece of code in which I can't seem to pass a data back to the backing bean using Seam's EL. Perhaps the error is in my data model for the DataModelSelection.
I have a page that display quotes that belong to an account which belongs to a customer. A customer however may have many accounts.
Customer 1----* Account 1----*Quote
On my page, I have
<c:forEach var="acct" items="#{acctQuotes}"> <rich:dataTable value="#{acct.quotes}" var="quote"> <rich:column> <s:link value="ABC" action="#{wcQuotesMgr.viewNews(quote)}" />
@Name("wcQuotesMgr") public class QuotesManagerBean implements QuotesManager { @DataModel("acctQuotes") private List<PortfolioQuote> acctQuotes; @DataModelSelection("acctQuotes") @Out(required = false) private PortfolioQuote portfolioQuote; public String viewNews(Quote quote) { // quote is not passed correctly. It is always null here }
public class PortfolioQuote implements Serializable { private static final long serialVersionUID = 1L; private Account account = null; @DataModel("quotes") private List<Quote> quotes = null; @DataModelSelection("quotes") @Out(required = false) private Quote quote; ... }
Use page parameters instead of extended EL (extended el can work oddly inside iterative components)