renderRowHeader problem

A place for users and developers of the Xataface to discuss and receive support.

renderRowHeader problem

Postby Martin Pruss » Mon Mar 26, 2012 3:08 am

Hi Steve ..
currently I am using Xataface # 1.3rc6
I'd like to style the main Table with the following function in the delegate class of that table:

Code: Select all
    function renderRowHeader( $tablename ){
        $table =& Dataface_Table::loadTable($tablename);
        $fields =& $table->fields();
        return '<th class="links" >'.$fields['id']['widget']['label'].'</th>'.
              '<th>'.$fields['datum']['widget']['label'].'</th>'.
              '<th>'.$fields['kundenname']['widget']['label'].'</th>'.
               '<th class="rechts">'.$fields['owner']['widget']['label'].'</th>';
    }


This works fine... but
now only the Table header shows ... the rest of the table is gone :(
what am I doing wrong?


cheers
Martin
Martin Pruss
 
Posts: 61
Joined: Tue Oct 23, 2007 2:22 pm
Location: Berlin

Re: renderRowHeader problem

Postby shannah » Mon Mar 26, 2012 9:27 am

I can think of no reason why this would happen. Check your error log
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: renderRowHeader problem

Postby Martin Pruss » Tue Mar 27, 2012 12:56 am

Hi Steve..
I checked the log ...error reporting is on but no entries.
The relevant parts of the Source Code of the website look like this:
Code: Select all
</tr><tr class="listing even "></tr><tr class="listing even " style="display:none" id="n_f?id=4868-row"><td colspan="1" id="n_f?id=4868-cell"></td>
                 </tr><tr class="listing odd "></tr><tr class="listing odd " style="display:none" id="n_f?id=4867-row"><td colspan="1" id="n_f?id=4867-cell"></td> etc..

Empty table rows and additionally there is the inline style : style="display:none"
I did a search on the xataface folder and the folder of my app to clarify where this line is coming from ... i found some, but none of them is related to
the rendering of a table.
Another mysterious thing is that this only happens when I override the rendering of the table header in the delegate class (description in the post above)

What else could I do to debug this?
cheers
Martin
Martin Pruss
 
Posts: 61
Joined: Tue Oct 23, 2007 2:22 pm
Location: Berlin

Re: renderRowHeader problem

Postby Martin Pruss » Thu Mar 29, 2012 2:44 am

This also happens on a fresh install with latest xf version and simple app generated by installer (extended with a delegate class for the table headers ..of course)
Martin Pruss
 
Posts: 61
Joined: Tue Oct 23, 2007 2:22 pm
Location: Berlin

Re: renderRowHeader problem

Postby shannah » Thu Mar 29, 2012 9:55 am

Upon looking into this problem more closely I see why this is happening. I could make some changes to make it work but, I think it is probably best, if you're going to implement the renderRowHeader() method that you also implement the renderRow() method because you need to ensure that the rows always output the same columns that the header outputs.

-Steve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: renderRowHeader problem

Postby Martin Pruss » Wed Apr 18, 2012 3:45 am

this works ..
Thanks
Martin
Martin Pruss
 
Posts: 61
Joined: Tue Oct 23, 2007 2:22 pm
Location: Berlin


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 49 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved