Hi,

 

My codes looks as follow. But it doesn't work. Any Tipps?

 

<t:dataTable id="dataError" value="#{fileuploadBean.dataFormatErrorEntrySet}" 
var="dataError" border="1">

<t:column width="150">

<f:facet name="header">

<h:outputText value="#{bundle.table_header_linenNumber}" />

</f:facet>

<h:outputText value="#{dataError.key}"/>  

</t:column>

...

...

</t:dataTable>

 

Regards

 

Wei

 

 

-----Ursprüngliche Nachricht-----
Von: Volker Weber [mailto:[EMAIL PROTECTED] 
Gesendet: Freitag, 19. Januar 2007 12:11
An: MyFaces Discussion
Betreff: Re: HashMap and dataTable

 

Hi,

 

try:

 

<t:dataTable value="#{myHashMap.myhmEntrySet}" var="entry">

  <t:column>

    <t:outputText value="#{entry.key}" />

  </t:column>

  <t:column>

    <t:outputText value="#{entry.value}" />

  </t:column>

</t:dataTable>

 

Regards,

  Volker

 

2007/1/19, mathias °ö° <[EMAIL PROTECTED]>:

> 

> hi maik

> thanks for your answer

> 

> it works, but the jsf-page display this:

> 

> table:

> [Frage1=Antwort1, Frage3=Antwort3, Frage2=Antwort2, Frage4=Antwort4]

> [Frage1=Antwort1, Frage3=Antwort3, Frage2=Antwort2, Frage4=Antwort4]

> [Frage1=Antwort1, Frage3=Antwort3, Frage2=Antwort2, Frage4=Antwort4]

> [Frage1=Antwort1, Frage3=Antwort3, Frage2=Antwort2, Frage4=Antwort4]

> 

> my jsf-page:

> <t:outputText value="table:" />

> <t:dataTable value="#{myHashMap.myhmEntrySet}" var="entry">

> <t:column>

> <t:outputText value="#{myHashMap.myhmEntrySet}" />

> </t:column>

> </t:dataTable>

> 

> what is wrong?

> 

> 

> Mike Kienenberger wrote:

> >

> > UIData components operate on ordered lists.

> >

> > So the easiest thing to do would be to use something like this:

> >

> > <t:dataTable value="#{myHashMap.myhmEntrySetList}" var="entry">

> >

> > public List getMyhmEntrySetList() {

> >     return new java.util.ArrayList(myhm.entrySet());

> > }

> >

> >

> > On 1/18/07, mathias °ö° <[EMAIL PROTECTED]> wrote:

> >>

> >> hi all

> >>

> >> how can i access my HashMap (backing bean) in the jsf-page:

> >>

> >> <t:dataTable value="#{myHashMap.myhm}" var="table">

> >> <t:column value=""></t:column> <!-- Frage column -->

> >> <t:column value=""></t:column> <!-- Antwort column -->

> >> </t:dataTable>

> >>

> >> backing bean:

> >>

> >> public class MyHashMap {

> >>

> >> public HashMap <String, String> myhm = new HashMap<String, String>();

> >>

> >> public HashMap<String, String> getMyhm() {

> >>

> >> myhm.put("Frage1", "Antwort1");

> >> myhm.put("Frage2", "Antwort2");

> >> myhm.put("Frage3", "Antwort3");

> >> myhm.put("Frage4", "Antwort4");

> >>

> >> return myhm;

> >>

> >> }

> >>

> >> public void setMyhm(HashMap<String, String> myhm) {

> >> this.myhm = myhm;

> >>

> >> }

> >>

> >> }

> >>

> >> --

> >> View this message in context:

> >> http://www.nabble.com/HashMap-and-dataTable-tf3033822.html#a8429583

> >> Sent from the MyFaces - Users mailing list archive at Nabble.com.

> >>

> >>

> >

> >

> 

> --

> View this message in context: 
> http://www.nabble.com/HashMap-and-dataTable-tf3033822.html#a8446082

> Sent from the MyFaces - Users mailing list archive at Nabble.com.

> 

> 

Reply via email to