myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gerald Müllan" <bierbra...@gmail.com>
Subject Re: s:tableSuggestAjax next step?
Date Wed, 11 Oct 2006 08:31:09 GMT
Hm..ok the nested stuff doesn`t work, i know; currently not supported.

But what is about giving the onklick event to tableSuggest and doing
the partial update on the dom nodes itself after pushing the values
from the columns to them? Should be the same result to me.

regards,

Gerald

On 10/10/06, John Ruffin <jruffin@achfood.com> wrote:
>
> Not exactly.  I can add a4j stuff to s:tableSuggestAjax (e.g. onclick,
> onchange etc... do something in a listener) but not on anything nested
> inside the table columns.
>
> I added: <a4j:support actionListener="#{myBeanName.doSomething}"
> event="onclick"/> to s:tableSuggestAjax and my log message was output to the
> console.
>
> Adding the same thing to s:outputText nested inside a column doesn't produce
> the log message.  Yes, s:outputText does have attributes onchange, onclick,
> etc...
>
>
> Gerald Müllan wrote:
> >
> > Hm..ok for this one i have to have a deeper look into it and test it on my
> > own.
> >
> > Unfortunately there are already some issues on my list which go before
> > it. Without maxSuggestedItems the ajax4jsf stuff works?
> >
> > regards,
> >
> > Gerald
> >
> > On 10/10/06, John Ruffin <jruffin@achfood.com> wrote:
> >>
> >> That does sound useful.
> >>
> >> Meanwhile, I have another one :-).  When adding the maxSuggestedItems
> >> attribute to tableSuggestAjax I get a JS error.  The js debugger in
> >> FireFox
> >> points me to this piece of code in "tableSuggest.js":
> >>
> >>  org_apache_myfaces_TableSuggest.prototype.onFocus = function() {
> >>         this.hasFocus = true;
> >>         if (this.saveOldValues)
> >>         {
> >>             this.oldValues = new Object();
> >>             for (var i = 0; i < this.fieldNames.length; i+=1)
> >>             {
> >>                 var fieldName = this.fieldNames[i];
> >>                 var field = dojo.byId(fieldName);
> >>                 this.oldValues[fieldName] = field.value;
> >>             }
> >>             this.saveOldValues = false;
> >>         }
> >>     }
> >>
> >> Below is the stack from Tomcat:
> >>
> >> 2006-10-10 15:51:47 ApplicationDispatcher[/customerData]
> >> Servlet.service()
> >> for servlet jsp threw exception
> >> java.lang.NullPointerException
> >>         at
> >> org.ajax4jsf.framework.ajax.xmlfilter.FilterServletResponseWrapper$ServletStringWriter.write(FilterServletResponseWrapper.java:309)
> >>         at java.io.Writer.write(Writer.java:150)
> >>         at java.io.PrintWriter.write(PrintWriter.java:384)
> >>         at java.io.PrintWriter.write(PrintWriter.java:401)
> >>         at
> >> org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlResponseWriterImpl.writeText(HtmlResponseWriterImpl.java:410)
> >>         at
> >> org.apache.myfaces.shared_impl.renderkit.html.HtmlTextRendererBase.renderOutputText(HtmlTextRendererBase.java:111)
> >>         at
> >> org.apache.myfaces.shared_impl.renderkit.html.HtmlTextRendererBase.renderOutput(HtmlTextRendererBase.java:77)
> >>         at
> >> org.apache.myfaces.shared_impl.renderkit.html.HtmlTextRendererBase.encodeEnd(HtmlTextRendererBase.java:54)
> >>         at
> >> javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:536)
> >>         at
> >> javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:495)
> >>         at
> >> javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:363)
> >>         at
> >> org.apache.jsp.testAutoComplete_jsp._jspx_meth_h_outputText_0(testAutoComplete_jsp.java:192)
> >>         at
> >> org.apache.jsp.testAutoComplete_jsp._jspx_meth_f_view_0(testAutoComplete_jsp.java:143)
> >>         at
> >> org.apache.jsp.testAutoComplete_jsp._jspService(testAutoComplete_jsp.java:103)
> >>         at
> >> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
> >>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> >>         at
> >> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
> >>         at
> >> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
> >>         at
> >> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
> >>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> >>         at
> >> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
> >>         at
> >> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
> >>         at
> >> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:704)
> >>         at
> >> org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:474)
> >>         at
> >> org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:409)
> >>         at
> >> org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312)
> >>         at
> >> org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:416)
> >>         at
> >> org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:211)
> >>         at
> >> org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:101)
> >>         at
> >> org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:38)
> >>         at
> >> org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:129)
> >>         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
> >>         at
> >> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
> >>         at
> >> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
> >>         at
> >> org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:67)
> >>         at
> >> org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:223)
> >>         at
> >> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
> >>         at
> >> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
> >>         at
> >> org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174)
> >>         at
> >> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
> >>         at
> >> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
> >>         at
> >> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
> >>         at
> >> org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
> >>         at
> >> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
> >>         at
> >> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
> >>         at
> >> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
> >>         at
> >> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
> >>         at
> >> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> >>         at
> >> org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
> >>         at
> >> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
> >>         at
> >> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
> >>         at
> >> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> >>         at
> >> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
> >>         at
> >> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
> >>         at
> >> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
> >>         at
> >> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
> >>         at
> >> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> >>         at
> >> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> >>         at
> >> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
> >>         at
> >> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> >>         at
> >> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
> >>         at
> >> org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
> >>         at
> >> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
> >>         at
> >> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
> >>         at
> >> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
> >>         at
> >> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
> >>         at java.lang.Thread.run(Thread.java:595)
> >>
> >> 2006-10-10 15:51:47 StandardWrapperValve[Faces Servlet]:
> >> Servlet.service()
> >> for servlet Faces Servlet threw exception
> >> javax.faces.FacesException: org.apache.jasper.JasperException
> >>         at
> >> org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:426)
> >>         at
> >> org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:211)
> >>         at
> >> org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:101)
> >>         at
> >> org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:38)
> >>         at
> >> org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:129)
> >>         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
> >>         at
> >> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
> >>         at
> >> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
> >>         at
> >> org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:67)
> >>         at
> >> org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:223)
> >>         at
> >> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
> >>         at
> >> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
> >>         at
> >> org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174)
> >>         at
> >> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
> >>         at
> >> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
> >>         at
> >> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
> >>         at
> >> org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
> >>         at
> >> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
> >>         at
> >> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
> >>         at
> >> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
> >>         at
> >> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
> >>         at
> >> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> >>         at
> >> org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
> >>         at
> >> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
> >>         at
> >> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
> >>         at
> >> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> >>         at
> >> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
> >>         at
> >> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
> >>         at
> >> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
> >>         at
> >> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
> >>         at
> >> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> >>         at
> >> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> >>         at
> >> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
> >>         at
> >> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> >>         at
> >> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
> >>         at
> >> org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
> >>         at
> >> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
> >>         at
> >> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
> >>         at
> >> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
> >>         at
> >> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
> >>         at java.lang.Thread.run(Thread.java:595)
> >> Caused by: org.apache.jasper.JasperException
> >>         at
> >> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:372)
> >>         at
> >> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
> >>         at
> >> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
> >>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> >>         at
> >> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
> >>         at
> >> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
> >>         at
> >> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:704)
> >>         at
> >> org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:474)
> >>         at
> >> org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:409)
> >>         at
> >> org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312)
> >>         at
> >> org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:416)
> >>         ... 40 more
> >>
> >>
> >> Gerald Müllan wrote:
> >> >
> >> > Great!
> >> >
> >> > If you have a working solution for issue #2 i would be pleased to hear
> >> > about it.
> >> > Would be interesting to me how you have solved it.
> >> >
> >> > However, you have made me the idea of extending our ppr solution in a
> >> > way that we can say: Take a js event and bind it to a dom node which
> >> > is located inside a ppr group. Through fireing the event the partial
> >> > page inside the ppr group section is updated.
> >> >
> >> > Sounds very useful to me, if there is some time at the end of the day
> >> > i will investigate some
> >> > work on it.
> >> >
> >> > regards,
> >> >
> >> > Gerald
> >> >
> >> > On 10/10/06, John Ruffin <jruffin@achfood.com> wrote:
> >> >>
> >> >> Note to self: use a current build :-).  Things look good now.
> >> >>
> >> >>
> >> >> John Ruffin wrote:
> >> >> >
> >> >> > I'm using snapshot1.1.4 which I built awhile back.  I'll build
the
> >> >> latest.
> >> >> >
> >> >> > Hopefully, issue #1 will go away as demo'ed on in your example.
> >> Even
> >> >> the
> >> >> > example built from the snapshot1.1.4 only contains the snippet
and
> >> not
> >> >> the
> >> >> > selected value in the input textbox.
> >> >> >
> >> >> > Yes, I think I can resolve issue #2 with <a4j:support> or
something
> >> >> > similar.
> >> >> >
> >> >> > Thanks.  I'll build the latest.
> >> >> >
> >> >> > Gerald Müllan wrote:
> >> >> >>
> >> >> >> Hi,
> >> >> >>
> >> >> >> are you using latest version of this component?
> >> >> >>
> >> >> >> On our examples page [1], i cannot reproduce your first mentioned
> >> >> issue.
> >> >> >> All the dom nodes are updated with the full value, when hovering
> >> the
> >> >> >> columns with cursor or clicking on them.
> >> >> >>
> >> >> >> ad second issue; This is not the usecase the component was
> >> originally
> >> >> >> designed for. Just fetching some correspondig values and putting
> >> them
> >> >> >> to some dom nodes in order to reduce
> >> >> >> needed steps when doing some inputs.
> >> >> >>
> >> >> >> If i understand your usecase, you need some partial page rendering
> >> >> >> mechanism in order to update model values behind the dom nodes
to
> >> >> >> which the values where pushed.
> >> >> >>
> >> >> >> Currently this does not work with this component in a lonely
> >> manner.
> >> >> >>
> >> >> >> In this case, you need some ajax stuff afterwards the values
where
> >> >> >> pushed to the dom nodes. In sandbox there is currently PPR
(partial
> >> >> >> page rendering) [2] which should do this in future times.
Currently
> >> it
> >> >> >> does this only with button-clicks, not automatically triggered.
> >> >> >>
> >> >> >> If its really that needed, you ma achieve this approach with
ajax
> >> >> >> frameworks like ajax4jsf.
> >> >> >>
> >> >> >> cheers,
> >> >> >>
> >> >> >> Gerald
> >> >> >>
> >> >> >> [1]
> >> >> http://example.irian.at/example-sandbox-20061010/tableSuggestAjax.jsf
> >> >> >> [2]
> >> http://example.irian.at/example-sandbox-20061010/pprPanelGroup.jsf
> >> >> >>
> >> >> >> On 10/10/06, John Ruffin <jruffin@achfood.com> wrote:
> >> >> >>>
> >> >> >>> I've successfully added s:tableSuggestAjax to a page and
it
> >> displays
> >> >> the
> >> >> >>> given table rows and columns.
> >> >> >>>
> >> >> >>> What I think I want to do is: when a column is clicked
I want to
> >> >> update
> >> >> >>> the
> >> >> >>> value of the inputTextBox.  It currently only contains
the snippet
> >> >> used
> >> >> >>> for
> >> >> >>> the suggestedItemsMethod.
> >> >> >>>
> >> >> >>> Also, I want to use t:updateActionListener to set the
selected
> >> object
> >> >> to
> >> >> >>> a
> >> >> >>> backing bean attribute.
> >> >> >>>
> >> >> >>> Problem is: when I put a commandLink around the s:outputText
- the
> >> >> data
> >> >> >>> doesn't display.
> >> >> >>>
> >> >> >>> Question is: how are you using s:tableSuggestAjax and
what/how do
> >> you
> >> >> >>> update
> >> >> >>> things when a row is selected?
> >> >> >>> --
> >> >> >>> View this message in context:
> >> >> >>>
> >> >>
> >> http://www.nabble.com/s%3AtableSuggestAjax-next-step--tf2417654.html#a6739537
> >> >> >>> Sent from the MyFaces - Users mailing list archive at
Nabble.com.
> >> >> >>>
> >> >> >>>
> >> >> >>
> >> >> >>
> >> >> >> --
> >> >> >> http://www.irian.at
> >> >> >>
> >> >> >> Your JSF powerhouse -
> >> >> >> JSF Consulting, Development and
> >> >> >> Courses in English and German
> >> >> >>
> >> >> >> Professional Support for Apache MyFaces
> >> >> >>
> >> >> >>
> >> >> >
> >> >> >
> >> >> Note to self
> >> >> --
> >> >> View this message in context:
> >> >>
> >> http://www.nabble.com/s%3AtableSuggestAjax-next-step--tf2417654.html#a6743989
> >> >> Sent from the MyFaces - Users mailing list archive at Nabble.com.
> >> >>
> >> >>
> >> >
> >> >
> >> > --
> >> > http://www.irian.at
> >> >
> >> > Your JSF powerhouse -
> >> > JSF Consulting, Development and
> >> > Courses in English and German
> >> >
> >> > Professional Support for Apache MyFaces
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/s%3AtableSuggestAjax-next-step--tf2417654.html#a6745454
> >> Sent from the MyFaces - Users mailing list archive at Nabble.com.
> >>
> >>
> >
> >
> > --
> > http://www.irian.at
> >
> > Your JSF powerhouse -
> > JSF Consulting, Development and
> > Courses in English and German
> >
> > Professional Support for Apache MyFaces
> >
> >
>
> --
> View this message in context: http://www.nabble.com/s%3AtableSuggestAjax-next-step--tf2417654.html#a6746365
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>


-- 
http://www.irian.at

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

Professional Support for Apache MyFaces

Mime
View raw message