-
1. Re: Dynamic view for s:button control?
stu2 May 23, 2007 9:18 AM (in response to anescu)s:button results in a get, not a post. I think you want h:commandButton.
-
2. Re: Dynamic view for s:button control?
anescu May 23, 2007 9:23 AM (in response to anescu)I don't need a post.
I just need 2 URLs, one for each value in the combo box. As I said, in Javascript + Struts this would mean something like 10 lines of code.
The flow would be:
1) I select value C from combo
2) I click the button
3) I end up on the C specific page (used to add a new entity of type C, in this case).
So no post/page reload should happen between 1 and 2. I also would like to keep as simple as possible. -
3. Re: Dynamic view for s:button control?
baz May 23, 2007 10:04 AM (in response to anescu)Sorry, i do not have a ready made solution for you, only some ideas.
Asyou said you will have to use javascript.
(There are many frameworks for javascript out there.)
1. I suggest to try richfaces.
You will ajaxenable the combobox in a way that you are able to rerender the button.
2. Use a menu (richfaces has one)
3. Make your solution with javascript only. Surely hard to do, but possible.
4. one jsf-way to do it:
When the button is clicked an action is triggered. This action will check the selected value of the combobox and returns an outcome. The navigation rules of your application will navigate to the page which is determined by the outcome.
Hope this helps enough to get an idea for the direction to work further. -
4. Re: Dynamic view for s:button control?
anescu May 23, 2007 11:01 AM (in response to anescu)Hi,
tnx for the solutions.
I already implemented it with no 4 (action + navigation rules), but it would be more user friendly to use the richFaces dropDownMenu component (i've seen the demo on exadel's site).
However, when I try to use it on a page, I get this error:<rich:dropDownMenu> Tag Library supports namespace: http://richfaces.ajax4jsf.org/rich, but no tag was defined for name: dropDownMenu
I'm using Seam 1.2.1 and a seam generated project, with the default libraries. Is this a new developed component from richFaces? -
5. Re: Dynamic view for s:button control?
nathandennis Jul 14, 2007 3:20 PM (in response to anescu)im sure it is something simple... but im having the same trouble with the same revision. anyone figure this out? i really dont have haft a day to waste looking for it.