-
1. Re: Suggestionbox: Setting the selected row/value in servers
ilya_shaikovsky Dec 3, 2007 8:29 AM (in response to mtaal)Please try to update the RF version to latest stable available. (3.1.2 GA or 3.1.3 SNAPSHOT).. We've fixed some params bugs till this versions.
-
2. Re: Suggestionbox: Setting the selected row/value in servers
mtaal Dec 3, 2007 8:52 AM (in response to mtaal)Thanks, I tried the 3.1.2 version but it did not work, where can I find the 3.1.3 snapshot?
gr. Martin -
4. Re: Suggestionbox: Setting the selected row/value in servers
mtaal Dec 3, 2007 5:15 PM (in response to mtaal)I tried the snapshot but it does not work either. The methods are called but all values are null. I checked the log using a4j:log but did not see anything special.
Is there something else I can check/debug?
gr. Martin -
5. Re: Suggestionbox: Setting the selected row/value in servers
ilya_shaikovsky Dec 4, 2007 5:50 AM (in response to mtaal)create bug in our jira. crate small sample to reproduce and attach to bug please (working war with sources).
-
6. Re: Suggestionbox: Setting the selected row/value in servers
tjakopec Dec 4, 2007 5:58 AM (in response to mtaal)16. nov (http://jira.jboss.com/jira/browse/RF-1363)I put on jira same problem, it was closed and then reopened. Problem was not calling method, now I try, it does call method but SB value is null.
-
7. Re: Suggestionbox: Setting the selected row/value in servers
ilya_shaikovsky Dec 4, 2007 6:20 AM (in response to mtaal)you may attach your example there and add comment about your problem.
-
8. Re: Suggestionbox: Setting the selected row/value in servers
tjakopec Dec 4, 2007 6:24 AM (in response to mtaal)"ilya_shaikovsky" wrote:
you may attach your example there and add comment about your problem.
its already attached :) -
9. Re: Suggestionbox: Setting the selected row/value in servers
akushunin Dec 4, 2007 10:38 AM (in response to mtaal)mtaal, I can't reproduce your problem, on my side (JSF 1.2, Tomcat 6.0.14, RF 3.1.3 Snapshot)all works fine. Please provide us with application, witch allows us reproduce this issue.
-
10. Re: Suggestionbox: Setting the selected row/value in servers
cyberanto Dec 4, 2007 11:53 AM (in response to mtaal)In the demo that comes with 3.1.2GA, AjaxListener does not obtain an event when the user clicks on one of the choices in the suggestionbox.
Therefore, it is not possible to update the Bean to the value selected in the dropdown and visible on the page.
The value *is* available if one adds e.g. a <h:commandButton ...> and submits the form. Obviously, I want this value without a full page submit in order to drive some other functionality on the page.
Environment: JBoss 4.2, JSF1.2, ADF, Richfaces3.1.2GA. I copied the example from the distribution into my workspace and added an update Action method to the SuggestionBox class which prints out the value of the variable "property" in the example when the user hits the commandButton. -
11. Re: Suggestionbox: Setting the selected row/value in servers
akushunin Dec 4, 2007 12:03 PM (in response to mtaal)this problem fixed in 3.1.3 version, which will be released in a week and now you can use snapshots.
-
12. Re: Suggestionbox: Setting the selected row/value in servers
cyberanto Dec 5, 2007 9:25 AM (in response to mtaal)akushin, I got the Dec 04 Snapshot of 3.1.3 - same issue. Clicking on one of the choices does not call the listener and does not update the value of the bean.
Updating any other input field in the demo afterwards will update the value.
I have to mention that I updated the JavaScript files only - the <a4j:loadStyle src="resource:///..." does not work in my setup combining ADF with RichFaces, neither does loadScript - I have to add the scripts and styles "manually".
My temporary fix is an update button after the input field. -
13. Re: Suggestionbox: Setting the selected row/value in servers
mtaal Dec 6, 2007 1:50 AM (in response to mtaal)Hi,
It still does not work for me using the latest snapshot and trying out the suggestionbox richfaces example. I did the following:
- downloaded the richfaces examples
- replaced the richfaces jars with the snapshot of the 5th of december
- added this to the suggestionbox example backing bean:public void onSelect() { System.err.println("SELECTION OCCURED: " + getSelectedValue()); } private String selectedValue; /** * @return the selectedValue */ public String getSelectedValue() { return selectedValue; } /** * @param selectedValue * the selectedValue to set */ public void setSelectedValue(String selectedValue) { System.err.println("SELECTED VALUE SET: " + selectedValue); this.selectedValue = selectedValue; }
- added the onselect a4j:support to the suggestionbox xhtml page inside the rich:suggestionbox tag:<rich:suggestionbox id="suggestionBoxId" for="text" tokens=",[" rules="#{suggestionBox.rules}" suggestionAction="#{suggestionBox.autocomplete}" var="result" fetchValue="#{result.text}" rows="#{suggestionBox.intRows}" first="#{suggestionBox.intFirst}" minChars="#{suggestionBox.minchars}" shadowOpacity="#{suggestionBox.shadowOpacity}" border="#{suggestionBox.border}" width="#{suggestionBox.width}" height="#{suggestionBox.height}" shadowDepth="#{suggestionBox.shadowDepth}" cellpadding="#{suggestionBox.cellpadding}"> <h:column> <h:outputText value="#{result.text}" /> </h:column> <a4j:support event="onselect" action="#{suggestionBox.onSelect}"> <f:setPropertyActionListener value="#{result.label}" target="#{suggestionBox.selectedValue}" /> </a4j:support> </rich:suggestionbox>
When running this example and selecting values, the following is printed:
SELECTED VALUE SET: null
SELECTION OCCURED: null
SELECTED VALUE SET: null
SELECTION OCCURED: null
So as far as I can see the call to the backing bean is done but no value is send back to the server.
Is something wrong with my setup?
Should I attach the source files to the jira or should I make a smaller example?
Thanks for any help on this (it is really appreciated).
gr. Martin -
14. Re: Suggestionbox: Setting the selected row/value in servers
tjakopec Dec 6, 2007 2:17 AM (in response to mtaal)We are also waiting solution for this problem. I put JIRA issue with example
http://jira.jboss.com/jira/browse/RF-1363 and they link that issue with this forum thread so i suppose they are fixing it.
We must be patient :)