[
http://jira.jboss.com/jira/browse/RF-1009?page=all ]
Amit Agrawal reopened RF-1009:
------------------------------
Hi,
Please find the code snippet from my xhtml.
<h:panelGroup styleClass="selectOneGroup" style="width:300px;">
<h:inputText id="searchUBRNode" value="#{ubrBean.searchNode}"
size="30" required="false"
onkeypress="javascript:detectReturnKey('menu:tree1', 'searchUBR');
return noenter();"/>
<!-- TODO The suggestionbox is fully implemented but currently don't work
There is rendered nothing into the page... something totally wrong here -->
<rich:suggestionbox id="boxid" for="searchUBRNode"
suggestionAction="#{ubrBean.searchNodeForAutocomplete}"
var="result" minChars="2" width="100"
height="50" shadowOpacity="4"
border="2">
<h:column>
<h:outputText value="#{result}" />
</h:column>
</rich:suggestionbox>
<a4j:commandButton id="searchUBR"
action="#{ubrBean.searchUBRNodes}"
styleClass="commandButton_blue_medium"
value="#{messages.search}"
reRender="bizUnit,ubrTreeBig,menuErrors"/>
</h:panelGroup>
This is my action method,
/**
* searching for nodes for autocompletion.
* This is still not fixed for richfaces, see the jira entry RF-9 on JBOSS
*/
public List<String> searchNodeForAutocomplete(Object suggest) {
log.warn("searchNodeForAutocomplete " + suggest);
Vector<String> result = new Vector<String>();
try{
String searchName = (String) suggest;
Vector<UBRNode> foundNodes = searchNodes(searchName, ubrDate);
boolean lookName = isUBRName(searchNode);
// we return first the description if user searched for description else first the
name
for (UBRNode node : foundNodes) {
result.add(lookName ? (node.getName() + " " + node.getDescription())
: (node.getDescription() + " " + node.getName()));
}
}catch (Exception e) {
handleError(e, "searchNodeForAutocomplete");
}
return result;
}
This is the entry for the tag in my taglib :
<tag>
<tag-name>suggestionbox</tag-name>
<component>
<component-type>org.richfaces.SuggestionBox</component-type>
<renderer-type>org.richfaces.SuggestionBox</renderer-type>
</component>
</tag>
Please let me know If anything else is required.
Thanks in advance,
Amit
rich:suggestionBox not working
------------------------------
Key: RF-1009
URL:
http://jira.jboss.com/jira/browse/RF-1009
Project: RichFaces
Issue Type: Bug
Affects Versions: 3.1.0, 3.2.0
Environment: Weblogic 9.2, IE 6
Reporter: Amit Agrawal
The suggestionbox feature is not working for me.
The request goes to server but the suggestionAction method is not at all gets called.
And the response comes back without any action being taken.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira