Layout JSF

1 resposta
andrejusti

Oi pessoal estou com um pequeno probleminha, quando faço um e dai so consigo adicionar css no item tabela gostaria de adicionar nas tr's td's e tudo mais, tabem queria adicionar uma imagem no final de cada td,
só que gerando automaticamente eu nao consigo mexer nisso, alguem sabe uma soluçao?

Meu arquivo jsf

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@taglib prefix="a4j" uri="http://richfaces.org/a4j" %>
<%@taglib prefix="rich" uri="http://richfaces.org/rich" %>
<link rel="stylesheet" type="text/css" href="css/enquete/enquete.css"/>
<f:subview id="enquete" >
    <h:form>
        <f:verbatim> <div class="divEnqueteMenu" title="Enquete"></f:verbatim>
            <h:graphicImage value="imagens/enquete/menu/enquete-image.png" width="171" height="23px" alt="Enquete" title="Enquete"/>
            <f:verbatim> <span class="h5Enquete"> <h:outputText>Na última semana, a crise econômica mundial completou um ano. Qual foi o impacto da crise na sua empresa?</h:outputText> </span> </f:verbatim>
            <f:verbatim>  <hr class="hrEnquete"/>  </f:verbatim>
            <h:selectOneRadio layout="pageDirection" styleClass="opcoesEnquete">
                <f:selectItem  itemLabel="Nenhum"  itemValue="1"/>
                <f:selectItem itemLabel="Pequeno" itemValue="2"/>
                <f:selectItem itemLabel="Ruim" itemValue="3"/>
                <f:selectItem itemLabel="Médio" itemValue="4"/>
            </h:selectOneRadio>
            <f:verbatim>  </div>  </f:verbatim>
    </h:form>
</f:subview>

html gerado

<!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>JSP Page</title>

        </head>
        <body>

            



<link rel="stylesheet" type="text/css" href="css/enquete/enquete.css"/>

<form id="enquete:j_id_jsp_1857353081_2" name="enquete:j_id_jsp_1857353081_2" method="post" action="/dukatitec/novojsp.jsf" enctype="application/x-www-form-urlencoded">
<input type="hidden" name="enquete:j_id_jsp_1857353081_2" value="enquete:j_id_jsp_1857353081_2" />
 <div class="divEnqueteMenu" title="Enquete"><img src="imagens/enquete/menu/enquete-image.png" alt="Enquete" height="23px" title="Enquete" width="171" /> <span class="h5Enquete"> Na última semana, a crise econômica mundial completou um ano. Qual foi o impacto da crise na sua empresa? </span>   <hr class="hrEnquete"/>  <table class="opcoesEnquete">

	<tr>
<td>
<input type="radio" name="enquete:j_id_jsp_1857353081_2:j_id_jsp_1857353081_8" id="enquete:j_id_jsp_1857353081_2:j_id_jsp_1857353081_8:0" value="1" /><label for="enquete:j_id_jsp_1857353081_2:j_id_jsp_1857353081_8:0"> Nenhum</label></td>
	</tr>
	<tr>
<td>
<input type="radio" name="enquete:j_id_jsp_1857353081_2:j_id_jsp_1857353081_8" id="enquete:j_id_jsp_1857353081_2:j_id_jsp_1857353081_8:1" value="2" /><label for="enquete:j_id_jsp_1857353081_2:j_id_jsp_1857353081_8:1"> Pequeno</label></td>
	</tr>
	<tr>

<td>
<input type="radio" name="enquete:j_id_jsp_1857353081_2:j_id_jsp_1857353081_8" id="enquete:j_id_jsp_1857353081_2:j_id_jsp_1857353081_8:2" value="3" /><label for="enquete:j_id_jsp_1857353081_2:j_id_jsp_1857353081_8:2"> Ruim</label></td>
	</tr>
	<tr>
<td>
<input type="radio" name="enquete:j_id_jsp_1857353081_2:j_id_jsp_1857353081_8" id="enquete:j_id_jsp_1857353081_2:j_id_jsp_1857353081_8:3" value="4" /><label for="enquete:j_id_jsp_1857353081_2:j_id_jsp_1857353081_8:3"> M&eacute;dio</label></td>
	</tr>
</table>  </div>  <input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="H4sIAAAAAAAAALVWzW8bRRQfO07ipAHyIdILkQypivjwV+woDhGCJE2IJccOdloKHJzJemKvWe9MZ2ftbQ6l5QAHDiABEkhBcOCCVE78BSgSSEhFAokLB4Q483FBonCBN+PPJLtJCu1KHs3OvvnN7733e29881fUb3H0OOXlCK5i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DjEtnu7KxbzuVBiWPpuq4mJcBsrxNjvU6oOxWQz+tyYlrR1gnRGjHt9ktYfYwwswx9baW5BnsCMwnm9Ej7wCOXVsCoLz4X7ziBXBwLdWb3u10WpxNZ4FiRzXuJIOb1Ie71YUbJ5j/kISWppjzzoP6NtMI2cbhd9I5dhFbQVQweug7uH24wTXHexyB3F3QOFzXI82iSWrZgSJlGidXOb1eiAZesDf1vYc5LgI3evnPI+XacBrLErNg1gXxxZbF2Mp3kndOJq+v4+VPwGdwgAG7Cn2rfzL0kFJcI+VMQCuRtXYYncS/ZqGZYOE261vc/BS0Dn2STD/sX4nKg/OYMAAA=" />

</form>
        </body>
    </html>

css

.divEnqueteMenu{
    width:171px;
    min-width:171px;
    max-width:171px;
    margin:2px;
}
.h5Enquete{
    text-align:left;
    color:#333333;
    margin:0px;
    font-family:Verdana, Arial, Helvetica, sans-serif;
    font-size:11px;
    margin:100px;
}
.opcoesEnquete{
    text-align:left;
    color:#666666;
    margin:0px;
    font-family:Verdana, Arial, Helvetica, sans-serif;
    font-size:10px;
}

1 Resposta

paulohonfi

Estava precisando dessa informação também… Está acontecendo algo estranho aqui, nunca tinha visto este comportamento, conforme print anexada, ele quebra a linha entre o radio e o label. Estava pensando em arrumar via CSS.

Código:

&lt;tr&gt;
	&lt;td width="600px" colspan="4"&gt;
		&lt;a4j:outputPanel id="servicoRealizar"&gt;
			&lt;h4&gt;&lt;h:outputText value="#{msgs.agendamento_servicosVistoriaPrevia_passo1_selecionaServicoRealizar}"
							  rendered="#{agendamentoBean.cidadeRegiaoSelecionado}" /&gt;&lt;/h4&gt;
			<br />
			&lt;h:selectOneRadio value="#{agendamentoBean.servico.tipo}"
							  valueChangeListener="#{agendamentoBean.servicoRealizarAlterado}"
							  rendered="#{agendamentoBean.cidadeRegiaoSelecionado}"
							  layout="pageDirection" dir="LTR"&gt;
				&lt;f:selectItems value="#{agendamentoBean.listaServicoTipo}"/&gt;
				&lt;a4j:support event="onclick" reRender="localServico" /&gt;
			&lt;/h:selectOneRadio&gt;
		&lt;/a4j:outputPanel&gt;
	&lt;/td&gt;
&lt;/tr&gt;


Criado 26 de setembro de 2009
Ultima resposta 27 de set. de 2012
Respostas 1
Participantes 2