This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSF and the fly likes javascript error while selecting value from combo box Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "javascript error while selecting value from combo box" Watch "javascript error while selecting value from combo box" New topic
Author

javascript error while selecting value from combo box

Naresh Kavala
Greenhorn

Joined: Jun 07, 2008
Posts: 23
Hi All,

I am using rich suggestion box as combo box due to a requirement. When I select first time value from Suggestion box, it is working fine. But when I try to select the value again from the same suggestion box, I am getting following javascript error.

I need to implement this very urgently. Could anybody suggest, what could be done to resolve this?

Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLInputElement.setSelectionRange]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: suggestionbox.js :: <TOP_LEVEL> :: line 7" data: no]

Code :
<h:panelGrid columns="2">
<h:panelGrid columns="2">
<h:panelGrid columns="2" border="0" cellpadding="0"
cellspacing="0">
<h:inputText style="margin:0px;width:180px;"
id="primaryContact" value="#{sdlRegDetails.primaryContact}" >
</h:inputText>
<h:graphicImage value="/common/images/arrow.png"
onclick="#{rich:component('suggestion1')}.callSuggestion(true)"
alt="" />
</h:panelGrid>
</h:panelGrid>
<a4j:region id="primaryContactArea">
<rich:suggestionbox height="100" width="200"
usingSuggestObjects="false" immediate="true"
suggestionAction="#{scheduleAction.fetchMemberContactList}"
var="cnct" for="primaryContact"
fetchValue="#{cnct.firstName} #{cnct.lastName}"
id="suggestion1">
<h:column>
<hutputText value="#{cnct.firstName} #{cnct.lastName}"/>
</h:column>
<a4j:support event="onselect" ajaxSingle="true" reRender="primaryContact" ignoreDupResponses="true">
<f:setPropertyActionListener value="#{cnct.contactId}"
target="#{sdlRegDetails.primaryContactId}" />
<f:setPropertyActionListener value="#{cnct.firstName} #{cnct.lastName}"
target="#{sdlRegDetails.primaryContact}" />
</a4j:support>
</rich:suggestionbox>
</a4j:region>
</h:panelGrid>
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15961
    
  19

That isn't technically a Javascript error. Nor is is a JSF or Java error.

It's a Window error.

It indicates a bug in Windows itself, so I recommend that you search MSN for possible fixpacks or hotfixes.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: javascript error while selecting value from combo box
 
Similar Threads
Retreiving the selected value of the suggestion box
Rich Faces suggestion box
Multiple submits and performance?
RichFaces SuggestionBox Not Displaying Values
Data from search not being dynamically added to rich:dataTable