You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by maurojava <ma...@gmail.com> on 2013/04/18 14:28:16 UTC

primefaces not work with myfaces

I have try primefaces <p:uploadFile> with myfaces .
When i deploy tge applic on to mcat not deploy .
But if u use mojarra it work.
How i can to work p upload primefaces wity myfaces 2 that it is bundled into
tomee ? 

Mauro




--
View this message in context: http://myfaces.10567.n7.nabble.com/primefaces-p-filejUpload-not-work-with-myfaces-tp114620.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.

Re: primefaces not work with myfaces

Posted by "Howard W. Smith, Jr." <sm...@gmail.com>.
See my responses, inline, below, please.

On Thu, Apr 18, 2013 at 12:41 PM, maurojava <ma...@gmail.com>wrote:

> tank you for response.
> my question is not how use the component <p:fileUpload>
> my problem it is that i have to configure same thing i tihink  into web.xml
> or faces-config.xml
> for not get the deployment error when i deploy the application on tomee
> that
> came with myfaces.
>
> the error that i get it is :
> Caused by: java.lang.InstantiationException:
> org.primefaces.context.PrimePartialViewContextFactory
>

Interesting. that doesn't look good. :)


> ---------------------------------------------------------------------
>
> i have found the following web site :
>
> http://www.borislam.com/2013/02/sample-apps-spring-data-mongodb-and-jsf_3493.html
>
>
Spring? i'm not a 'spring' user, nor do I have experience with 'spring'.



> int othe tutorial into web.xml i read many context-param .
>
> For get Primefaces with myfaces i have to set all the parameter????
> I have noted that for the faces servlet it use :
>
> org.apache.myfaces.webapp.MyFacesServlet
>
>  <servlet>
>         <servlet-name>Faces Servlet</servlet-name>
>
>
> <servlet-class>org.apache.myfaces.webapp.MyFacesServlet</servlet-class>
>         <load-on-startup>1</load-on-startup>
>     </servlet>
>
>
> what you think?  it is for myfaces optimezed ?
>
>
I don't have those in web.xml. In my previous response, I shared a URL to
PrimeFaces forum topic, where I shared my web.xml changes.

I have the following in web.xml (in the following order) :

    <filter-mapping>
        <filter-name>PrimeFaces FileUpload Filter</filter-name>
        <servlet-name>Faces Servlet</servlet-name>
    </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>

Re: primefaces not work with myfaces

Posted by maurojava <ma...@gmail.com>.
tank you for response.
my question is not how use the component <p:fileUpload>
my problem it is that i have to configure same thing i tihink  into web.xml
or faces-config.xml 
for not get the deployment error when i deploy the application on tomee that
came with myfaces. 

the error that i get it is :
Caused by: java.lang.InstantiationException:
org.primefaces.context.PrimePartialViewContextFactory

---------------------------------------------------------------------

i have found the following web site :
http://www.borislam.com/2013/02/sample-apps-spring-data-mongodb-and-jsf_3493.html

int othe tutorial into web.xml i read many context-param .

For get Primefaces with myfaces i have to set all the parameter????
I have noted that for the faces servlet it use :

org.apache.myfaces.webapp.MyFacesServlet

 <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        
       
<servlet-class>org.apache.myfaces.webapp.MyFacesServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>


what you think?  it is for myfaces optimezed ?

mauro



--
View this message in context: http://myfaces.10567.n7.nabble.com/primefaces-p-filejUpload-not-work-with-myfaces-tp114620p114626.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.

Re: primefaces not work with myfaces

Posted by Mike Kienenberger <mk...@gmail.com>.
Something to be aware of that I hit yesterday.

The MyFaces Tomahawk extensions filter conflicted with Richfaces 4
(but worked with Richfaces 3) file upload.

If you are using Tomahawk, you might have something similar happening
with Primefaces.

https://issues.jboss.org/browse/RF-10928

