Results 1 to 6 of 6
  1. #1
    Srikala is offline Member
    Join Date
    Aug 2008
    Posts
    10
    Rep Power
    0

    Default jsf center tag needed

    which tag we have to use for center in JSF.
    normally in html we are using <center> tag.
    like that i need my submitt button in center in my JSF page.
    give me the solution.
    thanks in advance.

  2. #2
    smithahrao is offline Member
    Join Date
    Jun 2009
    Posts
    8
    Rep Power
    0

    Default

    Many jsf components have style or styleClass attribute where you can specify align:center.

  3. #3
    ChrisX is offline Member
    Join Date
    Jul 2009
    Posts
    1
    Rep Power
    0

    Default

    I have that problem too.I do someting like this :
    <h: panelGrid columns="2" >
    <h: outputText value="aa" styleClass="alignleft" />
    <h: outputText value="bb" styleClass="alignright"/>
    </h: pabelGrid>
    where alignleft,alignright:
    .alignleft {
    align:left
    }
    .alignright {
    align:right
    }
    Also i do ' style="align : left" ', but effect 0, they still standing in their places

  4. #4
    smithahrao is offline Member
    Join Date
    Jun 2009
    Posts
    8
    Rep Power
    0

    Default

    Rather than putting align:center at h:outputText tag level, try putting it at panelGrid level.
    PanelGrid has an attribute called columnClasses, where you can specify something like below:
    <h: panelGrid columns="2" columnClasses='"alignleft,alignright">
    .... ...
    </h: pabelGrid>

    It should work.

  5. #5
    mvg's Avatar
    mvg
    mvg is offline Member
    Join Date
    Oct 2008
    Posts
    23
    Rep Power
    0

    Default

    Hi smithahrao,

    I have the same problem as Chrisx, but your solution didnt work for me. Any guess?

  6. #6
    smithahrao is offline Member
    Join Date
    Jun 2009
    Posts
    8
    Rep Power
    0

    Default

    Hi,

    along with align:left , try putting text-align:left in your css class.
    If that didn't work out yu can also try like this:

    <h:panelGrid columns="2" >
    <h:column style="align:left">
    <h: outputText value="aa" styleClass="alignleft" />
    </h:column>

    <h:column style="align:right">
    <h: outputText value="bb" styleClass="alignright"/>
    </h:column>

    </h:panelGrid>


    I think this should work.

    Thanks
    Smitha

Similar Threads

  1. JFrame at Center Screen
    By hiranya in forum AWT / Swing
    Replies: 8
    Last Post: 02-11-2010, 04:29 PM
  2. Center background image
    By Floetic in forum AWT / Swing
    Replies: 1
    Last Post: 04-24-2008, 05:50 PM
  3. center a form
    By tommy in forum New To Java
    Replies: 2
    Last Post: 08-06-2007, 08:47 PM
  4. Help Center Live 2.1.3
    By JavaBean in forum Java Software
    Replies: 0
    Last Post: 07-06-2007, 03:43 PM
  5. Replies: 4
    Last Post: 06-08-2007, 06:15 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •