Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PrimeFaces AutoComplete changing default size

I am trying to change the size of the autoComplete (primefaces 3.3), I tried all the below options but the size remains the same.

size="600"
Style="width:600px;"
StyleClass > css file with width:600px;

but none of them increases the size, so how do i do it.

Note: I noticed that if I specify (width > PanelGrid size) then the panel grid size changes automatically but autoComplete is still in default size.

Update: my autoComplete code

<p:autoComplete id="autoTest" value="#{testMB.selectedTest}" 
completeMethod="#{testMB.completeTest}" var="test" 
itemLabel="#{test.name}" itemValue="#{test}" converter="#{testConverter}"
forceSelection="TRUE"  queryDelay="1000" multiple="TRUE" size="600" 
process="@this">
like image 372
user1433804 Avatar asked Sep 24 '12 06:09

user1433804


2 Answers

I changed the default size for AutoComplete in Primefaces 5.2 by using the inputStyle attribute.

Example:

inputStyle="width: 100px"
like image 64
mhei Avatar answered Oct 10 '22 00:10

mhei


It is just need to change of size ;

     size="30"

    <p:autoComplete id="yourId" value="#{YourBean.value}" completeMethod="#{YurBean.complete}" size="30"/> 
like image 44
Zaw Than oo Avatar answered Oct 10 '22 00:10

Zaw Than oo