I had a typo in my suggestion - happens with such long expressions I guess ;)
I meant

selected="ognl:getTab().getSearchCriteriaSelections().get(currentFilterGroupIndex)[currentFilterIndex]"





Dom Couldwell wrote:
Tried Andy's work around but no joy (stack track below). Have raised another
JIRA (http://jira.opensymphony.com/browse/OGNL-131) yell if you need more
details.

Dom

2007-10-25 09:09:57,763, ERROR, [com.db.rdq.web.tapestry.html.RDQException],
line 22, org.apache.tapestry.BindingException
2007-10-25 09:09:57,763, ERROR, [com.db.rdq.web.tapestry.html.RDQException],
line 23, Unable to parse OGNL expression
'getTab().getSearchCriteriaSelections().get(currentFilterGroupIndex).[currentFilterIndex]':
 Malformed OGNL expression:
getTab().getSearchCriteriaSelections().get(currentFilterGroupIndex).[currentFilterIndex]
2007-10-25 09:09:57,763, ERROR, [com.db.rdq.web.tapestry.html.RDQException],
line 32,
2007-10-25 09:09:57,779, ERROR, [com.db.rdq.web.tapestry.html.RDQException],
line 44,
binding|ExpressionBinding[Home/$Search
getTab().getSearchCriteriaSelections().get(currentFilterGroupIndex).[currentFilterIndex]]
location|context:/WEB-INF/Search.html, line 109
2007-10-25 09:09:57,779, ERROR, [com.db.rdq.web.tapestry.html.RDQException],
line 22, org.apache.hivemind.ApplicationRuntimeException
2007-10-25 09:09:57,779, ERROR, [com.db.rdq.web.tapestry.html.RDQException],
line 23, Unable to parse OGNL expression
'getTab().getSearchCriteriaSelections().get(currentFilterGroupIndex).[currentFilterIndex]':
 Malformed OGNL expression:
getTab().getSearchCriteriaSelections().get(currentFilterGroupIndex).[currentFilterIndex]
2007-10-25 09:09:57,779, ERROR, [com.db.rdq.web.tapestry.html.RDQException],
line 32,
2007-10-25 09:09:57,779, ERROR, [com.db.rdq.web.tapestry.html.RDQException],
line 44,
2007-10-25 09:09:57,779, ERROR, [com.db.rdq.web.tapestry.html.RDQException],
line 22, ognl.ExpressionSyntaxException
2007-10-25 09:09:57,795, ERROR, [com.db.rdq.web.tapestry.html.RDQException],
line 23, Malformed OGNL expression:
getTab().getSearchCriteriaSelections().get(currentFilterGroupIndex).[currentFilterIndex]
2007-10-25 09:09:57,795, ERROR, [com.db.rdq.web.tapestry.html.RDQException],
line 32,
2007-10-25 09:09:57,795, ERROR, [com.db.rdq.web.tapestry.html.RDQException],
line 44,
2007-10-25 09:09:57,795, ERROR, [com.db.rdq.web.tapestry.html.RDQException],
line 22, ognl.ParseException
2007-10-25 09:09:57,795, ERROR, [com.db.rdq.web.tapestry.html.RDQException],
line 23, Encountered "[" at line 1, column 69.
Was expecting one of:
    "(" ...
    "{" ...
    <IDENT> ...

2007-10-25 09:09:57,795, ERROR, [com.db.rdq.web.tapestry.html.RDQException],
line 32,
Was expecting one of:
"(" ...
"{" ...
<IDENT> ...

ognl.OgnlParser.generateParseException(OgnlParser.java:3161)
...


"Jesse Kuhnert" <[EMAIL PROTECTED] m> To "Tapestry users" 10/24/2007 04:59 <users@tapestry.apache.org> PM cc Subject Please respond to Re: T4.1.3 loop index issues, "Tapestry users" migrating from 4.0.2 <[EMAIL PROTECTED] ache.org>



Another ognl jira ticket with as much specific information as possible
would help me either way.

Since you are getting errors that mention OgnlRuntime I'm thinking
this isn't a compile time issue at all so would probably consider it
more important than most to fix.  (assuming I'm able to re-produce it
in a simple non tapestry environment unit test)

On 10/24/07, andyhot <[EMAIL PROTECTED]> wrote:
well, it must be ognl related after all...
In http://jira.opensymphony.com/browse/OGNL-130 you mentioned you tried

selected="ognl:getTab().getSearchCriteriaSelections().get(currentFilterGroupIndex).get(currentFilterIndex)"

Well, I'm wondering if

selected="ognl:getTab().getSearchCriteriaSelections().get(currentFilterGroupIndex).[currentFilterIndex]"

would work...


Dom Couldwell wrote:
Updated first For loop to:

        <select jwcid="@Select"
                multiple="literal:false"
                size="10"


onchange="ognl:'searchSubmit(\''[EMAIL PROTECTED]@INSTRUMENT_GROUP+'\',0);'">

          <div jwcid="@For"
               source="ognl:tab.searchItems"
               value="ognl:currentSearchItem"
               index="ognl:currentSearchItemIndex"
               volatile="ognl:true">
          <option jwcid="@Option"

selected="ognl:tab.searchItems[currentSearchItemIndex].selected"

label="ognl:tab.searchItems[currentSearchItemIndex].displayName">
          </option>
          </div>
        </select>

but we still get the error during form submit:

2007-10-24 15:01:56,408, ERROR,
[com.db.rdq.web.tapestry.html.RDQException],
line 22, org.apache.tapestry.BindingException
2007-10-24 15:01:56,408, ERROR,
[com.db.rdq.web.tapestry.html.RDQException],
line 23, Unable to update OGNL expression '<parsed OGNL expression>' of
[EMAIL PROTECTED]/$Search] to true: source is null for
getProperty(null, "currentSearchItemIndex")
2007-10-24 15:01:56,408, ERROR,
[com.db.rdq.web.tapestry.html.RDQException],
line 32,
2007-10-24 15:01:56,408, ERROR,
[com.db.rdq.web.tapestry.html.RDQException],
line 44,
binding|ExpressionBinding[Home/$Search
tab.searchItems[currentSearchItemIndex].selected]
location|context:/WEB-INF/Search.html, line 83
2007-10-24 15:01:56,424, ERROR,
[com.db.rdq.web.tapestry.html.RDQException],
line 22, org.apache.hivemind.ApplicationRuntimeException
2007-10-24 15:01:56,424, ERROR,
[com.db.rdq.web.tapestry.html.RDQException],
line 23, Unable to update OGNL expression '<parsed OGNL expression>' of
[EMAIL PROTECTED]/$Search] to true: source is null for
getProperty(null, "currentSearchItemIndex")
2007-10-24 15:01:56,424, ERROR,
[com.db.rdq.web.tapestry.html.RDQException],
line 32,
2007-10-24 15:01:56,424, ERROR,
[com.db.rdq.web.tapestry.html.RDQException],
line 44,
component|[EMAIL PROTECTED]/$Search]
location|context:/WEB-INF/Home.html, line 51
2007-10-24 15:01:56,424, ERROR,
[com.db.rdq.web.tapestry.html.RDQException],
line 22, ognl.OgnlException
2007-10-24 15:01:56,440, ERROR,
[com.db.rdq.web.tapestry.html.RDQException],
line 23, source is null for getProperty(null, "currentSearchItemIndex")
2007-10-24 15:01:56,440, ERROR,
[com.db.rdq.web.tapestry.html.RDQException],
line 32,
ognl.OgnlRuntime.getProperty(OgnlRuntime.java:1993)
...

