You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Will Norman <jw...@clemson.edu> on 2007/03/03 21:01:26 UTC
and problems
I am using <t:dataTable> and <t:columns> to dynamically generate a data
table with various column column counts. I am generating the columns
correctly, but the row values aren't correct. Instead of building the
rows I seem to be getting some sort of hex value, perhaps a mem location?
Here is the output that I am getting:
Time MKKK_P MAPK
[D@30cd64 [D@30cd64 [D@30cd64
[D@4c2849 [D@4c2849 [D@4c2849
[D@675039 [D@675039 [D@675039
For this page:
<html>
<body>
<f:view>
<t:dataTable value="#{myBean.mySim.simResults}" var="row" >
<t:columns value="#{myBean.mySim.columnHeads}" var="col" >
<f:facet name="header">
<h:outputText value="#{col}" />
</f:facet>
<h:outputText value="#{row.value}" />
</t:columns>
</t:dataTable>
</f:view>
</body>
</html>
simResults is a linked list of the class SimResult, which has members:
public String sbmlID;
public String sbmlType;
public int numTimepoints;
public double[] value;
private int index= 0;
I have a get function for value:
public double[] getValue() {
return value;
}
I debuged to check that the value array is being filled correctly,
and it is.
Does anyone know what might be causing the problem. Is my JSF code
correct? This is the first time that I have tried to use a
<t:dataTable> with <t:columns>.
Thanks in advance.
Will
Re: and problems
Posted by Mike Kienenberger <mk...@gmail.com>.
<h:outputText value="#{row.value}" />
row.getValue() returns an array of Doubles.
That's what you're seeing -- "D@30cd64" is an array of doubles.
You probably want to do something like
<h:outputText value="#{row.value[col-index-of-some-sort]}" />
On 3/3/07, Will Norman <jw...@clemson.edu> wrote:
> I am using <t:dataTable> and <t:columns> to dynamically generate a data
> table with various column column counts. I am generating the columns
> correctly, but the row values aren't correct. Instead of building the
> rows I seem to be getting some sort of hex value, perhaps a mem location?
>
> Here is the output that I am getting:
>
> Time MKKK_P MAPK
> [D@30cd64 [D@30cd64 [D@30cd64
> [D@4c2849 [D@4c2849 [D@4c2849
> [D@675039 [D@675039 [D@675039
>
>
> For this page:
>
> <html>
>
> <body>
> <f:view>
> <t:dataTable value="#{myBean.mySim.simResults}" var="row" >
> <t:columns value="#{myBean.mySim.columnHeads}" var="col" >
> <f:facet name="header">
> <h:outputText value="#{col}" />
> </f:facet>
> <h:outputText value="#{row.value}" />
> </t:columns>
> </t:dataTable>
>
> </f:view>
> </body>
> </html>
>
> simResults is a linked list of the class SimResult, which has members:
>
> public String sbmlID;
> public String sbmlType;
> public int numTimepoints;
> public double[] value;
> private int index= 0;
>
> I have a get function for value:
>
> public double[] getValue() {
> return value;
> }
>
> I debuged to check that the value array is being filled correctly,
> and it is.
>
> Does anyone know what might be causing the problem. Is my JSF code
> correct? This is the first time that I have tried to use a
> <t:dataTable> with <t:columns>.
>
> Thanks in advance.
>
> Will
>
>