Format of table displayed using h:panelGrid tag

Hi ,
I want to display a table using h:panelGrid as below
Account Information - This is the caption for the table
Account Name : bola
Account Number: 12345
<h:panelGrid columns="2"
             cellspacing="0"
             styleClass="abc">
<f:facet name="header">
<h:outputText value="Account Name" />
</f:facet>
<h:outputText value="#{controller.accountname}" />
<f:facet name="header">
   <h:outputText value="Account Number" />
</f:facet>  
<h:outputText value="#{controller.accountnumber}" />
</h:panelGrid>If i code like this i get
Account Name
Bola
I want the generated HTML to be something like this:
table cellspacing="0" class="abc">
          <caption class="marTopNone">Account Information</caption>
          <tr>
               <th>Account Name:</th>
               <td>bola</td>
          </tr>
          <tr>
               <th>Account number</th>
               <td>1234</td>
          </tr>Iam not sure if can acheive this using h:panelGrid tag . Please advise.
Thank you
Edited by: twisai on Oct 21, 2009 8:40 AM

Hi Balusc,
thanks for the reply . But if i put both the column names in the facet header only one column name is generated as header . The output i get is
Accout Name
bola | 1234
I want data my table to be like
Account Name : bola
Account no: 1234
Please let me know if i can generate table in this format using <h:paneGrid> tag
Thank you so much

