Mark/Sakari
I would use the div tag javascript function to construct the href (with ajax control ability to dynamically populate your href based on occurence of JS event)..
http://cwiki.apache.org/confluence/display/WW/ajax+div+template
<saf:head theme="ajax"/>
<script type="text/javascript">
function updateReports(id) {
<!-- get the window -->
var DivID = window['doTag'];
<!-- populate the href attribute with the params -->
DivID.href = "CustSearch.action?d-49653-o="+;
<!-- refresh content and display the new content in the Div Tag -->
DivID.bind();
}
<!-- subscribe javascript updateReports to receive notifications on updateReportsListTopic events -->
dojo.event.topic.getTopic("updateReportsListTopic").subscribe(null, "updateReports");
</script>
<form ...>
<saf:div theme="ajax" id="doTag" href="Place to acquire data"
loadingText="Loading data please ensure UpdateReports JS event executed so UpdateReports javascript function is able to Acquire Data"
errorText="Your Data is not in the office right now please try again after New Year">
<ww:action id="doTagBean" executeResult="true" onChange="javascript: dojo.event.topic.publish("updateReportsListTopic",this.value);"
<ww:param name="d-49653-o" value="2"/>
<ww:param name="2ndTag" value="valueFor2ndTag"/>
</ww:action>
</saf:div>
</form>
Probably missing some stuff here..anyone else?
Martin--
---------------------------------------------------------------------------
This e-mail message (including attachments, if any) is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, proprietary , confidential and exempt from disclosure. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited.
---------------------------------------------------------------------------
Le présent message électronique (y compris les pièces qui y sont annexées, le cas échéant) s'adresse au destinataire indiqué et peut contenir des renseignements de caractère privé ou confidentiel. Si vous n'êtes pas le destinataire de ce document, nous vous signalons qu'il est strictement interdit de le diffuser, de le distribuer ou de le reproduire.
----- Original Message -----
From: <Sakari.Isoniemi@(protected)>
To: <user@(protected)>
Sent: Sunday, December 17, 2006 4:02 AM
Subject: VS: Struts2, DisplayTags OGNL-error
Hai,
Mark Shifman wrote:
Are you using jsp, freemarker or velocity?
Where is displaytags getting its table from?
Here are a couple of pages that may help.
http://struts.apache.org/2.x/docs/application-session-request-objects-in-jsp.html <http://struts.apache.org/2.x/docs/application-session-request-objects-in-jsp.html>
http://struts.apache.org/2.x/docs/exposing-framework-objects-to-jstl-with-a-jstl-and-displaytag-example.html <http://struts.apache.org/2.x/docs/exposing-framework-objects-to-jstl-with-a-jstl-and-displaytag-example.html>
http://struts.apache.org/2.x/docs/access-to-valuestack-from-jsps.html <http://struts.apache.org/2.x/docs/access-to-valuestack-from-jsps.html>
mas
=> DisplayTag makes html / hrefs like
<th class="sortable">
<a href="CustSearch.action?d-49653-o=2&dog=Hello+from+%27dog%27&attr1=Hello+from+getAttr1&d-49653-p=1&cat=Hello+from+%27cat%27&d-49653-s=2&bttra=Hello+from+getBttra&attra=Hello+from+getAttra">dayOfBirth</a></th>
<th class="sortable">
<a href="CustSearch.action?d-49653-o=2&dog=Hello+from+%27dog%27&attr1=Hello+from+getAttr1&d-49653-p=1&cat=Hello+from+%27cat%27&d-49653-s=3&bttra=Hello+from+getBttra&attra=Hello+from+getAttra">address</a></th>
<th>postalCode</th>
How these "d-49653-.." parameters could be reaplaced to another syntax that OGNL accepts ?
I tried also with Servlet / Filter, but didn't managed to replace (haven't done much servlets ).
/Sakke
________________________________
Lähettäjä: Sakari.Isoniemi@(protected)]
Lähetetty: ke 13.12.2006 7:53
Vastaanottaja: user@(protected)
Aihe: Struts2, DisplayTags OGNL-error
Hi,
DisplayTags (SourceForge) sends a HTTP / GET-method to retrive next page
data.
It uses a parameter like 'd-49653-o' to control request (for
application).
OGNL don't accept this syntax and throws an exception.
Solution is to make an interpreter before Action to convert this to
another syntax ?
// - - - - - - - - - - - - - - - - - - - - - - - - - - - -
OGNL / Error
ERROR (061212 20:29:29) Error setting expr 'd-49653-o' with value
'[Ljava.lang.String;@(protected)'
ognl.InappropriateExpressionException: Inappropriate OGNL expression: (d
- 49653) - o
at ognl.SimpleNode.setValueBody(SimpleNode.java:257)
at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177)
at ognl.SimpleNode.setValue(SimpleNode.java:246)
at ognl.Ognl.setValue(Ognl.java:476)
at com.opensymphony.xwork2.util.OgnlUtil.setValue(OgnlUtil.java:184)
at
com.opensymphony.xwork2.util.OgnlValueStack.setValue(OgnlValueStack.java
:162)
at
com.opensymphony.xwork2.util.OgnlValueStack.setValue(OgnlValueStack.java
:150)
at
com.opensymphony.xwork2.interceptor.ParametersInterceptor.setParameters(
ParametersInterceptor.java:173)
at
com.opensymphony.xwork2.interceptor.ParametersInterceptor.intercept(Para
metersInterceptor.java:139)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:200)
at
com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:105)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:200)
at
org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInt
erceptor.java:80)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:200)
at
org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploa
dInterceptor.java:204)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:200)
at
com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(Mod
elDrivenInterceptor.java:74)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:200)
at
com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:120)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:200)
at
org.apache.struts2.interceptor.ProfilingActivationInterceptor.intercept(
ProfilingActivationInterceptor.java:59)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:200)
at
org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(
DebuggingInterceptor.java:174)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:200)
at
com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(Chaini
ngInterceptor.java:115)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:200)
at
com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterc
eptor.java:143)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:200)
at
com.opensymphony.xwork2.interceptor.PrepareInterceptor.intercept(Prepare
Interceptor.java:115)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:200)
at
org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(Servle
tConfigInterceptor.java:156)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:200)
at
com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInte
rceptor.java:124)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:200)
at
com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:180)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:200)
at
org.apache.struts2.impl.StrutsActionProxy$1.call(StrutsActionProxy.java:
27)
at
org.apache.struts2.impl.StrutsActionProxy$1.call(StrutsActionProxy.java:
26)
at
org.apache.struts2.impl.RequestContextImpl.callInContext(RequestContextI
mpl.java:152)
at
org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java
:25)
at
org.apache.struts2.dispatcher.Dispatcher.serviceAction (
Dispatcher.java:3
30)
at
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher
.java:256)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:178)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:126)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:105)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:107)
at
org.apache.catalina.connector.CoyoteAdapter.service (
CoyoteAdapter.java:1
48)
at
org.apache.coyote.http11.Http11Processor.process (
Http11Processor.java:86
9)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.proc
essConnection(Http11BaseProtocol.java:664)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint
.java:527)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollow
erWorkerThread.java:80)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:684)
at
java.lang.Thread.run (
Thread.java:595)
ERROR (061212 20:29:29) Developer Notification (set webwork.devMode to
false to disable this message):
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)