On Fri, Apr 19, 2013 at 10:31 AM, Howard W. Smith, Jr.
<sm...@gmail.com> wrote:
> I'm looking at your project now, and will let you know, ASAP.
>
>
> On Fri, Apr 19, 2013 at 10:24 AM, maurojava <ma...@gmail.com>wrote:
>
>> i attach a war project that it work but on glassfsih .
>> Not for tomee .
>>  .
>> it use mojarra implementation of jsf2 and primefaces .
>> deploy it in glassfsih and it work.
>> But i would to modify for use myfaces + primefaces into tomee .
>> mauro
>>
>>
>> >
>> > ______________________________________________________________________
>> > If you reply to this email, your message will be added to the
>> > discussion below:
>> >
>> http://myfaces.10567.n7.nabble.com/primefaces-p-filejUpload-not-work-with-myfaces-tp114620p114636.html
>> > To unsubscribe from primefaces <p:filejUpload> not work with myfaces,
>> > click here.
>> > NAML
>>
>>
>>
>> MYPRIMEFACESUPLOAD.war (2M) <
>> http://myfaces.10567.n7.nabble.com/attachment/114641/0/MYPRIMEFACESUPLOAD.war
>> >
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://myfaces.10567.n7.nabble.com/primefaces-p-filejUpload-not-work-with-myfaces-tp114620p114641.html
>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>>

Re: primefaces not work with myfaces

Posted by "Howard W. Smith, Jr." <sm...@gmail.com>.
I'm looking at your project now, and will let you know, ASAP.


On Fri, Apr 19, 2013 at 10:24 AM, maurojava <ma...@gmail.com>wrote:

> i attach a war project that it work but on glassfsih .
> Not for tomee .
>  .
> it use mojarra implementation of jsf2 and primefaces .
> deploy it in glassfsih and it work.
> But i would to modify for use myfaces + primefaces into tomee .
> mauro
>
>
> >
> > ______________________________________________________________________
> > If you reply to this email, your message will be added to the
> > discussion below:
> >
> http://myfaces.10567.n7.nabble.com/primefaces-p-filejUpload-not-work-with-myfaces-tp114620p114636.html
> > To unsubscribe from primefaces <p:filejUpload> not work with myfaces,
> > click here.
> > NAML
>
>
>
> MYPRIMEFACESUPLOAD.war (2M) <
> http://myfaces.10567.n7.nabble.com/attachment/114641/0/MYPRIMEFACESUPLOAD.war
> >
>
>
>
>
> --
> View this message in context:
> http://myfaces.10567.n7.nabble.com/primefaces-p-filejUpload-not-work-with-myfaces-tp114620p114641.html
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>

Re: primefaces not work with myfaces

Posted by "Howard W. Smith, Jr." <sm...@gmail.com>.
PrimeFaces + MyFaces + TomEE + your test case = simple and beautiful! :)

Sorry, i'm unaware of openshift, so I didn't include that in the above. :)



On Mon, Apr 22, 2013 at 12:02 PM, maurojava <ma...@gmail.com>wrote:

> tank you for all .
> i have read your post into primefaces .
> You have found discovered what it is the problem.
> I have write at Thomas that i am i have signalated the probel to you .
>
> I am a self studi of java programmation
> I think that tomee it is simple and beatiful.
>
> Escuse me if i have write on forum  myfaces but i have think that was a
> problem of myfaces because  fileUpload with mojarra it workl .
>
> I have also created a tomee on openshift over i test my applications.
> FOr example if you go at:
> maurojee-sito.rhcloud.com/moviefun
>
> i have tested the example from Tomee.
> tank you veri much for all.
>
>
>
>
>
> --
> View this message in context:
> http://myfaces.10567.n7.nabble.com/primefaces-p-filejUpload-not-work-with-myfaces-tp114620p114672.html
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>

Re: primefaces not work with myfaces

Posted by maurojava <ma...@gmail.com>.
tank you for all .
i have read your post into primefaces .
You have found discovered what it is the problem.
I have write at Thomas that i am i have signalated the probel to you .

I am a self studi of java programmation
I think that tomee it is simple and beatiful.

Escuse me if i have write on forum  myfaces but i have think that was a
problem of myfaces because  fileUpload with mojarra it workl .

I have also created a tomee on openshift over i test my applications.
FOr example if you go at:
maurojee-sito.rhcloud.com/moviefun

i have tested the example from Tomee. 
tank you veri much for all. 





--
View this message in context: http://myfaces.10567.n7.nabble.com/primefaces-p-filejUpload-not-work-with-myfaces-tp114620p114672.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.

Re: primefaces not work with myfaces

