[jboss-user] [JBoss Seam] - Re: binding UIData and Seam
christian.bauer@jboss.com
do-not-reply at jboss.com
Wed Apr 4 13:47:11 EDT 2007
You can bind it to an EVENT scoped component if you just need the index:
| <h:dataTable value="#{wikiTextAttachments}" var="link" style="width:450px;"
| binding="#{wikiUtil.datatable}"
| styleClass="datatable rightBorder leftBorder topBorder bottomBorder"
| headerClass="regularHeader alignLeft"
| columnClasses="fivePercentColumn alignLeft, defaultColumn alignLeft"
| rowClasses="rowOdd,rowEven"
| cellpadding="0" cellspacing="0" border="0">
| <h:column>
| <f:facet name="header">Attachments:</f:facet>
| <h:panelGrid columns="3" columnClasses="onePercentColumn alignRight, onePercentColumn alignLeft, onePercentColumn alignRight">
| <s:span><a name="attachment#{wikiUtil.datatable.rowIndex + 1}"/></s:span>
| <h:outputText value="# #{wikiUtil.datatable.rowIndex + 1}"/>
| <h:graphicImage value="/themes/#{globalPrefs.themeName}/img/#{fileMetaMap[link.node.contentType].displayIcon}"
| width="18" height="20"/>
| </h:panelGrid>
| </h:column>
|
| @Name("wikiUtil")
| public class WikiUtil {
|
|
| /**
| * Need to bind UI components to non-conversational backing beans.
| * That this is even needed makes no sense. Why can't I call the UI components
| * in the EL directly? Don't try #{components['id']}, it won't work.
| */
| private UIData datatable;
| public UIData getDatatable() { return datatable; }
| public void setDatatable(UIData datatable) { this.datatable = datatable; }
|
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4034711#4034711
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4034711
More information about the jboss-user
mailing list