You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Sean Schofield <se...@gmail.com> on 2006/10/07 00:40:33 UTC

JSF Shopping Cart

I'm toying with the idea of building a JSF-based shopping cart that
provides access to the PayPal gateway.  Does anyone have a serious
interest in helping?  I know a lot of people might want to *use* it.
I'm looking for someone to help me develop it.   Also, if you know of
anything that already exists for shopping carts that is written in
Java please let me know.

TIA,

Sean

Re: ajax4jsf and myfaces

Posted by Matthias Wessendorf <ma...@apache.org>.
Gerald is right

https://ajax4jsf.dev.java.net/nonav/documentation/ajax-documentation/developerGuide.html#d0e2431

the above is a warning from the myfaces webxml parser, that it ignores
dispatcher, inside of filter-mapping.

ensure to not have the sun ri <listener> element in your web.xml file

On 10/7/06, Gerald Müllan <bi...@gmail.com> wrote:
> Hi,
>
> well, Ajax4jsf should normally work without problems in combination
> with myfaces.
>
> The only thing i know of which you have to be aware of, is that the
> special Ajax4jsf-filter has
> to be placed before any other filters in your web.xml.
>
> Try to leave out this <dispatcher> stuff, don`t know if it is really required.
>
> What are the other problems?
>
> cheers,
>
> Gerald
>
> On 10/7/06, Stephen Osella <so...@austin.rr.com> wrote:
> > Does ajax4jsf work with myfaces?  If so, does anyone have a link or some
> > idea as to how to configure it to work?  I am getting *lots* of errors.
> >
> > For one, getting the following error with respect to the web.xml
> > configuration:
> >
> > 21:22:26,897 - WARN
> > org.apache.myfaces.shared_impl.webapp.webxml.WebXmlParser - Ignored element
> > 'dispatcher' as child of 'filter-mapping'.
> > 21:22:26,897 - WARN
> > org.apache.myfaces.shared_impl.webapp.webxml.WebXmlParser - Ignored element
> > 'dispatcher' as child of 'filter-mapping'.
> > 21:22:26,897 - WARN
> > org.apache.myfaces.shared_impl.webapp.webxml.WebXmlParser - Ignored element
> > 'dispatcher' as child of 'filter-mapping'.
> >
> > when setting up web.xml as:
> >
> > <filter>
> >
> >     <display-name>Ajax4jsf Filter</display-name>
> >
> >     <filter-name>ajax4jsf</filter-name>
> >
> >     <filter-class>org.ajax4jsf.Filter</filter-class>
> >
> > </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>
> >
> >
>
>
> --
> http://www.irian.at
>
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>


-- 
Matthias Wessendorf
http://tinyurl.com/fmywh

further stuff:
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com

Re: ajax4jsf and myfaces

Posted by Matthias Wessendorf <ma...@apache.org>.
That is a bug in MyFaces 1.1.3
can you use 1.1.4 ?

On 10/7/06, Stephen Osella <so...@austin.rr.com> wrote:
> Gerald,
>
> Thanks for responding.  I removed the DISPATCHER elements in the web.xml .
> The AJAX4JSF filter is the first filter in the web.xml.
>
> I am using the following code:
>
> <h:inputText id="customerEmailAddress"
> value="#{SessionBean.customerEmailAddress}" >
>     <a4j:support event="onkeyup"
> actionListener="#{SessionBean.customerEmailAddressListener}"
> reRender="cellPhoneNumber" />
> </h:inputText>
>
> and:
>
> <h:outputLabel for="cellPhoneNumber"
> value="#{bundle.customer_cell_phone_number}"/>
> <h:inputText id="cellPhoneNumber" tabindex="5"
> alt="#{bundle.customer_cell_phone_number}"/>
>
>
>
> This is the exception that is being raised:
>
> 07:07:26,725 - ERROR org.apache.myfaces.lifecycle.PhaseListenerManager -
> Exception in PhaseListener RENDER_RESPONSE(6) afterPhase
> java.lang.NullPointerException: null values not allowed
>  at
> org.apache.commons.collections.map.AbstractReferenceMap.put(AbstractReferenceMap.java:251)
>  at
> org.apache.myfaces.application.jsp.JspStateManagerImpl$SerializedViewCollection.add(JspStateManagerImpl.java:717)
>  at
> org.apache.myfaces.application.jsp.JspStateManagerImpl.saveSerializedViewInServletSession(JspStateManagerImpl.java:493)
>  at
> org.apache.myfaces.application.jsp.JspStateManagerImpl.saveSerializedView(JspStateManagerImpl.java:332)
>  at
> org.ajax4jsf.framework.renderer.AjaxRendererUtils.saveViewState(AjaxRendererUtils.java:816)
>  at
> org.ajax4jsf.framework.renderer.AjaxRendererUtils.encodeAreas(AjaxRendererUtils.java:799)
>  at
> org.ajax4jsf.framework.renderer.AjaxContainerRenderer.encodeAjax(AjaxContainerRenderer.java:128)
>  at
> org.ajax4jsf.framework.ajax.AjaxViewRoot.encodeAjax(AjaxViewRoot.java:570)
>  at
> org.ajax4jsf.framework.ajax.AjaxContext.renderAjaxRegion(AjaxContext.java:256)
>  at
> org.ajax4jsf.framework.renderer.AjaxRenderPhaseListener.afterPhase(AjaxRenderPhaseListener.java:84)
>
>


-- 
Matthias Wessendorf
http://tinyurl.com/fmywh

further stuff:
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com

Re: ajax4jsf and myfaces

Posted by Stephen Osella <so...@austin.rr.com>.
Gerald,

Thanks for responding.  I removed the DISPATCHER elements in the web.xml . 
The AJAX4JSF filter is the first filter in the web.xml.

I am using the following code:

<h:inputText id="customerEmailAddress" 
value="#{SessionBean.customerEmailAddress}" >
    <a4j:support event="onkeyup" 
actionListener="#{SessionBean.customerEmailAddressListener}" 
reRender="cellPhoneNumber" />
</h:inputText>

and:

<h:outputLabel for="cellPhoneNumber" 
value="#{bundle.customer_cell_phone_number}"/>
<h:inputText id="cellPhoneNumber" tabindex="5" 
alt="#{bundle.customer_cell_phone_number}"/>



This is the exception that is being raised:

07:07:26,725 - ERROR org.apache.myfaces.lifecycle.PhaseListenerManager - 
Exception in PhaseListener RENDER_RESPONSE(6) afterPhase
java.lang.NullPointerException: null values not allowed
 at 
org.apache.commons.collections.map.AbstractReferenceMap.put(AbstractReferenceMap.java:251)
 at 
org.apache.myfaces.application.jsp.JspStateManagerImpl$SerializedViewCollection.add(JspStateManagerImpl.java:717)
 at 
org.apache.myfaces.application.jsp.JspStateManagerImpl.saveSerializedViewInServletSession(JspStateManagerImpl.java:493)
 at 
org.apache.myfaces.application.jsp.JspStateManagerImpl.saveSerializedView(JspStateManagerImpl.java:332)
 at 
org.ajax4jsf.framework.renderer.AjaxRendererUtils.saveViewState(AjaxRendererUtils.java:816)
 at 
org.ajax4jsf.framework.renderer.AjaxRendererUtils.encodeAreas(AjaxRendererUtils.java:799)
 at 
org.ajax4jsf.framework.renderer.AjaxContainerRenderer.encodeAjax(AjaxContainerRenderer.java:128)
 at 
org.ajax4jsf.framework.ajax.AjaxViewRoot.encodeAjax(AjaxViewRoot.java:570)
 at 
org.ajax4jsf.framework.ajax.AjaxContext.renderAjaxRegion(AjaxContext.java:256)
 at 
org.ajax4jsf.framework.renderer.AjaxRenderPhaseListener.afterPhase(AjaxRenderPhaseListener.java:84) 


Re: ajax4jsf and myfaces

Posted by Gerald Müllan <bi...@gmail.com>.
Hi,

well, Ajax4jsf should normally work without problems in combination
with myfaces.

The only thing i know of which you have to be aware of, is that the
special Ajax4jsf-filter has
to be placed before any other filters in your web.xml.

Try to leave out this <dispatcher> stuff, don`t know if it is really required.

