[JBoss Seam] - working with a dynamically sized Datamodel with JSF/SEAM
by asookazian
using SEAM 1.2.1.GA and JBoss 4.0.5.GA.
working with a callableStatement to a legacy stored proc in SQL SERVER db. need to know how to display the resultset data from the sproc in a JSF.
the sproc builds the resultset based on the number of currently available user roles (which is unknown to the JSF before the DAO method is exec'd).
Is it possible for the JSF xhtml to count the # of columns in the List that is returned (outjected) by the following code snippet and build the columns by referencing column numbers rather than names? I do not know the final list of column names until after the sproc is exec'd.
Is there something similar to getColumnName(int columnNumber) method in the java.sql.ResultSet API? I didn't see one...
Generally speaking, how are dynamic Datatables handled in Seam when you don't know the final column count?
@DataModel
| List<SelectItem> myRoles = new ArrayList<SelectItem>();
<h:dataTable var="myRole" value="#{myRoles}" rendered="#{userRoleSearch.displayViewRolesDataTable}">
| <h:column>
| <f:facet name="header">
| <h:outputText value="???"/>
| </f:facet>
| <h:outputText value="???"/>
| </h:column>
| <h:column>
| <f:facet name="header">
| <h:outputText value="???"/>
| </f:facet>
| <h:outputText value="???"/>
| </h:column>
| </h:dataTable>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4081515#4081515
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4081515
18 years, 7 months
[JBoss Seam] - s:formattedText parser problem?
by dexjam
Hello i try to use s:formattedText, but what happens if the Input Syntax is not correct, e.g. i forgot to set a second (or third) * i retrieve an XML error like this:
<b>Hello</b> World<b></p>
| --------------------------------------^
The syntax used to produce this error was:
*Hello* World*
So is there any way to have the string that will be rendered checked if the syntax is well balanced before displaying it? Or is there some flag, that sort of "auto balances" the whole thing?
Or maybe i can call some backend function from somewhere within the deep underground of UI component classes or a validator or whatever to avoid that type of error?
Any comments on this would be appreciated of course ;)
Jens
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4081513#4081513
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4081513
18 years, 7 months