You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by sback <sb...@sback.it> on 2007/12/05 01:07:18 UTC
Faceletes and MyFaces Tomahawk fileupload
Hi,
I am really worried because I am trying to implement a simple file upload
in my application and I cannot manage to do it if I use Facelets and
Tomahawk.
Here: http://sback.it/jsfupload.war you find the little test application.
I tried it without Facelets and it works perfectly, on the other side, when
I use facelets this part doesn't work:
[see file MyForm.xhtml, for the whole view]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
[CUT]
xmlns:t="http://myfaces.apache.org/tomahawk">
<body>
<ui:composition>
<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: "/>
<t:inputFileUpload id="myFileId"
value="#{myBean.myFile}"
storage="file"
required="true"/>
<h:message for="myFileId"/>
[CUT]
<h:commandButton value="Submit"
action="#{myBean.processMyFile}"/>
<h:outputText value=" "/>
</h:panelGrid>
</h:form>
</ui:composition>
[CUT]
the attribute -enctype="multipart/form-data"- prevents the commandButton
action to be correctly perfomed. What I get is the form redisplaying without
any action on the bean.
If I remove the -enctype- attribute then the action is executed, but the
#{myBean.myFile} is not correctly filled with the file.
I searched for a solution for the whole afternoon, but without results.
I am using facelets 1.1.3 + jboss 4.0.5.GA + myfaces 1.1.5 + tomahawk 1.1.6
+ http://code.google.com/p/tomahawk-facelets/
Could you please help me! I am really worried for this problem :(
Thank you very much
Sback
--
View this message in context: http://www.nabble.com/Faceletes-and-MyFaces-Tomahawk-fileupload-tf4946575.html#a14162468
Sent from the MyFaces - Users mailing list archive at Nabble.com.
RE: Building tomahawk 1.1.19 fails during tests
Posted by "Knudsen, Joe" <Jo...@state.mn.us>.
That could be my proxy. I will take a look at that thanks!
________________________________
From: Leonardo Uribe [mailto:lu4242@gmail.com]
Sent: Wednesday, May 06, 2009 1:49 PM
To: MyFaces Discussion
Subject: Re: Building tomahawk 1.1.19 fails during tests
Hi Joe
Checking the latest code (1.1.9-SNAPSHOT) everything compiles fine
(tomahawk core and core12).
But this tests fails if your computer does not have internet connection,
or maven does not have proper proxy configuration (the tests validates
.tld and faces-config.xml files):
------------------------------------------------------------------------
-------
Test set: org.apache.myfaces.test.MyFacesTagLibTestCase
------------------------------------------------------------------------
-------
Tests run: 3, Failures: 0, Errors: 3, Skipped: 0, Time elapsed: 1.016
sec <<< FAILURE!
testUniqueTagTestCase(org.apache.myfaces.test.MyFacesTagLibTestCase)
Time elapsed: 0.625 sec <<< ERROR!
java.net.UnknownHostException: java.sun.com
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177)
at java.net.Socket.connect(Socket.java:519)
at java.net.Socket.connect(Socket.java:469)
at sun.net.NetworkClient.doConnect(NetworkClient.java:157)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:233)
at sun.net.www.http.HttpClient.New(HttpClient.java:306)
at sun.net.www.http.HttpClient.New(HttpClient.java:323)
You can skip tests and compile tomahawk offline using:
mvn install -o -Dmaven.test.skip=true
regards
Leonardo Uribe
2009/5/6 Knudsen, Joe <Jo...@state.mn.us>
I trying to build tomahawk 1.1.19 and receive these errors so the build
fails. Any ideas or should I bypass the tests. Thanks, Joe Knudsen
INFO: Starting up Tomahawk on the MyFaces-JSF-Implementation
WARNING: Component _id1 just got an automatic id, because there was no
id assigned yet. If this component was created dynamically (i.e. not by
a JSP tag) you should assign it an explicit static id or assign it the
id you get from the createUniqueId from the current UIViewRoot component
right after creation!
WARNING: Component _id1:_id0 just got an automatic id, because there was
no id assigned yet. If this component was created dynamically (i.e. not
by a JSP tag) you should assign it an explicit static id or assign it
the id you get from the createUniqueId from the current UIViewRoot
component right after creation!
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.031
sec
Running org.apache.myfaces.component.html.ext.HtmlInputHiddenTest
WARNING: Component _id0 just got an automatic id, because there was no
id assigned yet. If this component was created dynamically (i.e. not by
a JSP tag) you should assign it an explicit static id or assign it the
id you get from the createUniqueId from the current UIViewRoot component
right after creation!
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec
Running
org.apache.myfaces.custom.selectOneLanguage.SelectOneLanguageRendererTes
t
WARNING: Component _id0 just got an automatic id, because there was no
id assigned yet. If this component was created dynamically (i.e. not by
a JSP tag) you should assign it an explicit static id or assign it the
id you get from the createUniqueId from the current UIViewRoot component
right after creation!
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.032
sec
Results :
Tests in error:
testUniqueTagTestCase(org.apache.myfaces.test.MyFacesTagLibTestCase)
testUniqueTagAttributes(org.apache.myfaces.test.MyFacesTagLibTestCase)
testSetters(org.apache.myfaces.test.MyFacesTagLibTestCase)
testClassPath(org.apache.myfaces.test.TomahawkClassElementTestCase)
Tests run: 178, Failures: 0, Errors: 4, Skipped: 0
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] There are test failures.
Re: Building tomahawk 1.1.19 fails during tests
Posted by Leonardo Uribe <lu...@gmail.com>.
Hi Joe
Checking the latest code (1.1.9-SNAPSHOT) everything compiles fine (tomahawk
core and core12).
But this tests fails if your computer does not have internet connection, or
maven does not have proper proxy configuration (the tests validates .tld and
faces-config.xml files):
-------------------------------------------------------------------------------
Test set: org.apache.myfaces.test.MyFacesTagLibTestCase
-------------------------------------------------------------------------------
Tests run: 3, Failures: 0, Errors: 3, Skipped: 0, Time elapsed: 1.016 sec
<<< FAILURE!
testUniqueTagTestCase(org.apache.myfaces.test.MyFacesTagLibTestCase) Time
elapsed: 0.625 sec <<< ERROR!
java.net.UnknownHostException: java.sun.com
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177)
at java.net.Socket.connect(Socket.java:519)
at java.net.Socket.connect(Socket.java:469)
at sun.net.NetworkClient.doConnect(NetworkClient.java:157)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:233)
at sun.net.www.http.HttpClient.New(HttpClient.java:306)
at sun.net.www.http.HttpClient.New(HttpClient.java:323)
You can skip tests and compile tomahawk offline using:
mvn install -o -Dmaven.test.skip=true
regards
Leonardo Uribe
2009/5/6 Knudsen, Joe <Jo...@state.mn.us>
>
> I trying to build tomahawk 1.1.19 and receive these errors so the build
> fails. Any ideas or should I bypass the tests. Thanks, Joe Knudsen
>
> INFO: Starting up Tomahawk on the MyFaces-JSF-Implementation
> WARNING: Component _id1 just got an automatic id, because there was no
> id assigned yet. If this component was created dynamically (i.e. not by
> a JSP tag) you should assign it an explicit static id or assign it the
> id you get from the createUniqueId from the current UIViewRoot component
> right after creation!
> WARNING: Component _id1:_id0 just got an automatic id, because there was
> no id assigned yet. If this component was created dynamically (i.e. not
> by a JSP tag) you should assign it an explicit static id or assign it
> the id you get from the createUniqueId from the current UIViewRoot
> component right after creation!
> Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.031
> sec
> Running org.apache.myfaces.component.html.ext.HtmlInputHiddenTest
> WARNING: Component _id0 just got an automatic id, because there was no
> id assigned yet. If this component was created dynamically (i.e. not by
> a JSP tag) you should assign it an explicit static id or assign it the
> id you get from the createUniqueId from the current UIViewRoot component
> right after creation!
> Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec
> Running
> org.apache.myfaces.custom.selectOneLanguage.SelectOneLanguageRendererTes
> t
> WARNING: Component _id0 just got an automatic id, because there was no
> id assigned yet. If this component was created dynamically (i.e. not by
> a JSP tag) you should assign it an explicit static id or assign it the
> id you get from the createUniqueId from the current UIViewRoot component
> right after creation!
> Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.032
> sec
>
> Results :
>
> Tests in error:
> testUniqueTagTestCase(org.apache.myfaces.test.MyFacesTagLibTestCase)
> testUniqueTagAttributes(org.apache.myfaces.test.MyFacesTagLibTestCase)
> testSetters(org.apache.myfaces.test.MyFacesTagLibTestCase)
> testClassPath(org.apache.myfaces.test.TomahawkClassElementTestCase)
>
> Tests run: 178, Failures: 0, Errors: 4, Skipped: 0
>
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD FAILURE
> [INFO]
> ------------------------------------------------------------------------
> [INFO] There are test failures.
>
Building tomahawk 1.1.19 fails during tests
Posted by "Knudsen, Joe" <Jo...@state.mn.us>.
I trying to build tomahawk 1.1.19 and receive these errors so the build
fails. Any ideas or should I bypass the tests. Thanks, Joe Knudsen
INFO: Starting up Tomahawk on the MyFaces-JSF-Implementation
WARNING: Component _id1 just got an automatic id, because there was no
id assigned yet. If this component was created dynamically (i.e. not by
a JSP tag) you should assign it an explicit static id or assign it the
id you get from the createUniqueId from the current UIViewRoot component
right after creation!
WARNING: Component _id1:_id0 just got an automatic id, because there was
no id assigned yet. If this component was created dynamically (i.e. not
by a JSP tag) you should assign it an explicit static id or assign it
the id you get from the createUniqueId from the current UIViewRoot
component right after creation!
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.031
sec
Running org.apache.myfaces.component.html.ext.HtmlInputHiddenTest
WARNING: Component _id0 just got an automatic id, because there was no
id assigned yet. If this component was created dynamically (i.e. not by
a JSP tag) you should assign it an explicit static id or assign it the
id you get from the createUniqueId from the current UIViewRoot component
right after creation!
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec
Running
org.apache.myfaces.custom.selectOneLanguage.SelectOneLanguageRendererTes
t
WARNING: Component _id0 just got an automatic id, because there was no
id assigned yet. If this component was created dynamically (i.e. not by
a JSP tag) you should assign it an explicit static id or assign it the
id you get from the createUniqueId from the current UIViewRoot component
right after creation!
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.032
sec
Results :
Tests in error:
testUniqueTagTestCase(org.apache.myfaces.test.MyFacesTagLibTestCase)
testUniqueTagAttributes(org.apache.myfaces.test.MyFacesTagLibTestCase)
testSetters(org.apache.myfaces.test.MyFacesTagLibTestCase)
testClassPath(org.apache.myfaces.test.TomahawkClassElementTestCase)
Tests run: 178, Failures: 0, Errors: 4, Skipped: 0
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] There are test failures.
Re: Faceletes and MyFaces Tomahawk fileupload
Posted by piotrnabble <pi...@gowo.pl>.
Have you added the Extensions Filter to the web.xml file ?
<!-- Extensions Filter -->
<filter>
<filter-name>extensionsFilter</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>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>
</filter>
Regards,
Piotr
sback wrote:
>
> Hi,
>
> really nobody could help me?
>
> I should definitively find a way to do a file upload with facelets...
> anyone could suggest me how to do if there is not solution using tomahawk
> and facelets?
>
> Thank you in advance
>
>
>
> sback wrote:
>>
>> Hi,
>>
>> I am really worried because I am trying to implement a simple file
>> upload in my application and I cannot manage to do it if I use Facelets
>> and Tomahawk.
>>
>> [CUT]
>>
>> Could you please help me! I am really worried for this problem :(
>>
>> Thank you very much
>>
>> Sback
>>
>
>
--
View this message in context: http://www.nabble.com/Faceletes-and-MyFaces-Tomahawk-fileupload-tp14162468p23410972.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.
Re: Faceletes and MyFaces Tomahawk fileupload
Posted by sback <sb...@sback.it>.
Hi,
really nobody could help me?
I should definitively find a way to do a file upload with facelets...
anyone could suggest me how to do if there is not solution using tomahawk
and facelets?
Thank you in advance
sback wrote:
>
> Hi,
>
> I am really worried because I am trying to implement a simple file upload
> in my application and I cannot manage to do it if I use Facelets and
> Tomahawk.
>
> [CUT]
>
> Could you please help me! I am really worried for this problem :(
>
> Thank you very much
>
> Sback
>
--
View this message in context: http://www.nabble.com/Faceletes-and-MyFaces-Tomahawk-fileupload-tf4946575.html#a14179140
Sent from the MyFaces - Users mailing list archive at Nabble.com.