What are the other problems?

cheers,

Gerald

On 10/7/06, Stephen Osella <so...@austin.rr.com> wrote:
> Does ajax4jsf work with myfaces?  If so, does anyone have a link or some
> idea as to how to configure it to work?  I am getting *lots* of errors.
>
> For one, getting the following error with respect to the web.xml
> configuration:
>
> 21:22:26,897 - WARN
> org.apache.myfaces.shared_impl.webapp.webxml.WebXmlParser - Ignored element
> 'dispatcher' as child of 'filter-mapping'.
> 21:22:26,897 - WARN
> org.apache.myfaces.shared_impl.webapp.webxml.WebXmlParser - Ignored element
> 'dispatcher' as child of 'filter-mapping'.
> 21:22:26,897 - WARN
> org.apache.myfaces.shared_impl.webapp.webxml.WebXmlParser - Ignored element
> 'dispatcher' as child of 'filter-mapping'.
>
> when setting up web.xml as:
>
> <filter>
>
>     <display-name>Ajax4jsf Filter</display-name>
>
>     <filter-name>ajax4jsf</filter-name>
>
>     <filter-class>org.ajax4jsf.Filter</filter-class>
>
> </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>
>
>


-- 
http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces

ajax4jsf and myfaces

Posted by Stephen Osella <so...@austin.rr.com>.
Does ajax4jsf work with myfaces?  If so, does anyone have a link or some 
idea as to how to configure it to work?  I am getting *lots* of errors.

For one, getting the following error with respect to the web.xml 
configuration:

21:22:26,897 - WARN 
org.apache.myfaces.shared_impl.webapp.webxml.WebXmlParser - Ignored element 
'dispatcher' as child of 'filter-mapping'.
21:22:26,897 - WARN 
org.apache.myfaces.shared_impl.webapp.webxml.WebXmlParser - Ignored element 
'dispatcher' as child of 'filter-mapping'.
21:22:26,897 - WARN 
org.apache.myfaces.shared_impl.webapp.webxml.WebXmlParser - Ignored element 
'dispatcher' as child of 'filter-mapping'.

when setting up web.xml as:

<filter>

    <display-name>Ajax4jsf Filter</display-name>

    <filter-name>ajax4jsf</filter-name>

    <filter-class>org.ajax4jsf.Filter</filter-class>

</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>


Re: JSF Shopping Cart

Posted by Werner Punz <we...@gmx.at>.
Sean Schofield schrieb:
> I'm toying with the idea of building a JSF-based shopping cart that
> provides access to the PayPal gateway.  Does anyone have a serious
> interest in helping?  I know a lot of people might want to *use* it.
> I'm looking for someone to help me develop it.   Also, if you know of
> anything that already exists for shopping carts that is written in
> Java please let me know.
> 
The sandbox examples of the Frobozz magic shop already do something
along those lines with saveState and Scope...
not really the same, but a nice headstart.
(Took me an hour in the train to write the frobozz shop)