2013-04-17 15 views
7

yer tutucu hale gelmez ve ben jsf 2.0 ve Primefaces aracılığıyla benim veritabanındaki verileri kaydetmek istediğiniz 3.5h: inputText - jsf Bir AçılışSayfası oluşturmak istiyorum

Sayfam .xhtml sayfa aşağıdaki gibi görünecektir *:

enter image description here

yanında:

enter image description here

Ancak, benim HTML sayfasına gibi görünmesi istiyorum CSS benim h: inputText bir yer tutucu içermelidir. Benim kod şöyle görünür:

<h:form class="homepage_invitee_form" action="" method="POST"> 
    <h:inputText name="email" placeholder="Email Address" 
       id="email_address_new" type="text placeholder" /> 
    <br /> 
    <h:inputText name="firstName" placeholder="First Name" 
       id="firstname_new" type="text placeholder" /> 
    <h:inputText name="lastName" placeholder="Last Name" 
       id="lastname_new" type="text placeholder" /> 
    <br /> 
    <h:button value="Request Invitation" type="submit" class="btn btn-primary opal_btn" 
       id="submit_form_new" /> 
</h:form> 

yer tutucu nitelik render almaz görebileceğiniz gibi. Doğru bir şekilde nasıl işleneceğine dair herhangi bir fikri takdir ediyorum.

GÜNCELLEME

Benim HTML kodu şöyle:

<form class="homepage_invitee_form" action="" method="POST"> 
    <input name="email" placeholder="Email Address" id="email_address_new" type="text placeholder"><br> 
    <input name="firstName" placeholder="First Name" id="firstname_new" type="text placeholder"> 
    <input name="lastName" placeholder="Last Name" id="lastname_new" type="text placeholder"><br> 
    <button type="submit" class="btn btn-primary opal_btn" id="submit_form_new">Request Invitation</button> 
</form> 
+1

cevabı burada: http://stackoverflow.com/questions/8494264 /-nerede-tutucu-text-gidiş-zaman-kullanma-jsf-ve-InputText – NeplatnyUdaj

cevap

10

Kullanım s: filigranı yerine tutucuların xhtml. Diğer görsel tasarım tamamen sizin css ile ilgilidir. İşte

JSF 2.2 (JEE 7) için bu primefaces showcase

0

Aynı konuyla karşılaştım ve düzeltdim. Bu etikette uygun xmln ad alanını kullanmıyor olabilirsiniz.

"h" xmln ad boşluğunun PrimeFaces ile eşlendiğinden emin olun. Normalde bu "http://java.sun.com/jsf/html" ile eşleştirilir ve xmln ad alanı "p" normalde PrimeFaces, "http://primefaces.org/ui" ile eşlenir. bunun yerine "h" nin "p" ile bu kodu xmln değiştirmeniz gerekir sonra normale eşleştirmeleri varsa:

 

    <h:form class="homepage_invitee_form" action="" method="POST"> 
     <p:inputText name="email" placeholder="Email Address" 
     id="email_address_new" type="text placeholder" /> 
     <br /> 
     ...