Posted by "Howard W. Smith, Jr." <sm...@gmail.com>.
Mauro, do you see the value of me posting the issue in PrimeFaces forum?
This is not a myfaces issue. MyFaces and OpenWebBeans are working as
designed, IMO.

Thomas (username = tandraschko) fixed the issue, and the fix has been
applied in PrimeFaces 4.0 snapshot. This turned out to be a primefaces
issue and as I said earlier, this discussion, appropriately, belongs in
PrimeFaces forums. Please remember that going forward.

It would be nice if you would reply to that forum topic and introduce
yourself as the one that reported the issue to myfaces list, and you can
say it works in 4.0 snapshot. I give you kudos for reporting the issue and
others will benefit from your response there in PrimeFaces forum. Also, I'd
like you to get credit for reporting this primefaces issue. :-)
On Apr 22, 2013 4:24 AM, "maurojava" <ma...@gmail.com> wrote:

> read at :
> http://forum.primefaces.org/viewtopic.php?f=3&t=29863&p=95186#p95186
>
> the response of tandraschko for the signature of method.
>
> But with 4 snapshot it works?
> mauro
>
>
>
> --
> View this message in context:
> http://myfaces.10567.n7.nabble.com/primefaces-p-filejUpload-not-work-with-myfaces-tp114620p114666.html
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>

Re: primefaces not work with myfaces

Posted by maurojava <ma...@gmail.com>.
read at :
http://forum.primefaces.org/viewtopic.php?f=3&t=29863&p=95186#p95186

the response of tandraschko for the signature of method.

But with 4 snapshot it works?
mauro



--
View this message in context: http://myfaces.10567.n7.nabble.com/primefaces-p-filejUpload-not-work-with-myfaces-tp114620p114666.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.

Re: primefaces not work with myfaces

Posted by "Howard W. Smith, Jr." <sm...@gmail.com>.
First of all, sorry, I am not a glassfish user at the present, and the goal
is to make it work in tomee, so i'm not going to even try to deploy to
glassfish. :)

I decided to take this 'topic' to PrimeFaces and create a post there, since
I said it appropriately should be discussed in the primefaces forum, and
maybe other primefaces users will see this topic in the future and use it
accordingly. see/click URL below.

http://forum.primefaces.org/viewtopic.php?f=3&t=29863

Re: primefaces not work with myfaces

Posted by maurojava <ma...@gmail.com>.
i attach a war project that it work but on glassfsih .
Not for tomee .
 .
it use mojarra implementation of jsf2 and primefaces .
deploy it in glassfsih and it work.
But i would to modify for use myfaces + primefaces into tomee .
mauro


> 
> ______________________________________________________________________
> If you reply to this email, your message will be added to the
> discussion below:
> http://myfaces.10567.n7.nabble.com/primefaces-p-filejUpload-not-work-with-myfaces-tp114620p114636.html 
> To unsubscribe from primefaces <p:filejUpload> not work with myfaces,
> click here.
> NAML 



MYPRIMEFACESUPLOAD.war (2M) <http://myfaces.10567.n7.nabble.com/attachment/114641/0/MYPRIMEFACESUPLOAD.war>




--
View this message in context: http://myfaces.10567.n7.nabble.com/primefaces-p-filejUpload-not-work-with-myfaces-tp114620p114641.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.

Re: primefaces not work with myfaces

Posted by "Howard W. Smith, Jr." <sm...@gmail.com>.
On Fri, Apr 19, 2013 at 3:25 AM, maurojava <ma...@gmail.com> wrote:

> I TRY TO SEND YOU MY PROJECT.
>

It's best for you to upload it and reply with the URL.


> i have tried to deploy at tomee from netbeans but not deploy .
>

I don't use netbeans deploy. I use netbeans clean-n-build, and copy WAR to
tomee/webapps


> primefaces.jar.
> jars :commons-io-2.4.jar
> and :commons-fileupload-1.3.jar
>

i put those files in web-inf/lib; in NetBeans, I include them in Libraries
List

Re: primefaces not work with myfaces

Posted by maurojava <ma...@gmail.com>.
I TRY TO SEND YOU MY PROJECT.	
i have tried to deploy at tomee from netbeans but not deploy .
I have put into tomee/lib the primefaces.jar.
into the project i have added at web-inf/lib the
jars :commons-io-2.4.jar 
and :commons-fileupload-1.3.jar




