-
1. Re: rich:suggestionbox multi field
kragoth Feb 17, 2011 12:32 AM (in response to ferilauw)Let's see.
rich:suggestionBox only has a single value attribute so the simple answer to your question is no you can't use this component to assign values to two separate variables at the same time.
BUT, with a bit of thinking you can do it.
Instead of using the results of your query to build your suggestion list use the results to build a list of DTO objects that contain the combinations of the 2 values you want.
Then, your suggestionbox should use the list of DTOs as it's suggestions.
Then when the user selects a suggestion a valuechange listener could be used to extract the 2 values out of the DTO they selected and set the values on your actual object.
This might require you to change how you load your page a bit but this should work.
There are other ways to solve this problem but, I'd have to think about the solution a bit more before I try to write them down. :)
-
2. Re: rich:suggestionbox multi field
ferilauw Feb 17, 2011 1:44 AM (in response to ferilauw)Hi Sir Tim,
Ok Sir Tim, i will try to learn about DTO with Seam because iam new in Seam and DTO :)
Thanks you so much.