Using myfaces tomahawk inputFileUpload componet
I am using myfaces tomahawk inputFileUpload componet for the following requirement
1. I need to upload images to my user profile page.
2. Resize the image to fit my desired image size to be shown on the page
Promblems
1. The file i upload is done fine and images also show but
the image is stored or refrenced to the local machine , so if i delete or change file location the image dosent show.
what i need is to store the images in a seperate folder on the server or any other place and image should point to that location.
2. Now the image uploaded displayed using jsf's
<h:graphicImage url="fileupload_showimg.faces"/>component where "fileupload_showimg.faces"
is a jsp page containing the following code
which is a scriplet
<%@ page import="java.io.File,
java.io.InputStream,
java.io.FileInputStream,
java.io.OutputStream"%><%@ page session="false" %><%
String contentType = (String)application.getAttribute("fileType");
String fileName = (String)application.getAttribute("fileName");
String allowCache = request.getParameter("allowCache");
String openDirectly = request.getParameter("openDirectly");
if(allowCache == null || allowCache.equalsIgnoreCase("false"))
response.setHeader("pragma", "no-cache");
response.setHeader("Cache-control", "no-cache, no-store, must-revalidate");
response.setHeader("Expires", "01 Apr 1995 01:10:10 GMT");
if(contentType!=null)
response.setContentType(contentType);
if(fileName != null)
fileName = fileName.substring(fileName.lastIndexOf('\\')+1);
fileName = fileName.substring(fileName.lastIndexOf('/')+1);
StringBuffer contentDisposition = new StringBuffer();
if(openDirectly==null || openDirectly.equalsIgnoreCase("false"))
contentDisposition.append("attachment;");
contentDisposition.append("filename=\"");
contentDisposition.append(fileName);
contentDisposition.append("\"");
response.setHeader ("Content-Disposition", contentDisposition.toString());
byte[] bytes = (byte[])application.getAttribute("fileSizeBytes");
if (bytes != null)
response.getOutputStream().write(bytes);
%>works fine but the image shown in its original size most of the time very large.
I tried to fix the image size by changing the code to
<h:graphicImage url="fileupload_showimg.faces" width="300" height="500"/>But now the image is shown is deformed
i need it to be fixed in size and not deformed
me again I think the first part of the problem is been solved now
the 2nd problem is still there hope i can fix that also
Similar Messages
-
JSF: Using of MyFaces Tomahawk UI Components
Hello,
is it possible to use MyFaces Tomahawk UI Components or other MyFaces UI Components with the SAP NetWeaver CE 7.1 Application Server?
Regards,
ArminMyFaces Tomahawk works!
workaround:
1. Copy commons-el-1.0.jar, commons-fileupload-1.0.jar, commons-lang-2.1.jar, commons-logging-1.1.1.jar and tomahawk-1.1.6.jar into the lib folder.
2. Add the following lines to your web.xml file:
<!-- Extensions Filter -->
<filter>
<filter-name>extensionsFilter</filter-name>
<filter-class>
org.apache.myfaces.component.html.util.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>uploadMaxFileSize</param-name>
<param-value>100m</param-value>
</init-param>
<init-param>
<description>
Set the threshold size - files below this limit are
stored in memory, files above this limit are stored on
disk.
Format: 10 - 10 bytes 10k - 10 KB 10m - 10 MB 1g - 1 GB
</description>
<param-name>uploadThresholdSize</param-name>
<param-value>100k</param-value>
</init-param>
<!--
<init-param>
<param-name>uploadRepositoryPath</param-name>
<param-value>/temp</param-value>
<description>Set the path where the intermediary files will be stored.
</description>
</init-param>
-->
</filter>
<filter-mapping>
<filter-name>extensionsFilter</filter-name>
<url-pattern>*.faces</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>extensionsFilter</filter-name>
<url-pattern>/faces/*</url-pattern>
</filter-mapping> -
Encoding issue in importing file using myfaces
Hi,
I are trying to upload a XML file (with UTF-8 encoding) in our JSF UI using myfaces "inputFileUpload" option. But when I am trying to read the file using org.apache.myfaces.custom.fileupload.UploadedFile.getInputStream() API, looks like the encoding is not being preserved and I am getting Scandinavian characters as ‘?’. I have checked this by writing the read contents to a file via stream which is UTF-8 encoded.
How can I preserve the character encoding while reading from the uploaded file?
Thanks.Since UploadedFile.getInputStream() returns an InputStream, you can impose the character encoding when you wrap it with a Reader.
-
BUG: JSP disappears from design view with MyFaces / Tomahawk
Hi,
When I try to create a JSF JSP in design view (as opposed to code view) using MyFaces and Tomahawk 1.1.3, the design view will blank and display "Type, paste or drag and drop content onto this blank....". This usually happens after I've dragged half a dozen JSF outputlabels and inputtext boxes. The code still exists in code view, and will even compile and deploy ok, it's just the design view that stops working. The design view usually blanks while I'm switching between the code tabs at the top of the screen, although I'm fairly sure it blanked as I dropped a textbox onto the form once.
I've restarted JDev, tried to create a second page, clicked refresh etc but I can't get it back. This has happened starting from scratch 3 times now.
I've switched back to the builtin reference implementation JSF (and no Tomahawk), and JDeveloper works fine, so it seems to be a problem using MyFaces. I've added MyFaces and Tomahawk via Manage Libraries.
This Oracle article - http://www.oracle.com/technology/products/jdev/101/howtos/myfaces/index.html
states that the RI version can't be swapped out in JDev Developer Preview version but I understand that's not true now?
I'm using :-
JDeveloper SU4
java 1.5
Windows XP SP1
Thanks for any help.I found the answer. I went to View, Style Rendering and clicked several of the boxes Display Media was one.
-
Uploading file problem in JSF using myfaces-extensions.jar.
Dear All,
I'm new to JSF and trying to upload files using myfaces-extensions-1.0.9.jar and commons-fileupload-1.2.1.jar.
I have upload.jsp and result.jsp and a bean named MyBean.java. after press the submit button it should navigate to result.jsp and shows some info.
My problem is that it successfully run but when submit its not working and remain same page.
upload.jsp:
{<%@page contentType="text/html" pageEncoding="windows-1252"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://myfaces.apache.org/extensions" prefix="x"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<f:view>
<h:form id="MyForm" enctype="multipart/form-data" >
<h:messages globalOnly="true" styleClass="message"/>
<h:panelGrid columns="3" border="0" cellspacing="5">
<h:outputLabel for="myFileId" value="File: "/>
<x:inputFileUpload id="myFileId"
value="#{myBean.myFile}"
storage="file"
required="true"/>
<h:message for="myFileId"/>
<h:outputLabel for="myParamId" value="Param: "/>
<h:selectOneMenu id="myParamId"
value="#{myBean.myParam}"
required="true">
<f:selectItem itemLabel="" itemValue=""/>
<f:selectItem itemLabel="MD5" itemValue="MD5"/>
<f:selectItem itemLabel="SHA-1" itemValue="SHA-1"/>
<f:selectItem itemLabel="SHA-256" itemValue="SHA-256"/>
<f:selectItem itemLabel="SHA-384" itemValue="SHA-384"/>
<f:selectItem itemLabel="SHA-512" itemValue="SHA-512"/>
</h:selectOneMenu>
<h:message for="myParamId"/>
<h:outputText value=" "/>
<h:commandButton id = "test" value="Submit"
action="#{myBean.processMyFile}"/>
<h:outputText value=" "/>
</h:panelGrid>
</h:form>
</f:view>
faces-config.xml
<?xml version='1.0' encoding='UTF-8'?>
<!-- =========== FULL CONFIGURATION FILE ================================== -->
<faces-config version="1.2"
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-facesconfig_1_2.xsd">
<managed-bean>
<managed-bean-name>myBean</managed-bean-name>
<managed-bean-class>
com.devsphere.articles.jsfupload.MyBean
</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
<navigation-rule>
<from-view-id>/upload.jsp</from-view-id>
<navigation-case>
<from-outcome>OK</from-outcome>
<to-view-id>/result.jsp</to-view-id>
</navigation-case>
</navigation-rule>
</faces-config>
Can anybody there for help me whats the problem. I'm using netbeans 6.1 with bundled tomcat 6.0 and no error is shown.Hey All,
I've got my solve. Now Its working. -
Sun RI 1.2 MyFaces Tomahawk 1.1.6 Tomcat 6
Hello,
I have got a running little example with the Sun RI 1.2.
Now I wanted to use the tomahawk implementation from myfaces, too.
In the lib folder in the webapp direction from Tomcat
C:\Programme\Apache Software Foundation\Tomcat 6.0\wtpwebapps\PlaygroundTomahawk\WEB-INF\lib
there are the files:
jsf-api.jar
jsf-impl.jar
tomahawk-1.6.6.jar
But I get an exception when starting Tomcat 6:
SCHWERWIEGEND: Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener
com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED!
Source Document: jar:file:/C:/Programme/Apache%20Software%20Foundation/Tomcat%206.0/wtpwebapps/PlaygroundTomahawk/WEB-INF/lib/tomahawk-1.1.6.jar!/META-INF/faces-config.xml
Cause: Class 'org.apache.myfaces.renderkit.html.util.ExtensionsPhaseListener' is missing a runtime dependency: java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:212)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:174)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3830)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4337)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: com.sun.faces.config.ConfigurationException:
Source Document: jar:file:/C:/Programme/Apache%20Software%20Foundation/Tomcat%206.0/wtpwebapps/PlaygroundTomahawk/WEB-INF/lib/tomahawk-1.1.6.jar!/META-INF/faces-config.xml
Cause: Class 'org.apache.myfaces.renderkit.html.util.ExtensionsPhaseListener' is missing a runtime dependency: java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at com.sun.faces.config.processor.AbstractConfigProcessor.createInstance(AbstractConfigProcessor.java:222)
at com.sun.faces.config.processor.LifecycleConfigProcessor.addPhaseListeners(LifecycleConfigProcessor.java:141)
at com.sun.faces.config.processor.LifecycleConfigProcessor.process(LifecycleConfigProcessor.java:114)
at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:94)
at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:132)
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:202)
... 16 moreHere ist my web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
<display-name>PlaygroundTomahawk</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<filter>
<filter-name>MyFacesExtensionsFilter</filter-name>
<filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
<init-param>
<param-name>maxFileSize</param-name>
<param-value>20m</param-value>
</init-param>
</filter>
<!-- 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>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
</web-app>Here is my faces-config.xml
<?xml version="1.0" encoding="UTF-8"?>
<faces-config
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-facesconfig_1_2.xsd"
version="1.2">
<managed-bean>
<managed-bean-name>
myBean</managed-bean-name>
<managed-bean-class>
mypackage.MyBean</managed-bean-class>
<managed-bean-scope>
request</managed-bean-scope>
</managed-bean>
</faces-config>I hope anyone can help me.
I don�t know if it is generally possible to work with Sun Ri and Tomahawk 1.1.6?
Thank you very much for your answer.
NickiSThank you.
Oh, yes I remember there where some jars I need too... but there is no hint on the myfaces site that I need something else than the tomahawk.jar file.
I looked at an old myfaces project and found those jars:
commons-beanutils-1.7.0.jar
commons-codec-1.3.jar
commons-collections-3.1.jar
commons-digester-1.6.jar
Can you tell me if I need them too? That would be great.
Thank you for your great tutorial "JSF tutorial with Eclipse and Tomcat" (I think you recognized your example ;-) )
NickiS -
Error on using MyFaces component
Hy all,
I don't know if someone as already tested to work with JSF and MyFaces on its WebAS.
In fact I've started by developping a simple JSF page
and next I would like to add some sweet component by using MyFaces and Tomawakh.
For the JSF page, no problem, it rulez, but, when I <b>just</b> add "myfaces-api-1.1.3.jar" and
"my-faces-impl-1.1.3.jar" and deploy it to my server.
No error during deploying but when I'm trying to open a
JSF page I get this long error :
#1.5#000D606F6C2B0026000000270000137800041B1DE87681AB#1155715175094#com.sap.engine.services.servlets_jsp.server.jsp.JSPParser#sap.com/NewsDisplayJSFApp#com.sap.engine.services.servlets_jsp.server.jsp.JSPParser#Guest#2####2839db702cfd11db94ff000d606f6c2b#SAPEngine_Application_Thread[impl:3]_12##0#0#Error#1#/System/Server#Plain###Runtime error in compiling of the JSP file <D:/usr/sap/DEP/JC00/j2ee/cluster/server0/apps/sap.com/NewsDisplayJSFApp/servlet_jsp/newsDisplayJSF/root/NewsError.jsp> !
The error is: java.lang.NullPointerException: null
Exception id: [000D606F6C2B0026000000260000137800041B1DE8767EC8]#
#1.5#000D606F6C2B0026000000280000137800041B1DE8768B06#1155715175094#com.sap.engine.services.servlets_jsp.client.RequestInfoServer#sap.com/NewsDisplayJSFApp#com.sap.engine.services.servlets_jsp.client.RequestInfoServer#Guest#2####2839db702cfd11db94ff000d606f6c2b#SAPEngine_Application_Thread[impl:3]_12##0#0#Error##Plain###Processing HTTP request to servlet [Faces Servlet] finished with error. The error is: com.sap.engine.services.servlets_jsp.server.exceptions.WebIOException: Internal error while parsing JSP page [D:/usr/sap/DEP/JC00/j2ee/cluster/server0/apps/sap.com/NewsDisplayJSFApp/servlet_jsp/newsDisplayJSF/root/NewsError.jsp].
at com.sap.engine.services.servlets_jsp.server.jsp.JSPParser.parse(JSPParser.java:117)
at com.sap.engine.services.servlets_jsp.server.servlet.JSPServlet.getClassName(JSPServlet.java:238)
at com.sap.engine.services.servlets_jsp.server.servlet.JSPServlet.compileAndGetClassName(JSPServlet.java:429)
at com.sap.engine.services.servlets_jsp.server.servlet.JSPServlet.service(JSPServlet.java:169)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.runtime.RequestDispatcherImpl.doWork(RequestDispatcherImpl.java:316)
at com.sap.engine.services.servlets_jsp.server.runtime.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:372)
at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)
at org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)
at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
at com.sap.engine.services.servlets_jsp.server.runtime.FilterChainImpl.runServlet(FilterChainImpl.java:117)
at com.sap.engine.services.servlets_jsp.server.runtime.FilterChainImpl.doFilter(FilterChainImpl.java:62)
at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:64)
at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:224)
at com.sap.engine.services.servlets_jsp.server.runtime.FilterChainImpl.doFilter(FilterChainImpl.java:58)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:373)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)
at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
Caused by: java.lang.NullPointerException
at com.sap.engine.services.servlets_jsp.server.jsp.JSPParser.validate(JSPParser.java:235)
at com.sap.engine.services.servlets_jsp.server.jsp.JSPParser.initParser(JSPParser.java:348)
at com.sap.engine.services.servlets_jsp.server.jsp.JSPParser.parse(JSPParser.java:105)
... 30 more
I mean, in each JSP page I'm trying to use those standard taglib :
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
It crashes.
I've try to add in my web-inf/lib some jar like : servlet_api.jar, servlet.jar, and so on but nothing seam to be working.
I've also try to define the extensionFilter of myfaces in my web.xml but it doesn't help me
Anyone has an idea ? I'll give reward
Thx.Hy,
try do do this:
1) extract the JSF Tag-Lib's from the Jar-File in a folder under the WebContent folder (in my example named as "tld")
2) Add some TagLib- Entries in the WEB.XML like this:
<taglib>
<taglib-uri>http://java.sun.com/jsf/core</taglib-uri>
<taglib-location>tld/jsf_core.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://java.sun.com/jsf/html</taglib-uri>
<taglib-location>tld/html_basic.tld</taglib-location>
</taglib>
<taglib-uri> ist the URL that you use in the JSF Pages and <taglib-location> is the location of the expanded Tag-Libary.
The example above ist based on the Sun-Faces components but it works in the same way for Myfaces oder for the Oracle ADF faces.
Instead of the both Jar's myFaces-api and mafaces-imp I have use the myfaces-all.jar.
I hope this informatin will help you. -
Problem using myfaces on webLogic
I run into the problem using myfaces on webLogic 9.1.
That is... a managedBean's instance is created twice in one page.
That page is consisted with one <h:inputText> and <h:commandButton>.
After some tests, we found out that the problems happens in a JSP which has <h:inputText>...
This problem didn't happen on Tomcat or JDeveloper.
We tried with another application.
And oh my goodness, it didn't happen.
It worked collect with no problems at all.
The difference between two application is,
the former managedBean extends abstract class,
and the latter doesn't.
Pls help me.....It was a program bag rather than weblogic's problem.
In the program, it deleted all the objects in the session scope.
So, after JSF render the next JSP, it re-create a managed bean.
But, I'm still wonder why the same things didn't happen in Tomcat.
WebLogic put managed bean into the session soon after JSF
creates it.
On the otherhand, Tomcat does that after managedbean's action
is completed???
Considering the JSF specification, i think weblogic is right.
Cos,JSF put all the components and related managed bean
into session, in the rendering phase.
Thanks for asking anyway. -
How to use MyFaces component with Java Creator 2
Please advise for me the way to use Myfaces component with Java Creator 2. Thanks
Apologies for the late reply, but currently what exists generally for MyFaces integration with Creator is on this blog:
http://wiki.java.net/bin/view/Javatools/CustomComponentLibraries
You might also want to post the same question on the nbusers alias on netbeans.org, referencing Visual Web Pack
Regards,
-Brad Mayer -
Help me out to get the jar files for FileUpload using MyFaces.
hi,
Can anyone help to get the jar files for FileUpload using MyFaces.
I want myfaces-extensions.jar and commons-fileupload-1.0.jar.
Thank you.you can't control the speed of a for-loop.
you can remove your code from a for-loop and use a function to execute the code in your for-loop and you control how frequently you call the function. -
Using a tomahawk tag library.
The problem of displaying rows as columns in h:dataTable has been solved using the t:dataList tag.
I need a way to be able to rearrange components (dynamically) and display. I need some examples using the tomahawk tags. help will be appreciated.take a look at this this
-
I tried to configure my RAD to use myface but not worked.. Might I know the configuration ?
Thanks in advance !!!Hi,
I followed the installation instruction in http://wiki.apache.org/myfaces/Websphere_Installation (w/o removing IBM jar :
1) Copyed the myfaces & comons jar into WEB-INF/lib dir
2) Change the class loader to Paranet Last.
But seems it is still using IBM jsf. Do I need to make change to web.xml?
My web.xml :*
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>
myfaces</display-name>
<context-param>
<description>
Monitors Faces JSP files for modifications and synchronizes a running server with
the changes without restarting the server. If this parameter is set to false or
removed from the deployment descriptor, any changes made to Faces JSP files may
not be seen by the server until it is restarted. This parameter is usually set
to true while the Faces JSP files are being developed and debugged in order to
improve the performance of the development environment.</description>
<param-name>com.ibm.ws.jsf.JSP_UPDATE_CHECK</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<description>
</description>
<param-name>com.ibm.ws.jsf.LOAD_FACES_CONFIG_AT_STARTUP</param-name>
<param-value>true</param-value>
</context-param>
<listener>
<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
</listener>
<servlet id="Servlet_1220496317468">
<servlet-name>JS Resource Servlet</servlet-name>
<servlet-class>
com.ibm.faces.webapp.JSResourceServlet</servlet-class>
<load-on-startup>-1</load-on-startup>
</servlet>
<servlet id="Servlet_1220496318640">
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>
javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>-1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>JS Resource Servlet</servlet-name>
<url-pattern>/.ibmjsfres/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.faces</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
</web-app>
Pls advise it...Thanks !! -
MyFaces Tomahawk more than one tree2
Hi everybody, I'm new with JSP and I'll appreciate some help with this:
I have a JSP app implementing MyFaces Tomahawk tree2 with TreeBacker class modified, the component renders pretty well, but I need to show another tree completely different, I made a new class almost equal than TreeBacker but the name and the new tree structure, but at runtime the tree doesn't renders.
In the running tree2:
<t:tree2 id="clientTree" value="#{treeBacker.treeData}" var="node" varNodeToggler="t" clientSideToggle="true">Additionaly, why if I change treeBacker.treeData to TreeBacker.treeData the tree2 doesn't renders ??
In the rebel tree2:
<t:tree2 id="clientTree" value="#{treeBacker2.treeData}" var="node" varNodeToggler="t" clientSideToggle="true">this tree2 doesn't work....
What I'm doing wrong ?I don't understand very good who works the repeater that you put there. And in the dataprovider I have to know how many trees I will have? Because I don't know how many trees I will have(in one moment 1, later 4, later 2... I could put a variable but I don't understand very good how can I do the repeater and..).
I get create a dinamic Vbox with X tress, but putting all the xml in one, something like this:
<?xml version="1.0" encoding="UTF-8"?>
<Cuentas>
<Cuenta id="cuenta1" label="cuenta1">
<node label="INBOX">
<node label="Nombre">
</node>
</node>
</Cuenta>
<Cuenta id="cuenta2" label="cuenta2">
<node label="INBOX">
<node label="Apellido">
</node>
</node>
</Cuenta>
</Cuentas>
With my treeLoad code I create 2 tress in one Vbox, if the xml document have 3 diferents Cuenta I will create 3 trees. But now I have different xml and I don't how can I do the same. -
Can we really use jsf-impl.jar(while using myfaces) for real-time application?
I saw some people posting messages where they are discussing that we can add SUN JSF-RI jar files in those application where we are using myfaces.
http://forum.sun.com/jive/thread.jspa?threadID=108494&tstart=0me again I think the first part of the problem is been solved now
the 2nd problem is still there hope i can fix that also -
JSF 1.2 + myFaces Tomahawk
Hi,
I'm trying to use tomahawk component (t:inputFileUpload) in JSF 1.2 application.
When I'm runing the app this kind of warrning apperas
2007-04-23 15:39:41 com.sun.faces.renderkit.html_basic.HtmlBasicRenderer getForComponent
WARNING: Unable to find component with ID cover in view.
2007-04-23 15:39:41 com.sun.faces.renderkit.html_basic.HtmlBasicRenderer getForComponent
WARNING: Unable to find component with ID cover in view.cover is an ID of tomahawk component.
Can somebody help?
Thx in advanceAmittev,
Thank you. I really appreciate your help. Now the examples are working just fine in my computer.
By the way, I have another question for you considering your kindness taken your time to share your expertise.
I'm facing a Tiles and Facelets dilema. Which framework do you recomend me to invest my time learning it??.
Thanks again for your time and consideration.
Maybe you are looking for
-
Do I even need to script this? Adding metadata to Web Gallery...
I've been pulling my hair out over this for a few days, and apologize if this is mis-posted or obvious... Bridge CS4, Adobe Output Module. The galleries generated from this are lovely, but missing (to my eye) only one thing. I'm trying to figure out
-
External Style Sheet ??
Read and Practice and it all comes together! :) Well, most of it anyway... I am doing CSS LAYOUT and I forgot to create an external style sheet or something. Can I just take all the CSS code in the header now and paste it into a text file and save it
-
My iPhone's notes are gone. I noticed this afte rI did the latest update. What happened to them? I think I back up my phone before I did the update, but I'm not sure to where or how. How do I get to them? I had so many important notes.
-
How do I update it Camera Raw?
I have to update my camera raw and I don't know how, I'd like some guidance please!
-
HI. My arm seems to be fatigued already from the angle at which I have to look at or use my apple watch. Just wondering if anyone else is experiencing this?