Using the previous work around to get past this first select we still get
the
same error on the second select even after adding volatile.

      <td jwcid="@For"
          source="ognl:tab.searchCriteriaOptions"
          value="ognl:currentFilterGroup"
          index="ognl:currentFilterGroupIndex"
          volatile="ognl:true">
        <div jwcid="@If"
             element="literal:td"
             condition="ognl:tab.searchCriteria[currentFilterGroupIndex]
!=
null"
             class="ognl:'filter' +
getFilterColumnStyle(currentFilterGroupIndex)">
        <select jwcid="@Select"
                multiple="literal:false"
                size="10"


onchange="ognl:'searchSubmit(\''[EMAIL PROTECTED]@FILTER+'\',

 '+currentFilterGroupIndex+');'">
          <div jwcid="@For"
               source="ognl:currentFilterGroup"
               value="ognl:currentFilter"
               index="ognl:currentFilterIndex"
               volatile="ognl:true">
          <option jwcid="@Option"


selected="ognl:tab.searchCriteriaSelections[currentFilterGroupIndex][currentFilterIndex]"

                  label="ognl:currentFilter">
          </option>
          </div>
        </select>
        </div>
      </td>

2007-10-24 15:05:16,005, ERROR,
[com.db.rdq.web.tapestry.html.RDQException],
line 22, org.apache.tapestry.BindingException
2007-10-24 15:05:16,020, ERROR,
[com.db.rdq.web.tapestry.html.RDQException],
line 23, Unable to update OGNL expression '<parsed OGNL expression>' of
[EMAIL PROTECTED]/$Search] to false: source is null for
getProperty(null, "currentFilterGroupIndex")
2007-10-24 15:05:16,020, ERROR,
[com.db.rdq.web.tapestry.html.RDQException],
line 32,
2007-10-24 15:05:16,020, ERROR,
[com.db.rdq.web.tapestry.html.RDQException],
line 44,
binding|ExpressionBinding[Home/$Search
tab.searchCriteriaSelections[currentFilterGroupIndex][currentFilterIndex]]
location|context:/WEB-INF/Search.html, line 109
2007-10-24 15:05:16,020, ERROR,
[com.db.rdq.web.tapestry.html.RDQException],
line 22, org.apache.hivemind.ApplicationRuntimeException
2007-10-24 15:05:16,020, ERROR,
[com.db.rdq.web.tapestry.html.RDQException],
line 23, Unable to update OGNL expression '<parsed OGNL expression>' of
[EMAIL PROTECTED]/$Search] to false: source is null for
getProperty(null, "currentFilterGroupIndex")
2007-10-24 15:05:16,020, ERROR,
[com.db.rdq.web.tapestry.html.RDQException],
line 32,
2007-10-24 15:05:16,020, ERROR,
[com.db.rdq.web.tapestry.html.RDQException],
line 44,
component|[EMAIL PROTECTED]/$Search]
location|context:/WEB-INF/Home.html, line 51
2007-10-24 15:05:16,020, ERROR,
[com.db.rdq.web.tapestry.html.RDQException],
line 22, ognl.OgnlException
2007-10-24 15:05:16,020, ERROR,
[com.db.rdq.web.tapestry.html.RDQException],
line 23, source is null for getProperty(null, "currentFilterGroupIndex")
2007-10-24 15:05:16,020, ERROR,
[com.db.rdq.web.tapestry.html.RDQException],
line 32,
ognl.OgnlRuntime.getProperty(OgnlRuntime.java:1993)
...

