This content has been marked as final.
Show 4 replies
-
1. Re: Suggestionbox popup is still visible after submitting an
ilya_shaikovsky Jan 23, 2009 10:17 AM (in response to ande)show please your page. I'm interesting in your form submit via enter implementation.
-
2. Re: Suggestionbox popup is still visible after submitting an
ande Jan 23, 2009 11:20 AM (in response to ande)Here we go:
Facelet:... <h:inputText id="newTestDriveActivityTCInput" value="#{bean.newTestDriveActivityTC}" onkeyup="clickElementByReturn('newtdactivityform:newtdactivityinputsubmit', event)" /> <a4j:region> <rich:suggestionbox id="newTestDriveActivityTCInputSuggest" for="newTestDriveActivityTCInput" suggestionAction="#{bean.testDriveTestCasesAutocomplete}" var="tdtc" fetchValue="#{tdtc.id}" width="500" height="200" nothingLabel="#{msgs['tt.nothingfound']}" ignoreDupResponses="true"> <h:column> <h:outputText id="newTestDriveActivityTCInputSuggestValue" value="#{tdtc.id} - #{tdtc.category} - #{tdtc.title}"/> </h:column> </rich:suggestionbox> </a4j:region> <h:inputText styleClass="hidden" /> <a4j:commandButton id="newtdactivityinputsubmit" value="#{msgs['tt.save']}" action="#{bean.saveNewTestDriveActivity}" reRender="testdriveactivities" status="ttstatus" oncomplete="focusElement('newtdactivityform:newTestDriveActivityTimeInput');" onclick="disableElem(this);" /> ...
and js:
function clickElementByReturn(elid, e) {
var kC = (window.event) ? event.keyCode : e.keyCode;
var enter_key = (window.event) ? 13 : e.DOM_VK_RETURN;
if(kC == enter_key) {
$(elid).click();
}
} -
3. Re: Suggestionbox popup is still visible after submitting an
ande Jan 28, 2009 2:48 AM (in response to ande)Pushed. :)
-
4. Re: Suggestionbox popup is still visible after submitting an
ilya_shaikovsky Jan 28, 2009 4:24 AM (in response to ande)what about use the named queue? Just for input and this button which you clicking from js? Other controls will not be affected and these ones will be in queue? check our dev guide article for named queues creation.