• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem with s:if "Syntax error on token(s), misplaced construct(s)"

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am fairly new at this.
I had to go in to some existing code and make a change.
I believe that this block here is making the change that I need.
However, I don't think that it is executing.
It looks to me like these struts are not working. I am not familiar with the syntax.
I cannot see the problem from what I am looking up on line.
I have checked for missing brackets, semicolons, commas, <>, I need a fresh pair of eyes.
Thank you in advance.

Eclipse error is "Syntax error on token(s), misplaced construct(s)"

Pseudocode for other blocks------------------------------------------------------
Function saveAddress
if (Validate address Form)
dojo.xhrPost({
try {
if (data && data.PR && data.PR.PRID > 0) {
var newAddress="";
var newAddressToolTip="";

// keep local address vars up to date block of
_x.y=dojo.byId("PR.xyz").value.toUpperCase();
_x.y=dojo.byId("PR.xoxo").options[dojo.byId("PR.xoxo").selectedIndex].value;

// build new address block for side panel
//declare variables
//if variable is empty newAddressToolTip += _variable

--------------------------------------------------------------------------------------------------------------------
//Here is where I run into the issues.
<s:if test="Work.order.Num != null">
tooltip+="<br /><b>Parcel: </b><s:PR value="Work.order.Num"/>";
</s:if>
<s:elseif test="Work.PR.lots != null && Work.PR.lots.size > 0">
tooltip+="<br /><b>lots associated with PR:</b><br />";
<s:iterator value="Work.PR.lots" id="parcel">
tooltip+="<s:PR value="Num"/>, ";
</s:iterator>
</s:elseif>

tooltip+="<hr /><b>Submitted Address:</b><br /><app:webFormat value="${requestScope.Work.order.submittedPR.formattedAddress}"/>";
tooltip+="<br /><b>County: </b><s:PR value="Work.order.submittedPR.county.simpleName"/>";

<s:if test="Work.order.submittedPR.subdivision != null">
tooltip+="<br /><b>Subdivision </b><s:PR value="Work.order.submittedPR.subdivision"/>";
</s:if>
<s:if test="Work.order.submittedPR.lot != null">
tooltip+="<br /><b>Lot: </b><s:PR value="Work.order.submittedPR.lot"/>";
</s:if>
<s:if test="Work.order.Num != null">
tooltip+="<br /><b>Parcel: </b><s:PR value="Work.order.Num"/>";
</s:if>
<s:elseif test="Work.order.submittedPR.lots != null && Work.order.submittedPR.lots.size > 0">
tooltip+="<br /><b>lots associated with PR:</b><br />";
<s:iterator value="Work.order.submittedPR.lots" id="parcel">
tooltip+="<s:PR value="Num"/>, ";
</s:iterator>
</s:elseif>
 
Ranch Hand
Posts: 859
IBM DB2 Chrome Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
These tests:

should probably be.. (need to verify syntax)


WP
 
V. Keating
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you!
 
reply
    Bookmark Topic Watch Topic
  • New Topic