-
1. Re: Newbie : How can I load datas before going on my JSP Pag
pmuir Mar 5, 2007 9:45 AM (in response to guib)A page action or the @Factory pattern
-
2. Re: Newbie : How can I load datas before going on my JSP Pag
guib Mar 5, 2007 10:14 AM (in response to guib)First, thank you for your answer.
So, to use a page action, I need to declare something on the pages.xml file. I can't find this file in my project (I've generate my project using seam-gen), but I've got an exemple in an exemple project. I've created the pages.xml file and added it contains :
<page view-id="/deposit.xhtml" action="#{Deposit.test}"/>
Where Deposit is my action, test a public method that just initalized a String and deposit.xhtml my page.
=> 2 questions :
- Can I use this method with XHTML pages instead of JSP
- Do I need to reference my pages.xml file somewhere ? -
3. Re: Newbie : How can I load datas before going on my JSP Pag
pmuir Mar 5, 2007 10:20 AM (in response to guib)1) If by XHTML you mean a facelets view, then yes.
2) You should make sure pages.xml is in the WEB-INF/ of your war, then seam will use it. -
4. Re: Newbie : How can I load datas before going on my JSP Pag
guib Mar 5, 2007 10:28 AM (in response to guib)1) yes
2) not present on the war.
I also have compilation pbms so I will start a clean new project then retry this...
Thx. -
5. Re: Newbie : How can I load datas before going on my JSP Pag
pmuir Mar 5, 2007 10:30 AM (in response to guib)seam-gen will do this for you - a great way to set up a new project ;)
-
6. Re: Newbie : How can I load datas before going on my JSP Pag
guib Mar 5, 2007 10:47 AM (in response to guib)Ok.
I will explain the whole test that I need to do, so you can maybe give me advices.
I need to make a new voice project : I need to use JSP to generate VoiceXML pages. I have a media server wich call my seam application (for exemple localhost:8080/Test/anAction.seam) and this action must return a VXML page.
In my VXML page I need to add informations that I can retrieve from a database and services. So my problem is to call a seam action page that will retrieve needed information then construct my JSP pages with this informations that will generate VXML.
If I've undertood you well, you told me to :
1- generate new project with seam-gen
2- add my action page a method that retrieve datas.
3- add pages.xml file to WEB-INF and make sure it's present in my war
is that what you mean ? -
7. Re: Newbie : How can I load datas before going on my JSP Pag
pmuir Mar 5, 2007 10:49 AM (in response to guib)If you use seamgen you will have a pages.xml file already, that gets added to the war. Otherwise, correct.
-
8. Re: Newbie : How can I load datas before going on my JSP Pag
guib Mar 5, 2007 10:51 AM (in response to guib)Ok, thx a lot...