Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes JSF and the fly likes commandButton problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "commandButton problem" Watch "commandButton problem" New topic
Author

commandButton problem

der mer
Greenhorn

Joined: Jan 16, 2008
Posts: 3
Hello. When i include a page with <a4j:include and in that page i have a command button, this does not work. If i put the same button in the main page not in the included one the problem is solved. Why i cannot use this command button in a included file?

like a structure :
main.xhtml includes second.xhtml. second.xhtml has the command button. my faces-config :

<navigation-rule>
<from-view-id>main.xhtml</from-view-id>
<navigation-case>
<from-outcome>newdocument</from-outcome>
<to-view-id>third.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
der mer
Greenhorn

Joined: Jan 16, 2008
Posts: 3
Any idea?
Dushyant Agarwal
Ranch Hand

Joined: Oct 14, 2007
Posts: 75
Hi,
you could try putting " / " before entering the name of the page in faces config



Similarly for to view Id.

On the other hand you could try giving in the name second.xhtml in from view id space.
[ January 18, 2008: Message edited by: Dushyant Agarwal ]
der mer
Greenhorn

Joined: Jan 16, 2008
Posts: 3
This 2 solutions didn't worked
Dushyant Agarwal
Ranch Hand

Joined: Oct 14, 2007
Posts: 75
Hi,
If i put the same button in the main page not in the included one the problem is solved


Had you put f:view tag around html,head ,body in main.xhtml,second.xhtml,third.xhtml??

If not...........then
Does this mean that you had got navigation working between different resources without view roots??
Dushyant Agarwal
Ranch Hand

Joined: Oct 14, 2007
Posts: 75
Hi,
Could you give us the code showing how did you acheive navigation using .xhtml pages ??

It would be really helpfull...!!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: commandButton problem