Search button inside p:inputText

Post Reply
leozkr
Posts: 10
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

User avatar
aragorn
Posts: 2926
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: 10
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?

User avatar
aragorn
Posts: 2926
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: 10
Joined: 27 Jan 2017, 19:51

29 Sep 2017, 00:20

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

Best Regards

User avatar
aragorn
Posts: 2926
Joined: 29 Jun 2013, 12:38

02 Oct 2017, 09:19

Glad to hear, thanks a lot for the update!

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests