Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

commandButton problem

 
der mer
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any idea?
 
Dushyant Agarwal
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This 2 solutions didn't worked
 
Dushyant Agarwal
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Could you give us the code showing how did you acheive navigation using .xhtml pages ??

It would be really helpfull...!!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic