This content has been marked as final.
Show 4 replies
-
1. Re: just a simple alignment problem
panky_p Jul 2, 2009 8:35 AM (in response to hrbaer)can you try
style="float: right;"
on your commandButton and for border you will need to inspect it in firebug or generated html code it may possible the border is not getting applied to panelGrid. -
2. Re: just a simple alignment problem
hrbaer Jul 2, 2009 9:34 AM (in response to hrbaer)Doesn't have any effect.
This is the rendered HTML-Code:<table class="dr-table rich-table " id="hauptkag:hauptkagForm:j_id_id16" border="0" cellpadding="0" cellspacing="0" width="70%"> <colgroup span="3"></colgroup> <thead class="dr-table-thead"> <tr class="dr-table-subheader rich-table-subheader "> <th class="dr-table-subheadercell rich-table-subheadercell " scope="col" id="hauptkag:hauptkagForm:j_id_id16:j_id_id26header"> <div id="hauptkag:hauptkagForm:j_id_id16:j_id_id26header:sortDiv">Anzahl</div> </th> <th class="dr-table-subheadercell rich-table-subheadercell " scope="col" id="hauptkag:hauptkagForm:j_id_id16:j_id_id26header"> <div id="hauptkag:hauptkagForm:j_id_id16:j_id_id26header:sortDiv">xy</div> </th> </tr> </thead> <tbody id="hauptkag:hauptkagForm:j_id_id16:tb"> <tr class="dr-table-row rich-table-row dr-table-firstrow rich-table-firstrow "> <td class="dr-table-cell rich-table-cell " id="hauptkag:hauptkagForm:j_id_id16:0:j_id_id26" width="50%">2</td> </tr> <tr class="dr-table-row rich-table-row dr-table-firstrow rich-table-firstrow "> <td class="dr-table-cell rich-table-cell " id="hauptkag:hauptkagForm:j_id_id16:0:j_id_id26" width="50%">xy</td> </tr> </tbody> </table> <table> <tbody> <tr> <td class="alignRight"><input type="submit" name="hauptkag:hauptkagForm:j_id_id32" value="Anlegen" /></td> </tr> </tbody> </table>
Neither the border-attribute nor the style-attribute are in the table.
And border seems to be a valid attribute to panelGrid: http://java.sun.com/javaee/javaserverfaces/1.2/docs/tlddocs/h/panelGrid.html
Any other ideas? -
3. Re: just a simple alignment problem
hrbaer Jul 2, 2009 9:57 AM (in response to hrbaer)I just reduced the example of only the minimum
JSP-Code:<h:panelGrid columns="1" columnClasses="alignRight" style="width:500px;"> <h:commandButton action="#{mb.detail}" value="Detail" style="float: right;"/> </h:panelGrid>
HTML-Code:<table> <tbody> <tr> <td class="alignRight"><input type="submit" name="hauptkag:hauptkagForm:j_id_id32" value="Detail" /></td> </tr> </tbody> </table>
What I'm surprised is that there is no info about the width in the -tag. Even when I replace the style="width:500px" width the "normal" width="500px" it does have no effect!! -
4. Re: just a simple alignment problem
hrbaer Jul 2, 2009 10:07 AM (in response to hrbaer)Ok, I found the solution.
The ONLY way to influence the panelGrid properties is with the styleClass-attribute! No 'style="width.."' or 'width=""' works!
I hope this helps if there is anybody else with the same problem!