-2
을 Autocompleter에 변경 :는 어떻게 선택 상자의 크기를 변경하는 프로젝트에서 코드를 시도 위젯 크기
<strong>Result Div :</strong>
<div id="formResult" class="result ui-widget-content ui-corner-all">Submit form bellow.</div>
<strong>Topics Div :</strong>
<div id="topics" class="result ui-widget-content ui-corner-all"></div>
<s:form id="form" action="echo" theme="simple" cssClass="yform">
<fieldset>
<legend>Select Box as Autocompleter</legend>
<div class="type-select">
<label for="echo">Echo: </label>
<sj:autocompleter
id="customers"
name="echo"
list="%{customers}"
listValue="name"
listKey="id"
selectBox="true"
selectBoxIcon="true"
onChangeTopics="autocompleteChange"
onFocusTopics="autocompleteFocus"
onSelectTopics="autocompleteSelect"
cssStyle="width:100%;"
/>
</div>
<div>
<sj:submit
targets="formResult"
value="AJAX Submit"
indicator="indicator"
button="true"
/>
<img id="indicator" src="images/indicator.gif" alt="Loading..." style="display:none"/>
</div>
</fieldset>
</s:form>
<br/>
을했지만 작동하지 않습니다. 나는이 코드의 문제점이 무엇인지 모른다.
직접 할 수 있다고 생각하지 마십시오. 하지만 CSS를 사용하면'.type-select .s2j-combobox-input {width : 500px;} '와 같은 작업을 할 수 있습니다. –
'width : 100 %! important;'를 사용하면 제대로 동작합니까? 디버그 목적으로 만 사용됩니다. 그것이 작동한다면, 다른 규칙이 당신을 오버라이드하고있다 (그리고 인라인 스타일이기 때문에, 다른 것은'! important'도된다). 생성 된 HTML과 함께'type-select' 클래스도 유용 할 것입니다. –
'! important'는 브라우저의 CSS 엔진이 인라인 스타일을 사용했기 때문에 선택기의 대상에 대한 모든 규칙을 재 처리하도록하는 나쁜 해킹입니다. 중대한. 프로덕션 환경에서 사용해서는 안되지만 (자주 사용됩니다) 규칙이 작동하는지 확인하는 가장 빠른 방법입니다 (더 높은 특수성으로) (http : // css-tricks .com/specific-on-css-specificity /) 또는'! important'를 사용하거나 규칙이 전혀 작동하지 않는 경우. –