It's more possible, but still not as easy as you want it to be.
Your example shows two different sets of columns.
dataTable requires a static set of columns.

You might be able to do this by switching to the myfaces tomahawk t:dataTable and using a t:columns (with an "s") object.

http://myfaces.apache.org/tomahawk/columns.html
http://wiki.apache.org/myfaces/Dynamic_Columns

t:columns allows you to dynamically specify the number of columns.

Perhaps you could set it up so that it shows one set of h:column components for one kind of data row, and another set of h:column components for a different kind of data row by specifying the "rendered" attribute based on your data row data type.   However, I've never tried this.

Maybe you could do the same thing with a rendered attribute on a regular column, but I haven't tried that either.

On 9/29/05, [EMAIL PROTECTED] <[EMAIL PROTECTED] > wrote:
Yes I need this one:
 
<table>
    <tr><td>1st row from first data set</td></tr>
    <tr><td>
        <table>
            <tr><td>1st row from 2nd data set</td></tr>
            <tr><td>2nd row from 2nd data set</td></tr>
            <tr><td>3rd row from 2nd data set</td></tr>
        </table>
    </td></tr>
</table>
 
Is this possible?

-----Ursprüngliche Nachricht-----
Von: Mike Kienenberger [mailto:[EMAIL PROTECTED]]
Gesendet: Donnerstag, 29. September 2005 09:29
An: users@myfaces.apache.org
Cc: Mitter Andreas, IDE

Betreff: Re: h:Datatable nested in another h:Datatable in own row -->HOWTO?

It's not clear from your picture what you're trying to do.
It's sounding like you want this kind of output:

<table>
    <tr><td>1st row from first data set</td></tr>
    <tr><td>2nd row from first data set</td></tr>
    <tr><td>1st row from 2nd data set</td></tr>
    <tr><td>2nd row from 2nd data set</td></tr>
    <tr><td>3rd row from 2nd data set</td></tr>
</table>

That's not possible with a dataTable component.

Maybe I'm misunderstanding, and you're really asking for this, however,

<table>
    <tr><td>1st row from first data set</td></tr>
    <tr><td>2nd row from first data set</td></tr>
    <tr><td>
        <table>
            <tr><td>1st row from 2nd data set</td></tr>
            <tr><td>2nd row from 2nd data set</td></tr>
            <tr><td>3rd row from 2nd data set</td></tr>
        </table>
    </td></tr>
</table>

On 9/29/05, [EMAIL PROTECTED] <[EMAIL PROTECTED] > wrote:
Hi! Thx for your reply:
 
To Martin:
I need the second datatable in a second row..Like you see it on the screenshot. If I can't use a panelgrid, how else can I do that?
 
To Mike:
I don't know what you mean... I want a Table with at least 2 rows. In the first row there are 3 columns of the first Datatable. In the second row there are some other rows of the second datatable. The second datatable is dependent to the first datatable...
 
Thx for help!
Regards,
Andy
-----Ursprüngliche Nachricht-----
Von: Mike Kienenberger [mailto:[EMAIL PROTECTED]]
Gesendet: Mittwoch, 28. September 2005 18:40
An: MyFaces Discussion; [EMAIL PROTECTED]
Betreff: Re: h:Datatable nested in another h:Datatable in own row -->HOWTO?

Also, it's going to end up as a table with a row containing another table rather than merging all of the rows together into one table.

It's unclear from your example if that's what you want.

On 9/28/05, Martin Marinschek <[EMAIL PROTECTED] > wrote:
Only h:column elements may be children of h:dataTable elements - so you need to wrap your dataTable into one of these columns - and not use a panelGrid in between.

regards,

Martin


On 9/28/05, [EMAIL PROTECTED] < [EMAIL PROTECTED]> wrote:

I want to display a h:dataTable inside another h:datatable. The second h:dataTable should be in an OWN Row. How can I do that. I tried to work with h:panelGrid and h:panelGroup but that didn't work.

Here is the code I tried:
                                <h:dataTable
                                        value="#{detailsDto.queryresultLieferanten}" var= "rowLief"
                                        headerClass="kopf" columnClasses="ungerade, gerade"
                                        styleClass="smalltable_grey"
                                        rendered="#{detailsDto.b_showlieferanten}" >
                                        <h:panelGrid columns ="2">
                                                <h:panelGroup id ="master">
                                                        <h:column>
                                                                <f:facet name ="header">
                                                                        <h:outputText value ="#{msg.tablelfnr}" />
                                                                </f:facet>
                                                                <h:inputText id ="lflfnr" value= "#{rowLief[0]}" size= "10"

                                                                        readonly="true" styleClass="show" />
                                                        </h:column>

                                                        ...

                                                </h:panelGroup>
                                                <h:panelGroup id ="detail">
                                                        <h:column>
                                                                <h:dataTable value ="#{detailsDto.queryresultLieferantenDetail}"

                                                                        var="rowLiefDetail" headerClass="kopf"
                                                                        columnClasses="ungerade, gerade" styleClass="smalltable_grey"

                                                                        rendered="#{detailsDto.b_showlieferanten}" >

                                                                        <h:column>
                                                                                <f:facet name ="header">
                                                                                        <h:outputText value ="#{msg.tablewerk}" />

                                                                                </f:facet>
                                                                                <h:inputText id ="lfwerk" value= "#{rowLiefDetail[0]}" size= "10"

                                                                                        readonly="true" styleClass="show" />

                                                                        </h:column>

                                                                        ...

                                                                </h:dataTable>
                                                        </h:column>
                                                </h:panelGroup>
                                        </h:panelGrid>
                                </h:dataTable>

At the end it should look like this:

ole0.bmp

Thx for help!

Regards,
Andy




--

http://www.irian.at
Your JSF powerhouse -
JSF Trainings in English and German


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system manager. This footnote also confirms that this email message has been swept for the presence of computer viruses. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system manager. This footnote also confirms that this email message has been swept for the presence of computer viruses. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Reply via email to