Il giorno gio, 18/04/2013 alle 11.01 -0700, Howard W. Smith, Jr. [via
MyFaces] ha scritto:
> and i never had the following added to my faces-config.xml 
> 
> 
>  <factory> 
> 
> <partial-view-context-factory>org.primefaces.context. 
> PrimePartialViewContextFactory</partial-view-context-factory> 
>    </factory> 
> 
> what's your response to the other email? 
> 
> 
> 
> On Thu, Apr 18, 2013 at 1:46 PM, maurojava <[hidden email]> wrote: 
> 
> > but i not use OmniFaces 
> > 
> > 
> > 
> > 
> > -- 
> > View this message in context: 
> >
> http://myfaces.10567.n7.nabble.com/primefaces-p-filejUpload-not-work-with-myfaces-tp114620p114631.html
> > Sent from the MyFaces - Users mailing list archive at Nabble.com. 
> > 
> 
> 
> 
> 
> ______________________________________________________________________
> If you reply to this email, your message will be added to the
> discussion below:
> http://myfaces.10567.n7.nabble.com/primefaces-p-filejUpload-not-work-with-myfaces-tp114620p114632.html 
> To unsubscribe from primefaces <p:filejUpload> not work with myfaces,
> click here.
> NAML 



prova_fileupload_primefaces.zip (30K) <http://myfaces.10567.n7.nabble.com/attachment/114635/0/prova_fileupload_primefaces.zip>




--
View this message in context: http://myfaces.10567.n7.nabble.com/primefaces-p-filejUpload-not-work-with-myfaces-tp114620p114635.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.

Re: primefaces not work with myfaces

Posted by "Howard W. Smith, Jr." <sm...@gmail.com>.
and i never had the following added to my faces-config.xml


 <factory>

<partial-view-context-factory>org.primefaces.context.
PrimePartialViewContextFactory</partial-view-context-factory>
   </factory>

what's your response to the other email?



On Thu, Apr 18, 2013 at 1:46 PM, maurojava <ma...@gmail.com> wrote:

> but i not use OmniFaces
>
>
>
>
> --
> View this message in context:
> http://myfaces.10567.n7.nabble.com/primefaces-p-filejUpload-not-work-with-myfaces-tp114620p114631.html
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>

Re: primefaces not work with myfaces

Posted by maurojava <ma...@gmail.com>.
but i not use OmniFaces




--
View this message in context: http://myfaces.10567.n7.nabble.com/primefaces-p-filejUpload-not-work-with-myfaces-tp114620p114631.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.

Re: primefaces not work with myfaces

Posted by "Howard W. Smith, Jr." <sm...@gmail.com>.
faces-config.xml in my project is as follows (see comments at bottom of
this email):


<?xml version='1.0' encoding='UTF-8'?>


<faces-config version="2.1"
    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_2_1.xsd">

    <factory>

<exception-handler-factory>org.omnifaces.exceptionhandler.FullAjaxExceptionHandlerFactory</exception-handler-factory>
    </factory>
    <application>
        <resource-bundle>
            <base-name>/resources/Bundle</base-name>
            <var>bundle</var>
        </resource-bundle>
    </application>
</faces-config>


1. I'm using OmniFaces exception handler

2. my resources bundle, which was automatically added/generated by NetBeans
7.0 (when I first started developing web app)



On Thu, Apr 18, 2013 at 12:46 PM, maurojava <ma...@gmail.com>wrote:

> i have following the tutorial that i have mentioned .
> into the faces-config i have added:
>
> <?xml version='1.0' encoding='UTF-8'?>
>
>
>
> <faces-config version="2.1"
>     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_2_1.xsd">
>  <factory>
>
>
> <partial-view-context-factory>org.primefaces.context.PrimePartialViewContextFactory</partial-view-context-factory>
>    </factory>
>
> </faces-config>
>
>
> for resolve the Caused by: java.lang.InstantiationException:
> org.primefaces.context.PrimePartialViewContextFactory
>
> but i not have resolved.
> I deploy into tomee and i get error fro mnetbeans that the application not
> can start.
>
>
>
>
>
> --
> View this message in context:
> http://myfaces.10567.n7.nabble.com/primefaces-p-filejUpload-not-work-with-myfaces-tp114620p114627.html
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>

