OK, I'm reading up on Spring and iBATIS. I'll have to stick with the SQL
taglib until I get a handle on the alternatives.

Mr. Kraft suggested using the 'display' taglib which I got working
without any real trouble.

Their tutorials use scriptlets to 'setAttributes', so I guess that's the
only way to capture form data as well (getAttributes) - with a scriplet.

With the 'display' taglib, I don't see a way to massage the ResultSet
values, so I had to do some major concatenations in the SQL string to
build the full address, and the link to mapquest.

My old process did a replace on '#' with 'No.', because mapquest doesn't
like '#' for a suite/apartment number. I had to use "replace(addr1 ,
'#', 'No. ')". This was tricky because I was aliasing the expression
within a concatenation which breaks the SQL. Just had to remove the
alias.

So after moving some formatting into the CSS file, composing some SQL to
pre-massage the data, I got an output using 'display' like I had using a
scriptlet.

Now the output table looks like this...

      <display:table name="${rs.rows}" cellspacing="0">
        <display:column property="name" title="Name" style="width: 35%"
headerClass="dir_hds" />
        <display:column property="full_adr" title="Address"
style="width: 30%" headerClass="dir_hds" />
        <display:column property="phn" title="Phone" style="width: 15%"
headerClass="dir_hds" />
        <display:column property="hours" style="width: 20%"
headerClass="dir_hds" />
      </display:table>


I guess one of the neat things about this is you can make columns
sortable (sortable="true") without having the build your own links (and
supporting process) in the column heads. This didn't work though. Maybe
if it was its own webapp outside Magnolia it would. I don't see how a
bean would be able to re-sort without setting a parameter in the 'order
by' clause and re-querying.



Error
null 

org.apache.jasper.JasperException
        at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va: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(Applica
tionFilterChain.java:237)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:157)
        at
info.magnolia.cms.filters.SecurityFilter.doFilter(SecurityFilter.java:73
)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:186)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:157)
        at
info.magnolia.cms.filters.MultipartRequestFilter.doFilter(MultipartReque
stFilter.java:80)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:186)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:157)
        at
info.magnolia.cms.filters.ContentTypeFilter.doFilter(ContentTypeFilter.j
ava:65)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:186)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:157)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:214)
        at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
ntext.java:104)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
20)
        at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCon
textValve.java:198)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:152)
        at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
ntext.java:104)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
20)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:137)
        at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
ntext.java:104)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:118)
        at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
ntext.java:102)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
20)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:109)
        at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
ntext.java:104)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
20)
        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:79
9)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC
onnection(Http11Protocol.java:705)
        at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:57
7)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:683)
        at java.lang.Thread.run(Thread.java:534)






 

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 06, 2005 1:27 PM
To: [email protected]
Subject: Re: [magnolia-user] "make sure that your (Java-) code is
outside anything that starts with JSP"


Better yet, combine iBATIS (or Hibernate) with Spring 
--> www.springframework.org

-KG



----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------

Reply via email to