1

I have the following dialog defined:

        <p:dialog id="dialog" header="Request Detail"
            widgetVar="requestDialog" resizable="false" showEffect="fade"
            hideEffect="fade" >
            <h:panelGrid id="display" columns="2" border="1" cellpadding="4" columnsclasses="width:200px;width:450px;"              
                style="vertical-align:top" >
                
                <!-- SNIP -->

                <h:outputText value="Status Notes:" styleClass="newCourier" />
                <h:outputText value="#{uploadStatus.selectedRequest.statusNotes}" styleClass="newCourier" 
                    escape="false" />

            </h:panelGrid>
        </p:dialog>

How do I get Status Notes to align/appear at the top of it's grid?

I've tried adding style="float:top" into its h:outputText tag, and a number of other things.

If it matters, here is the definition for .newCourier:

.newCourier {
   font-family: courier new;
}

I appreciate any help. Thank you.

EDIT:
Basically, I have a 1 row table with 2 columns (I have other rows but am only concerned about this one). The first column is just "Status Notes". The second column is of variable length but can be quite large. Right now, "Status Notes" gets centered in its column box BUT I want it to be vertically aligned at the top of its column box instead.

EDIT2:
What I'm trying to achieve...

Community
  • 1
  • 1

1 Answers1

1

Instead of standard h:panelGrid , use Primefaces Panelgrid (<p:panelGrid)

<p:panelGrid id="display" columns="2" border="1" cellpadding="4" columnsclasses="width:200px;width:450px;">

               <p:outputPanel style="float: left">     
               <f:facet name="header">  
                Status Note:  #{uploadStatus.selectedRequest.statusNotes}
                </f:facet>
                </p:outputPanel>



            </p:panelGrid>

updated:

Remove comment line <!-- SNIP -->

Makky
  • 17,117
  • 17
  • 63
  • 86
  • Thank you for your reply. This didn't quite work for me though. I'm going to add a little more to my original question. – vasilythecat Jan 28 '14 at 20:08
  • Attach screenshot of your currnet screen. – Makky Jan 28 '14 at 20:22
  • I wanted to but I can't because I'm new to this site and it won't allow me until I get 10 reputation.... – vasilythecat Jan 28 '14 at 21:14
  • I found this [link](http://stackoverflow.com/questions/3547485/how-to-control-alignment-of-datatable-inside-of-a-panelgrid?lq=1). I'm about to leave but will look further into this. If it doesn't work, I will post back here – vasilythecat Jan 28 '14 at 21:32