-
15. Re: How to add template?
ilya_shaikovsky Aug 3, 2007 8:44 AM (in response to krasig)If you work with JSF project - right-click in package explorer "add JSF capabilities", fill wizard fields and click Ok. Project should appears in View.
-
16. Re: How to add template?
ilya_shaikovsky Aug 3, 2007 8:45 AM (in response to krasig)please paste your file code here.
-
17. Re: How to add template?
krasig Aug 3, 2007 8:47 AM (in response to krasig)<?xml version="1.0" encoding="UTF-8"?> <web-app version="2.5"> <!-- Use Documents Saved as *.xhtml --> <context-param> <param-name>javax.faces.DEFAULT_SUFFIX</param-name> <!-- <param-value>.jsp</param-value> --> <param-value>.xhtml</param-value> </context-param> <!-- Special Debug Output for Development --> <context-param> <param-name>facelets.DEVELOPMENT</param-name> <param-value>true</param-value> </context-param> <context-param> <param-name>facelets.LIBRARIES</param-name> <param-value> /WEB-INF/facestrace.taglib.xml;/WEB-INF/tomahawk.taglib.xml </param-value> </context-param> <!-- Optional JSF-RI Parameters to Help Debug --> <context-param> <param-name>com.sun.faces.validateXml</param-name> <param-value>true</param-value> </context-param> <context-param> <param-name>com.sun.faces.verifyObjects</param-name> <param-value>true</param-value> </context-param> <context-param> <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name> <param-value>com.sun.facelets.FaceletViewHandler</param-value> </context-param> <!-- RichaFaces --> <context-param> <param-name>org.ajax4jsf.SKIN</param-name> <param-value>blueSky</param-value> </context-param> <filter> <display-name>Ajax4jsf Filter</display-name> <filter-name>ajax4jsf</filter-name> <filter-class>org.ajax4jsf.Filter</filter-class> </filter> <!-- Tomahawk --> <filter> <filter-name>MyFacesExtensionsFilter</filter-name> <filter-class> org.apache.myfaces.webapp.filter.ExtensionsFilter </filter-class> <init-param> <description> Set the size limit for uploaded files. Format: 10 - 10 bytes 10k - 10 KB 10m - 10 MB 1g - 1 GB </description> <param-name>maxFileSize</param-name> <param-value>20m</param-value> </init-param> </filter> <filter-mapping> <filter-name>ajax4jsf</filter-name> <servlet-name>Faces Servlet</servlet-name> <dispatcher>REQUEST</dispatcher> <dispatcher>FORWARD</dispatcher> <dispatcher>INCLUDE</dispatcher> </filter-mapping> <!-- extension mapping for adding <script/>, <link/>, and other resource tags to JSF-pages extension mapping for adding <script/>, <link/>, and other resource tags to JSF-pages --> <filter-mapping> <filter-name>MyFacesExtensionsFilter</filter-name> <url-pattern>*.jsf</url-pattern> </filter-mapping> <!-- extension mapping for serving page-independent resources (javascript, stylesheets, images, etc.) --> <filter-mapping> <filter-name>MyFacesExtensionsFilter</filter-name> <url-pattern>/faces/myFacesExtensionResource/*</url-pattern> </filter-mapping> <!-- Faces Servlet --> <servlet> <servlet-name>Faces Servlet</servlet-name> <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <!-- Faces Servlet Mapping --> <servlet-mapping> <servlet-name>Faces Servlet</servlet-name> <url-pattern>*.jsf</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>Faces Servlet</servlet-name> <url-pattern>/faces/*</url-pattern> </servlet-mapping> <login-config> <auth-method>BASIC</auth-method> </login-config> </web-app>
-
18. Re: How to add template?
ilya_shaikovsky Aug 3, 2007 8:52 AM (in response to krasig)xm.. this should be checked with the developers.
The simpliest I can suggest you - create new project using RHDS JSF wizard and perform the steps I've written earlier there. This project will be in this view. And created templates will appears for all the workspace projects. -
19. Re: How to add template?
krasig Aug 3, 2007 8:59 AM (in response to krasig)Ok. but could you explain me where will be stored this template?
Can i remove this "builk" project? -
20. Re: How to add template?
krasig Aug 3, 2007 9:02 AM (in response to krasig)... when create template in Project A it's only for this project.
In Project B "Template" field is empty!!!!
Sorry for my poor English!! -
21. Re: How to add template?
ilya_shaikovsky Aug 3, 2007 9:02 AM (in response to krasig)yes you may remove it. This page will be stored in .metadata folrder of your workspace.
-
22. Re: How to add template?
krasig Aug 3, 2007 9:04 AM (in response to krasig)If this page(template) is stored in .metadata how will be modified when this is necessary????
-
23. Re: How to add template?
ilya_shaikovsky Aug 3, 2007 9:05 AM (in response to krasig)strange.. for me its applied to both my projects.
-
24. Re: How to add template?
krasig Aug 3, 2007 9:07 AM (in response to krasig)But my project is not in Web view and can't add. My be this difference....
-
25. Re: How to add template?
ilya_shaikovsky Aug 3, 2007 9:18 AM (in response to krasig)At first your web.xml should begins from the following to be recognized by our wizards
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
Ok. Lets try another, "classic" way to cteate templates.
Menu -Winddow - Preferences - Red Hat - JSF - JSF pages. There templates could be added. -
26. Re: How to add template?
krasig Aug 3, 2007 9:27 AM (in response to krasig)Ok. but after paste in the begining of web.xml:
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
I got:CHKJ3000E: WAR Validation Failed: org.eclipse.jst.j2ee.commonarchivecore.internal.exception.DeploymentDescriptorLoadException: WEB-INF/web.xml
and:ets try another, "classic" way to cteate templates.
Menu -Winddow - Preferences - Red Hat - JSF - JSF pages. There templates could be added.
in window "Add Page Template" after click on "Browse" button i see only project that is Web view. And the result is same.
Regards. -
27. Re: How to add template?
sabrashevich Aug 3, 2007 9:34 AM (in response to krasig)Exact steps:
1) create some .xhtml page (that you want to be a template) in some web project
2) open Web Projects View with this project
3) expand Web Content -> <your_xhtml_page>
4) right click this .xhtml page -> Save as Template
5) put some name into "Name" field
6) click OK
Then:
- right click Web Content -> New -> File -> XHTML
- put a name into "Name" field
- select your template in drop down list "Template"
- click Finish -
28. Re: How to add template?
krasig Aug 3, 2007 9:39 AM (in response to krasig)Muhahahah are you in time?