Re: primefaces not work with myfaces

Posted by maurojava <ma...@gmail.com>.
i have following the tutorial that i have mentioned .
into the faces-config i have added:

<?xml version='1.0' encoding='UTF-8'?>



<faces-config version="2.1"
    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_2_1.xsd">
 <factory>

<partial-view-context-factory>org.primefaces.context.PrimePartialViewContextFactory</partial-view-context-factory>
   </factory> 

</faces-config>


for resolve the Caused by: java.lang.InstantiationException:
org.primefaces.context.PrimePartialViewContextFactory

but i not have resolved.
I deploy into tomee and i get error fro mnetbeans that the application not
can start.





--
View this message in context: http://myfaces.10567.n7.nabble.com/primefaces-p-filejUpload-not-work-with-myfaces-tp114620p114627.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.

Re: primefaces not work with myfaces

Posted by "Howard W. Smith, Jr." <sm...@gmail.com>.
I am a happy MyFaces 'and' PrimeFaces user, and 'simple FileUpload' works
well. Have I tried 'advanced' FileUpload? No. IMHO, it is not
required/necessary.

See/click URL[1] below and read what I did to get (Simple) FileUpload
working in my app. I got that working, when I was a Mojarra 'user', but
when I migrated from Mojarra v2.1.7 to MyFaces v2.1.8, I did 'not' have to
do anything special to get FileUpload to work with MyFaces. So, as I stated
earlier, it is not appropriate to ask MyFaces user list how to 'use'
PrimeFaces FileUpload,

If any other questions about FileUpload, then ask your questions in a 'new'
topics in the PrimeFaces forum[2].


[1] http://forum.primefaces.org/viewtopic.php?f=3&t=23968&p=79059#p79059
[2] http://forum.primefaces.org/



On Thu, Apr 18, 2013 at 8:43 AM, Howard W. Smith, Jr. <
smithh032772@gmail.com> wrote:

> mauro,
>
> The MyFaces user list is not the appropriate list to ask 'user' questions
> about PrimeFaces. If you are aspiring to be a PrimeFaces 'user', then,
>
> 1. Go to PrimeFaces Showcase[1] and view 'all' of their UI components;
> they have sample code how to use p:fileUpload and all the PrimeFaces JSF
> components
>
> 2. Go to PrimeFaces Forum[2], search for keywords, to find discussion
> about how to 'use' PrimeFaces
>
> [1] http://www.primefaces.org/showcase/ui/home.jsf
> [2] http://forum.primefaces.org/
>
>
>
> On Thu, Apr 18, 2013 at 8:28 AM, maurojava <ma...@gmail.com>wrote:
>
>> I have try primefaces <p:uploadFile> with myfaces .
>> When i deploy tge applic on to mcat not deploy .
>> But if u use mojarra it work.
>> How i can to work p upload primefaces wity myfaces 2 that it is bundled
>> into
>> tomee ?
>>
>> Mauro
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://myfaces.10567.n7.nabble.com/primefaces-p-filejUpload-not-work-with-myfaces-tp114620.html
>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>>
>
>

Re: primefaces not work with myfaces

Posted by "Howard W. Smith, Jr." <sm...@gmail.com>.
mauro,

The MyFaces user list is not the appropriate list to ask 'user' questions
about PrimeFaces. If you are aspiring to be a PrimeFaces 'user', then,

1. Go to PrimeFaces Showcase[1] and view 'all' of their UI components; they
have sample code how to use p:fileUpload and all the PrimeFaces JSF
components

2. Go to PrimeFaces Forum[2], search for keywords, to find discussion about
how to 'use' PrimeFaces

[1] http://www.primefaces.org/showcase/ui/home.jsf
[2] http://forum.primefaces.org/



On Thu, Apr 18, 2013 at 8:28 AM, maurojava <ma...@gmail.com> wrote:

> I have try primefaces <p:uploadFile> with myfaces .
> When i deploy tge applic on to mcat not deploy .
> But if u use mojarra it work.
> How i can to work p upload primefaces wity myfaces 2 that it is bundled
> into
> tomee ?
>
> Mauro
>
>
>
>
> --
> View this message in context:
> http://myfaces.10567.n7.nabble.com/primefaces-p-filejUpload-not-work-with-myfaces-tp114620.html
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>