Focus pocus
This commit is contained in:
parent
7f4fc58a36
commit
7bbd9df624
|
@ -11,10 +11,12 @@
|
||||||
<h:messages />
|
<h:messages />
|
||||||
<h:form id="form1">
|
<h:form id="form1">
|
||||||
<div>
|
<div>
|
||||||
|
<p:focus />
|
||||||
<p:autoComplete id="searchFor" size="45"
|
<p:autoComplete id="searchFor" size="45"
|
||||||
placeholder="Recipe title/cuisine/category, etc.)"
|
placeholder="Recipe title/cuisine/category, etc.)"
|
||||||
value="#{adminMainBean.searchText}"
|
value="#{adminMainBean.searchText}"
|
||||||
completeMethod="#{adminMainBean.searchSuggestionList}"
|
completeMethod="#{adminMainBean.searchSuggestionList}"
|
||||||
|
onfocus="jQuery('#form1\\:searchFor_input').select();"
|
||||||
>
|
>
|
||||||
<f:ajax event="change" execute="@this"
|
<f:ajax event="change" execute="@this"
|
||||||
render="form2:table1"
|
render="form2:table1"
|
||||||
|
@ -24,6 +26,7 @@
|
||||||
<p:outputLabel for="@next" value=" In " />
|
<p:outputLabel for="@next" value=" In " />
|
||||||
<p:selectOneMenu id="ctlSearchType"
|
<p:selectOneMenu id="ctlSearchType"
|
||||||
value="#{cookieBean.searchType}"
|
value="#{cookieBean.searchType}"
|
||||||
|
onchange="jQuery('#form1\\:searchFor_input').trigger('focus');"
|
||||||
>
|
>
|
||||||
<f:selectItems
|
<f:selectItems
|
||||||
value="#{appBean.searchTypeList}"
|
value="#{appBean.searchTypeList}"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user