Search button inside p:inputText

Forum rules
Please note that response time for technical support is within 3-5 business days.
Post Reply
leozkr
Posts: 11
Joined: 27 Jan 2017, 19:51

14 Sep 2017, 18:26

Hi,
There is some way to easy way to put a searchbutton inside inputText
similar to calendar using "showOn="button""?
I'm using panel-grid which is dificult to manage the style per DIV
Best regards

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

15 Sep 2017, 15:14

I think you can try https://www.primefaces.org/showcase/ui/ ... roup.xhtml with 6.1.x and 6.2-SNAPSHOT.
What PF version are you using?

leozkr
Posts: 11
Joined: 27 Jan 2017, 19:51

15 Sep 2017, 15:31

Hi Aragon, i'm using PF 6.1
but it doesn't, i already tried the Inputgroup, but it crashes, i tried at same way shown at primefaces show case.
i think it happens because Barcelona don't have support to inputgroup maybe?

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

19 Sep 2017, 09:04

Please try;

Code: Select all

.ui-inputgroup {
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
}         
.ui-inputgroup .ui-inputgroup-addon {
    padding: 4px;
}
.ui-inputgroup .ui-inputgroup-addon, .ui-inputgroup .ui-inputgroup-addon-checkbox {
    display: inline-block;
    text-align: center;
    min-width: 1.5em;
    border: 0 none;
}
.ui-inputgroup .ui-inputtext {
    padding-left: .5em;
}

body .ui-fluid .ui-inputgroup .md-inputfield {
    width: 100%;
    box-sizing: border-box;
}

body .ui-inputgroup .ui-inputgroup-addon .material-icons {
    top: -6px;
    position: relative;
}
Exp;

Code: Select all

<div class="ui-inputgroup">
    <h:panelGroup styleClass="md-inputfield">
        <p:inputText />
        <label>Email</label>
    </h:panelGroup>
    <span class="ui-inputgroup-addon"><i class="material-icons">&#xE8B6;</i></span>
</div>

leozkr
Posts: 11
Joined: 27 Jan 2017, 19:51

29 Sep 2017, 00:20

Thank You for the answer Aragon,
This it worked just fine

Best Regards

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

02 Oct 2017, 09:19

Glad to hear, thanks a lot for the update!

Post Reply

Return to “Barcelona - PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 4 guests