-
1. Re: Calling class method on form entry
pete007 Mar 1, 2008 6:51 AM (in response to pete007)Maybe that was too long .. or too simple? .. here's a shorter try:
I got this in my form:
Start: #{router.start} <h:graphicImage value="../images/#{router.startImage}"/>
The content of the variable startImage is calculated by a method router.findRoute();
Assuming, I call it by a GET request like this:
http://localhost:8080/gdc/showonlyform.xhtml?start=Terminal1
I only see the String
Start: Terminal1
, but there is no image.I tried to place a page action in pages.xml to call the method:
<page view-id="showonlyform*" action="#{router.findRoute}"> <param name="start" value="#{router.start}"/> </page>
But there is still no image. The method isn't called. Nothing in the logs.
Any ideas, where to look next?
-
2. Re: Calling class method on form entry
kariem Mar 1, 2008 9:28 AM (in response to pete007)For your second example: is it possible that you are missing the / in front of the view-id? Shouldn't it be
<page view-id="/showonlyform*" …
Just guessing, because all my rules are setup this way. For the page configuration I prefer using <view-id>.page.xml. Shouldn't an error be raised, just the way you receive an error in <s:link/> if the view-id does not start with a slash?
Did you try calling the action directly, and just returning the view id from the action? Or instead, returning an identifier which is used in navigation rules?
-
3. Re: Calling class method on form entry
pete007 Mar 1, 2008 2:26 PM (in response to pete007)You're right, I only forgot the slash, will check this later, when I'm at home, thanks a lot.
I didn't get any error messages, but I think, that you cannot force a slash at the beginning because the term is a regexp and could be like "*Edit*" or some weird stuff, which is valid too. What would a view-id without slash reference to? If there is nothing, that can be accessed this way, it can be deleted.