Do we also need to consider the match parameter?

We did look at the Hints on the For page previously and a couple of them
would
involve a fair amount of re writing. The above is only a sample of pages
we
have and if we need to use IPrimaryKeyConverter or Squeeze adapters for
all
our For loops it's going to be a lot of work.

Do you think these issues are down to the OGNL upgrade?

Dom




             andyhot
             <[EMAIL PROTECTED]
             >
To
             Sent by: Andreas           Tapestry users
             Andreou                    <users@tapestry.apache.org>
             <[EMAIL PROTECTED]
cc
             m>

Subject
                                        Re: T4.1.3 loop index issues,
             10/24/2007 02:39           migrating from 4.0.2
             PM


             Please respond to
              "Tapestry users"
             <[EMAIL PROTECTED]
                 ache.org>






looks like an issue during rewind -
take a look at all those parameters and the hints for the @For component
at http://tapestry.apache.org/tapestry4.1/components/general/for.html

If the form worked in 4.0 and you weren't getting any
|StaleLinkExceptions|,
then using volatile="true" should probably fix this


Dom Couldwell wrote:

Thanks to Jessie for his help fixing our last issue (We've updated to the

ognl

2.7.2 snapshot which fixed it) but and have run into another issue
migrating
form 4.0.2 to 4.1.3.