Similar Messages

  • How to refresh table display using slis and 'reuse_alv_grid_display method.

    hello,
    how to refresh table display using slis and 'reuse_alv_grid_display method'.
    when i'm refreshing table display it performs once again reuse_alv_grid_display.and when i back the previous value appear.how to solve it?
    neon

    are you chaning any value in the gird if so use this..
    Pass the user_command form name to the Import parameter
    I_CALL_BACK_USERCOMMAND .
    and have the Dynamic form implementation..
    FORM user_command USING ucomm TYPE sy-ucomm
                selfield TYPE slis_selfield.
    "The below is important for Editable Grid.
      DATA: gd_repid LIKE sy-repid, "Exists
      ref_grid TYPE REF TO cl_gui_alv_grid.
      IF ref_grid IS INITIAL.
        CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
          IMPORTING
            e_grid = ref_grid.
      ENDIF.
      IF NOT ref_grid IS INITIAL.
        CALL METHOD ref_grid->check_changed_data .
      ENDIF.
      CASE ucomm.
        WHEN 'REFRSH'.
      ENDCASE.
           selfield-refresh = 'X'.
    ENDFORM.                    "user_command

  • Using the CellRepeater Tag

    Hi
    Is it possible to specify a table header using the cellRepeater Tag ? i am bale
    to get my table rendered dynamically using a cellRepeater tag but am not able
    to get the table header.
    The doc does not specify any attribute for table header . Wonder why it was omitted
    as this is such a cool tag .
    Any inputs to the above would be great
    Thanks
    Kar

    Eddie
    The whole reason for me using the cellrepetaer tag is that we have a requirement
    to dynamically create a table and its columns depending on the total number of
    result objects returned from domain . I was able to get the table dynamically
    created with the dynamically provided number of columns but was not able to incorporate
    table headers for the same . For example if we have 3 columns then we need 3 headers
    , if 2 cols then we need 2 headers etc.
    The way i got around it it have a separate cellrepeater tag and its purpose is
    just to render the column headers depending on the number columns available .
    Is there any struts equivalent to cellrepeater tag ? I wish there were :) but
    hey i still love this tag as it made my job a lot easier .
    Thanks
    Kar
    Eddie O'Neil <[email protected]> wrote:
    Kar--
    This isn't something that the cellrepeater supports in 8.1. It was
    really intended to just
    render cells without the top row set aside as the table header.
    You might be able to accomplish something similar using the repeater
    and occasionally rendering a
    </tr><tr> to close the current row, but I haven't tried this case myself.
    How would you want the table header on the cellrepeater to work?
    Eddie
    kar piyush wrote:
    Hi
    Is it possible to specify a table header using the cellRepeater Tag? i am bale
    to get my table rendered dynamically using a cellRepeater tag but amnot able
    to get the table header.
    The doc does not specify any attribute for table header . Wonder whyit was omitted
    as this is such a cool tag .
    Any inputs to the above would be great
    Thanks
    Kar

  • Why do tables not display within a cfform tag?

    i have included the html/cfm for a page it will not dispay in
    the center of the display nor will the descriptions in the table
    defined within the cfform tag display. i defined the cfform format
    = flash because i want to use the calendar to select the date.
    what am i missing???
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN" "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1" />
    <title>Untitled Document</title>
    </head>
    <body>
    <table width="50%" border="5" cellspacing="3"
    cellpadding="3" bordercolor="#0066FF" align="center">
    <tr>
    <td align="center">
    <!---message="First breeding date must be a valid date"
    validateat="onSubmit,onServer" validate required="yes"--->
    <cfform name="form1" id="form1" format="flash"
    method="post" action="dates2.cfm">
    <table width="50%" border="5" cellspacing="3"
    cellpadding="3">
    <tr>
    <td> </td>
    <td> </td>
    </tr>
    <tr>
    <td>Enter the First Breeding Date</td>
    <td ><cfinput type="datefield" name="sdt"
    width="100"/> </td>
    </tr>
    <tr>
    <td>Enter the actual date the puppies were born
    </td>
    <td> </td>
    </tr>
    <tr>
    <td>Add or Subtract gestation days from start date
    </td>
    <td><table width="150">
    <tr>
    <td><cfinput type="radio" name="addsub" label="Add
    Days" checked="true" value="A" /></td>
    </tr>
    <tr>
    <td><cfinput type="radio" name="addsub" label="Sub
    Days" value="S" /></td>
    </tr>
    </table>
    </td>
    </tr>
    <tr>
    <td>Enter the number of gestation days </td>
    <td> </td>
    </tr>
    <tr>
    <td> </td>
    <td> </td>
    </tr>
    </table>
    </cfform>
    </td>
    </tr>
    </table>
    </body>
    </html>
    thanks bob

    when you use format=flash any html code you have inside
    cfform is
    totally ignored. you have to code your form fields very
    differently with
    format=flash...
    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com

  • Struts - Formatting date in display:column tag

    Hi ,
    I am using the following code to format the date in my display tag
    <display:column headerClass="myclass" property="submittedDate" title="DATE SUBMITTED" decorator="org.displaytag.sample.LongDateWrapper" />     which displays the date like '12/22/2005 00:00'
    I don't need this format . Instead ,I want to extend the decorator and create my own . For that , I'm using
    import java.text.SimpleDateFormat;
    import org.displaytag.decorator.TableDecorator;
    public class DateDecorator extends TableDecorator{
         public DateDecorator(){          
              super();
              System.out.println("Date decorator constructor called...");
         public String getSubmittedDate(Object obj){
              SimpleDateFormat sdf = new SimpleDateFormat();
              sdf.applyPattern("MM/dd/yyyy");
              System.out.println("In getSubmittedDate()...");
              String date = sdf.format(obj);
              System.out.println("Formatted date is ::"+date);
              return date;
    but at runtime it gives me the classcast exception saying that
    class DateDecorator could not be loaded .
    Kindly guide me through it .
    Thanks

    Decorator class that you wrote is "DateDecorator" and the decorator class that you used in the tag is "LongDateWrapper".

  • Using Pages, I have created a document and inserted a Table for use in logging an inventaory. When I came to print this off however the lines for the table were missing but the text was in the Table format, weird! How do I print the Table?

    Using Pages, I have created a document and inserted a Table for use logging an inventory. When I came to print this document the lines and boarders of the Table feature did not print however the text did print in the table format. How do I get the lines and boarders to print also?

    Using Pages, I have created a document and inserted a Table for use logging an inventory. When I came to print this document the lines and boarders of the Table feature did not print however the text did print in the table format. How do I get the lines and boarders to print also?

  • Display Table contents using HTMLB...Urgent Help Plz...

    Hello All,
    Im working on EP SP14 and SQL Server 2000.
    I have successfully established database connection.
    I want to know <b>how can I display Table contents using TableViewModel in HTMLB</b>.
    Please help.
    Its urgent.
    Awaiting Reply.
    Thanks in advance,
    Uday<b></b>

    See /thread/80270 [original link is broken]
    (please stop crossposting every question into two forums; thanks in advance)

  • ALV display using dynamic field catalog and dynamic internal table

    hi ,
    please guide me for ALV display using dynamic field catalog and dynamic internal table.
    Thank you.

    Hi Rahul,
    maybe thread dynamic program for alv is helpful for you. More information about the [SAP List Viewer (ALV)|http://help.sap.com/saphelp_nw70/helpdata/EN/5e/88d440e14f8431e10000000a1550b0/frameset.htm]. Also have a look into the example programs SALV_DEMO_TABLE*.
    Regards Rudi

  • Why did my upgrade to Maverick result in my not being able to access my Documents in the previous format? Why did I not have the option to change my 'filing' system to use the new 'Tags'? Had reinstall 10.8.5 to access my Documents

    Why did Maverick not enable me to access my Documents in the previous format (Grid) and when using the alternative I could not 'clik' to open them. The same applied when I tried to open documents from within my back up disc (LaCie). I had to reinstall 10.8.5 and back up from my LaCie (thankfully) to gain access to all my critical Documents? To deal with this I spent 3 and hlafg hours on telephone to Apple Support ( very helpful - but unable to resolve issues - then 3 hours in Apple Store (again very helpful but only able to assist by clearinng Maverick from my HD and reinstalling 10.8.5. Fortunately LaCie came to the resuce and I was able to back up Mac HD with all my documents but lost about one week of work....!!
    Why did I not have the option when upgrading to Maverick to select the new 'Tag" system which I did not want?

    10.8.5 is the lates ML edition.  I use TM and also carbon copy cloner as my second backup.  If I were you and you have a TM backup prior to Mavericks I would try another restore at bootup.  You should erase your drive first in that process using disk utitlites and then use TM to put back you apps and files.  The other choice is to do an internet recovery and then use TM to restore your apps and files.  That should fix the permissions issue.  I did the same thing and all was OK including getting my original iPhoto progam (9.4.3), iphoto11 and photos back.

  • How to display smartforms table lines useing different background colour

    Hi all:
    How to display smartforms table lines useing different background colour .
    for example:
    line1:green
    line2:red
    line3:green
    line4:red
    line5:green
    line6:red
    line7:green
    line8:red
    Any help is highly appreciated!!
    启明星

    Hi,
    Create a two lines one for header and second for data in the table.
    1)In table painter we can find the pencil mark.
    2)select the pencil mark
    3)now select the line which you need to shade
    4) now select the shading colour in the table painter and the provide the resolution up to 100% and select table pattrn for that line.
    5) Now you can use this for the header now only the header gets shaded and the remaining gets unshaded.
    reward points if useful
    Thanks and Regards,
    Nishant

  • Displaying Applet in JSP Using jsp:plugin tag

    The following code is not working eventhough i downloaded to JRE plug-in .Please help me to work the
    following code in JSP.
    <jsp:plugin code="mani.Clock2.class"
    codebase="/classes/" width=300 height=300
    jreversion="1.3"
    nspluginurl="http://java.sun.com/products/plugin/1.1.3/plugin-install.html"
    iepluginurl="http://java.sun.com/products/plugin/1.3/jinstall-13-win32.cab#Version=1,3,0,0">
    <jsp:fallback>
    <font color=#FF0000 size=10>Sorry Error While Loading Applet </font>
    </jsp:fallback>
    </jsp:plugin>

    why don't ypu just use the <applet> tag?

  • Display distinct rows from Oracle table without using "DISTINCT" keyword.

    How to retrieve distinct rows from oracle table without using 'DISTINCT' keyword in SQL?
    Thanks in advance.
    Mihir

    Welcome to the forum.
    Besides GROUP BY you can use UNIQUE instead of DISTINCT as well, but that's probably not wanted here ;) , and the ROW_NUMBER() analytic:
    SQL> create table t as
      2  select 1 col1 from dual union all
      3  select 1 from dual union all
      4  select 2 from dual union all
      5  select 3 from dual union all
      6  select 4 from dual union all
      7  select 4 from dual;
    Table created
    SQL> select col1 from t;
          COL1
             1
             1
             2
             3
             4
             4
    6 rows selected
    SQL> select distinct col1 from t;
          COL1
             1
             2
             3
             4
    SQL> select unique col1 from t;
          COL1
             1
             2
             3
             4
    SQL> select col1 from t group by col1;
          COL1
             1
             2
             3
             4
    SQL> select col1
      2  from ( select col1
      3         ,      row_number() over (partition by col1 order by col1) rn
      4         from   t
      5       )
      6  where rn=1;
          COL1
             1
             2
             3
             4

  • Mixing Key Figures and Characteristics in 2004s Table Display

    In a 3.x query definition using table display, I could put a key figure in the middle of the characteristics.  The results would be columns Char1, Char2, KF1, Char3, for example.  The same query upgraded to 2004s insists on displaying the key figure at the end of the characteristics, even with the Query Properties / Data Formatting set to Tabular View (in BEx Analyzer).
    Any ideas on how to keep the key figure in the middle of the characteristics?
    Thanks.

    Hi,
    New QD wont support table display. You need to use Report designer for this.
    Thanks & Best Regards,
    Rajani

  • Sending email  with message body contain data  in table   displayed in one

    Hi,
    I have one jsp page where I am dispalying the table data retrieved fron database.
    Now i am trying to send this table as message body of the mail to the user.I am doing same stuff last from six days but unable to send such data.
    Please help me Sir,as i am newbie here.
    Here is an jsp page.
        Document   : evaluationeventtable
        Created on : Jul 24, 2008, 6:52:37 PM
        Author     : user1
    --%>
    <%@page contentType="text/html" pageEncoding="UTF-8"%>
    <%@ page language ="java" %>
    <%@ page import="java.sql.*, javax.sql.*, javax.naming.*,java.io.*,java.util.*" %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
       "http://www.w3.org/TR/html4/loose.dtd">
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <title>IGIDR</title>
            <link rel="stylesheet" href="../styles/styles.css" type="text/css">
        </head>
        <body>
             <table width="100%" cellspacing="0" cellpadding="0" border="0">
    <tr>
    <td><%@ include file="/includes/logohead.jsp" %></td>
    </tr>
    <tr><td><%@ include file="/toplinks.jsp"%></td></tr>
    <tr>
    <td width="100%" valign="top">
    <table width="100%" cellspacing="0" cellpadding="0" border="1" borderColor=#000066>
        <tr>
    <td width="80%"> 
        <%  int QNO;
             String message=null;
             //String message1=null;
             //String message2=null;
             String noA,noB,noC,noD;                
            String ID=request.getParameter("id");       
            String EVENTID=request.getParameter("event");       
            Connection connection = null;
            Statement st = null;
            Statement st1 = null;
            Statement st2 = null;
            Statement st3 = null;
            Statement st4 = null;
            Statement st5 = null;
            ResultSet rs= null;
            ResultSet rs1= null;
            ResultSet rs2= null;
            ResultSet rs3= null;
            ResultSet rs4= null;
            ResultSet rs5= null;
            Class.forName("com.mysql.jdbc.Driver");
            Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/mynewdatabase","root", "root123");
                           st=con.createStatement();
                    try  {              
                      rs = st.executeQuery("SELECT * FROM Questionbank where Questionid='"+ID+"'");
                   %>
                <table border="1" cellpadding="2" cellspacing="3" bgcolor="#E6E6FA" align="center"><tr><th>Questions</th><th>A</th><th>B</th><th>C</th><th>D</th></tr>
                 <%  message="<table border=1 cellpadding=2 cellspacing=3 bgcolor=#E6E6FA align=center><tr><th>Questions</th><th>A</th><th>B</th><th>C</th><th>D</th></tr>";%>
                   <%
                  while ( rs.next() )
                            //String NO=rs.getString("Qserialno");
                            //session.setAttribute("no",NO);
                            //String NAME=rs.getString("questionname");
                            //session.setAttribute("name",NAME);                                    
                       %>
                       <tr><td><%=rs.getString("Qserialno") + "." + rs.getString("questionname")%></td>
                       <%
                        message=message+"<tr><td>"+rs.getString("Qserialno") + "." + rs.getString("questionname")+"</td>";
                       st1=con.createStatement(); 
                       try
                          rs1=st1.executeQuery("select count(*) as total  from final where questionid='"+ID+"'and Eventid='"+EVENTID+"'and Qserialno='"+rs.getString("Qserialno")+"'and Answer='A'");
                         rs1.next();
                         noA=rs1.getString("total");
                         session.setAttribute("NOA",noA);
                          rs1=st1.executeQuery("select count(*)  as total from final where questionid='"+ID+"'and Eventid='"+EVENTID+"'and Qserialno='"+rs.getString("Qserialno")+"'and Answer='B'");
                       rs1.next();
                         noB=rs1.getString("total");
                         session.setAttribute("NOB",noB);
                          rs1=st1.executeQuery("select count(*) as total  from final where questionid='"+ID+"'and Eventid='"+EVENTID+"'and Qserialno='"+rs.getString("Qserialno")+"'and Answer='C'");
                        rs1.next();
                         noC=rs1.getString("total");
                         session.setAttribute("NOC",noC);
                          rs1=st1.executeQuery("select count(*) as total  from final where questionid='"+ID+"'and Eventid='"+EVENTID+"'and Qserialno='"+rs.getString("Qserialno")+"'and Answer='D'");
                          rs1.next();
                         noD=rs1.getString("total");                   
                         session.setAttribute("NOD",noD);
                         message=message+"<td>"+noA+"</td><td>"+noB+"</td><td>"+noC+"</td><td>"+noD+"</td></tr></table>";
                         %>                     
                     <td><%=noA%></td><td><%=noB%></td><td><%=noC%></td><td><%=noD%></td></tr>
                   <%        
                         } finally
                               if (rs1 != null)
                                   rs1.close();
                                   rs1 = null;
                               } if (st1 != null)
                                   st1.close();
                                   st1 = null;
                                       finally
                               if (rs != null)
                                   rs.close();
                                   rs = null;
                               if (st != null)
                                   st.close();
                                   st = null;
                                   con.close();
                      %></table>   
                      <table align="center" width="50%" cellspacing="0" cellpadding="0" border="1" borderColor=#D2691E>
                      <form name="sendmail" action="/student/servletmail" method="POST">
                       <tr class="CellColor">
              <td>To</td>
              <td class="CellColor" width="1%">
              </td>
              <td class="CellColor">
                   <input type="text" name="to" size="25" value="">
              </td>
                    <td>From</td>
              <td class="CellColor" width="1%">
              </td>
              <td class="CellColor">
                   <input type="text" name="from" size="25" value="">
              </td>
         </tr>
            <input type="hidden" name="message" value="<%=message%>">
            <tr class="CellColor">
              <td class="CellColor" colspan="9" align="center">
                   <input type="submit" name="tn1" value="Send" >
              </td>
         </tr>   
      </form></table></td></tr></table>
                  </table>
                         </body></html>    And here is an servlet where i am trying to send the mail
    package com.student.igidr.test;
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import javax.mail.*;
    import javax.mail.event.*;
    import javax.mail.internet.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    * @author user1
    public class servletmail extends HttpServlet
            public  void doPost(HttpServletRequest request,HttpServletResponse response)
                                      throws ServletException, IOException
            PrintWriter out=response.getWriter();
            response.setContentType("text/html");
            try
               Properties props=new Properties();
               props.put("mail.smtp.host","webmail.igidr.ac.in");   //  'localhost' for testing
       Session   session1  =  Session.getDefaultInstance(props,null);
               String s1 = request.getParameter("to");
               String s2 = request.getParameter("from");
               //String s3 = request.getParameter("sub");
               String s4 = request.getParameter("message");
              // out.println(s4);
         Message message =new MimeMessage(session1);
         message.setFrom(new InternetAddress(s2));
          message.setRecipients
                 (Message.RecipientType.TO,InternetAddress.parse(s1,false));
              // message.setSubject(s3);
               message.setText(s4);       
              message.setContent(s4,"text/html");
               Transport.send(message);
               out.println("mail has been sent");
            catch(Exception ex)
               System.out.println("ERROR....."+ex);
    }I am using the message variable to send the message also as input variable in servlet.
    Whether it is write Way to represent hole table body into message variable in jsp page.
    Please help me.
    Thanks and Regards
    haresh
    Edited by: HARSHAL_GURAV on Aug 13, 2008 11:15 PM
    Edited by: HARSHAL_GURAV on Aug 13, 2008 11:56 PM

    Hi bshannon ,
    Thanks you very much for your reply.
    I am trying to send html formated mail to the user.
    The message body contains the table that is displayed in above jsp page as:
    <table border="1" cellpadding="2" cellspacing="3" bgcolor="#E6E6FA" align="center"><tr><th>Questions</th><th>A</th><th>B</th><th>C</th><th>D</th></tr>
    <tr><td><%=rs.getString("Qserialno") + "." + rs.getString("questionname")%></td>
    <td><%=noA%></td><td><%=noB%></td><td><%=noC%></td><td><%=noD%></td></tr>In above code I am displaying the data from table i jsp page in table format. The data is related to analysis of particular event and i am trying to send this data as message body of the email.
    As table displayed in html form can you assist me in how to send html data?
    I am using variable message to store all this table data .
    <%  message="<table border=1 cellpadding=2 cellspacing=3 bgcolor=#E6E6FA align=center><tr><th>Questions</th><th>A</th><th>B</th><th>C</th><th>D</th></tr>";%>
    message=message+"<tr><td>"+rs.getString("Qserialno") + "." + rs.getString("questionname")+"</td>";
      message=message+"<td>"+noA+"</td><td>"+noB+"</td><td>"+noC+"</td><td>"+noD+"</td></tr></table>";i am sending this variable through form.At servlet I am retrieving it like:
    String s1 = request.getParameter("to");
               String s2 = request.getParameter("from");
               //String s3 = request.getParameter("sub");
               *String s4 = request.getParameter("message");*Will this possible ?
    Please help meas i am troubling same with last from 7-8 days.
    I had gone through Faqs but unable to collect required information.
    Thanks and Regards
    Haresh
    Edited by: HARSHAL_GURAV on Aug 15, 2008 9:22 PM

  • JDev 11, Should we use f:verbatim tag in ADF faces pages?

    When you type something in a facet in a jspx page it automaticaly get into an f:verbatim tag.
    yet in the code it has a warning:
    Using f:verbatium tag can cause undesirable results when used with PPR navigation. For inlining styles or javascript, af:resource should be used instead.
    Also if you use call and return from a dialog page, the page is procken
    [http://adfbugs.blogspot.com/2009/08/returning-from-dialog-to-page-that-has.html]
    Is this a bug? or we should not use f:verbatim?

    You shouldn't be using f:verbatim to just display text on your page instead put the text into one of the output components - such as outputText or the formatted outputText.

Maybe you are looking for