0

I am developing a JSF web project with primefaces 6.2. I would produce a form having outputlabel above inputText.

Following a sample code using div.

How can I produce it using panel, panelGrid, row, column, outputLabel and inputText of primefaces? there have not been successful... Thanks!!

<div class="rows">
 <div style="padding-top:5px;padding-bottom:5px;padding-left:10px;**strong text**loat:left">
                                <div>Name:</div>
                                <div>
                                    <input id="name" type="text" style="height: 20px; width: 200px;" />
                                </div>
                            </div>

                            <div style="padding-top:5px;padding-bottom:5px;padding-left:10px;float:left">
                                <div>Surname:</div>
                                <div>
                                    <input id="surname" type="text" style="height: 20px; width: 200px;" />
                                </div>
                            </div>
                        </div>

                        <div class="rows">
                            <div style="padding-top:5px;padding-bottom:5px;padding-left:10px;float:left">
                                <div>Address:</div>
                                <div>
                                    <input id="address" type="text" style="height: 20px; width: 200px;" />
                                </div>
                            </div>

                            <div style="padding-top:5px;padding-bottom:5px;padding-left:10px;float:left">
                                <div>Email:</div>
                                <div>
                                    <input id="email" type="text" style="height: 20px; width: 200px;" />
                                </div>
                            </div>
                        </div>
Filippo De Bellis
  • 489
  • 1
  • 5
  • 9
  • Why is using divs thisay wrong? It's perfectly fine to combine html and hsf components in one xhtml facelet file – Kukeltje Sep 05 '18 at 17:23
  • why is it wrong? It was an example. I would like product same form using jsf+primefaces. there have not been successful... – Filippo De Bellis Sep 05 '18 at 17:37
  • There was a small typo in my question sorry for that, there is nothing wrong with using divs. It sounded like you want to use a datagrid or something from jsf/primefaces when there is no need to – Kukeltje Sep 05 '18 at 18:05
  • I would like to use following primefaces component:panel panelgrid row column inputtext and outputlabel..... – Filippo De Bellis Sep 05 '18 at 18:17
  • Why do you want to use a panelgrid if divs work? – Kukeltje Sep 05 '18 at 19:24
  • Because the standard in my project is jsf+primefaces. My sample works in html without jsf+primefaces. – Filippo De Bellis Sep 05 '18 at 19:34
  • So you don't have an `` tag in your page? Nor any css or javascript? Since that too is not jsf+primefaces... there is **no need to do it all in jsf/primefaces** https://stackoverflow.com/questions/7418761/mixing-jsf-tag-and-html. Just replace `` with `` and e.g. `Email:` with `` – Kukeltje Sep 05 '18 at 20:20

0 Answers0