The following works fine under 4.0.2:

        <select jwcid="@Select"
                multiple="literal:false"
                size="10"



onchange="ognl:'searchSubmit(\''[EMAIL PROTECTED]@INSTRUMENT_GROUP+'\',0);'">

          <div jwcid="@For"
               source="ognl:tab.searchItems"
               value="ognl:currentSearchItem"
               index="ognl:currentSearchItemIndex">
          <option jwcid="@Option"

selected="ognl:tab.searchItems[currentSearchItemIndex].selected"

label="ognl:tab.searchItems[currentSearchItemIndex].displayName">
          </option>
          </div>
        </select>

Under 4.1.3 the page renders but then when the users selects an option
and
submits the form we get the following error:

2007-10-24 13:41:15,206, ERROR,
[com.db.rdq.web.tapestry.html.RDQException],
line 22, org.apache.tapestry.BindingException
2007-10-24 13:41:15,206, ERROR,
[com.db.rdq.web.tapestry.html.RDQException],
line 23, Unable to update OGNL expression '<parsed OGNL expression>' of
[EMAIL PROTECTED]/$Search] to false: source is null for
getProperty(null, "currentSearchItemIndex")
2007-10-24 13:41:15,221, ERROR,
[com.db.rdq.web.tapestry.html.RDQException],
line 32,
2007-10-24 13:41:15,221, ERROR,
[com.db.rdq.web.tapestry.html.RDQException],
line 44,
binding|ExpressionBinding[Home/$Search
tab.searchItems[currentSearchItemIndex].selected]
location|context:/WEB-INF/Search.html, line 82
2007-10-24 13:41:15,221, ERROR,
[com.db.rdq.web.tapestry.html.RDQException],
line 22, org.apache.hivemind.ApplicationRuntimeException
2007-10-24 13:41:15,221, ERROR,
[com.db.rdq.web.tapestry.html.RDQException],
line 23, Unable to update OGNL expression '<parsed OGNL expression>' of
[EMAIL PROTECTED]/$Search] to false: source is null for
getProperty(null, "currentSearchItemIndex")
2007-10-24 13:41:15,237, ERROR,
[com.db.rdq.web.tapestry.html.RDQException],
line 32,
2007-10-24 13:41:15,253, ERROR,
[com.db.rdq.web.tapestry.html.RDQException],
line 44,
component|[EMAIL PROTECTED]/$Search]
location|context:/WEB-INF/Home.html, line 51
2007-10-24 13:41:15,253, ERROR,
[com.db.rdq.web.tapestry.html.RDQException],
line 22, ognl.OgnlException
2007-10-24 13:41:15,253, ERROR,
[com.db.rdq.web.tapestry.html.RDQException],
line 23, source is null for getProperty(null, "currentSearchItemIndex")
2007-10-24 13:41:15,253, ERROR,
[com.db.rdq.web.tapestry.html.RDQException],
line 32,
ognl.OgnlRuntime.getProperty(OgnlRuntime.java:1993)
...

It looks like the index variable is going out of scope or something
equally
strange.

If we update the template to:

        <select jwcid="@Select"
                multiple="literal:false"
                size="10"



onchange="ognl:'searchSubmit(\''[EMAIL PROTECTED]@INSTRUMENT_GROUP+'\',0);'">

          <div jwcid="@For"
               source="ognl:tab.searchItems"
               value="ognl:currentSearchItem"
               index="ognl:currentSearchItemIndex">
          <option jwcid="@Option"
                  selected="ognl:currentSearchItem.selected"

label="ognl:tab.searchItems[currentSearchItemIndex].displayName">
          </option>
          </div>
        </select>

The page renders and submits correctly.
In 4.0.2 we had avoided this syntax as it did not reliably save the value

back

into the correct element, has this syntax changed in 4.1.3?

Unfortunately even with the above work around we hit a similar problem
again
later in the form

        <select jwcid="@Select"
                multiple="literal:false"
                size="10"



onchange="ognl:'searchSubmit(\''[EMAIL PROTECTED]@FILTER+'\',

 '+currentFilterGroupIndex+');'">
          <div jwcid="@For"
               source="ognl:currentFilterGroup"
               value="ognl:currentFilter"
               index="ognl:currentFilterIndex">
          <option jwcid="@Option"



selected="ognl:tab.searchCriteriaSelections[currentFilterGroupIndex][currentFilterIndex]"

                  label="ognl:currentFilter">
          </option>
          </div>
        </select>

The above renders OK but then the form submits we get:

2007-10-24 13:49:21,134, ERROR,
[com.db.rdq.web.tapestry.html.RDQException],
line 22, org.apache.tapestry.BindingException
2007-10-24 13:49:21,134, ERROR,
[com.db.rdq.web.tapestry.html.RDQException],
line 23, Unable to update OGNL expression '<parsed OGNL expression>' of
[EMAIL PROTECTED]/$Search] to false: source is null for
getProperty(null, "currentFilterGroupIndex")
2007-10-24 13:49:21,134, ERROR,
[com.db.rdq.web.tapestry.html.RDQException],
line 32,
2007-10-24 13:49:21,134, ERROR,
[com.db.rdq.web.tapestry.html.RDQException],
line 44,
binding|ExpressionBinding[Home/$Search

tab.searchCriteriaSelections[currentFilterGroupIndex][currentFilterIndex]]
location|context:/WEB-INF/Search.html, line 106
2007-10-24 13:49:21,134, ERROR,
[com.db.rdq.web.tapestry.html.RDQException],
line 22, org.apache.hivemind.ApplicationRuntimeException
2007-10-24 13:49:21,149, ERROR,
[com.db.rdq.web.tapestry.html.RDQException],
line 23, Unable to update OGNL expression '<parsed OGNL expression>' of
[EMAIL PROTECTED]/$Search] to false: source is null for
getProperty(null, "currentFilterGroupIndex")
2007-10-24 13:49:21,149, ERROR,
[com.db.rdq.web.tapestry.html.RDQException],
line 32,
2007-10-24 13:49:21,149, ERROR,
[com.db.rdq.web.tapestry.html.RDQException],
line 44,
component|[EMAIL PROTECTED]/$Search]
location|context:/WEB-INF/Home.html, line 51
2007-10-24 13:49:21,149, ERROR,
[com.db.rdq.web.tapestry.html.RDQException],
line 22, ognl.OgnlException
2007-10-24 13:49:21,149, ERROR,
[com.db.rdq.web.tapestry.html.RDQException],
line 23, source is null for getProperty(null, "currentFilterGroupIndex")
2007-10-24 13:49:21,149, ERROR,
[com.db.rdq.web.tapestry.html.RDQException],
line 32,
ognl.OgnlRuntime.getProperty(OgnlRuntime.java:1993)
...

again the index variable seems to have gone out of scope or something.

Any ideas what's changed between 4.0.2 and 4.1.3? Is this another ognl

issue?

I know Andy mentioned we should consider cleaning up our markup in
response
to

my last post.
Is there something in particular we're doing that we should consider

changing?

Thanks,

Dom

---

This e-mail may contain confidential and/or privileged information. If
you
are not the intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-mail. Any
unauthorized copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / JEE Consulting


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---

This e-mail may contain confidential and/or privileged information. If you
are not the intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-mail. Any
unauthorized copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--
Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / JEE Consulting


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---

This e-mail may contain confidential and/or privileged information. If you
are not the intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-mail. Any
unauthorized copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--
Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / JEE Consulting


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to