Java Mailing List Archive

http://www.gg3721.com/

Home » Struts Users Mailing List »

user Digest 7 Jan 2010 12:40:07 -0000 Issue 8976

user-digest-help

2010-01-07


Author LoginPost Reply

user Digest 7 Jan 2010 12:40:07 -0000 Issue 8976

Topics (messages 204537 through 204547):

Re: struts2 and tables
 204537 by: Chris Pratt
 204541 by: Sergio
 204543 by: xerax nono
 204545 by: Manimaran Ramaraj

Null Pointer Exception After calling Execute And Wait Interceptor
 204538 by: steff_uk
 204539 by: steff_uk

Param Interceptor - Unable to save the data for Map of Lists
 204540 by: satyanarayana katta
 204546 by: Gabriel Belingueres

Re: What may cause ognl.InappropriateExpressionException warning ?
 204542 by: Manimaran Ramaraj

freemarker error in select tag
 204544 by: Johannes Geppert
 204547 by: Gabriel Belingueres

Administrivia:

---------------------------------------------------------------------
To post to the list, e-mail: user@(protected)
To unsubscribe, e-mail: user-digest-unsubscribe@(protected)
For additional commands, e-mail: user-digest-help@(protected)

----------------------------------------------------------------------


Attachment: user_204537.ezm (zipped)
Maybe this will clear things up. This is a working example from our site:

<s:url action="reset-password-csr" id="reset" escapeAmp="false"/>
<display:table uid="user" name="${users.list}" pagesize="20"
requestURI="csr-search-results.html" class="tableWithHeaderBG"
cellpadding="0" cellspacing="0" summary="This table lists Users
resulting from a previous search" export="false">
  <display:setProperty name="basic.msg.empty_list">No Users
Found</display:setProperty>
  <display:column title="Last Name" property="name.lastname"
class="tdLeft" scope="row"/>
  <display:column title="First Name" property="name.firstname"
class="tdLeftNoPad"/>
  <display:column title="User ID" property="userid" paramId="userid"
value="%{'userid'}" paramProperty="userid" class="tdLeft"
scope="row"/>
  <display:column title="Email" property="email" paramId="email"
paramProperty="email" class="tdLeftNoPad"/>
  <display:column title="Security Question"
property="securityChallenge" class="tdLeftNoPad"/>
  <display:column title="Security Answer"
property="securityResponse" class="tdLeftNoPad"/>
  <display:column title="&nbsp;" href="${reset}" paramId="userid"
paramProperty="userid" class="tdLeftNoPad">Reset
Password</display:column>
</display:table>

 (*Chris*)


On Wed, Jan 6, 2010 at 5:00 PM, Chris Pratt <thechrispratt@(protected):

> In your action, add a getList() method that returns the list generated by
> the action, then just pass name="${list}" to the display:table tag. Or, you
> could create the list and put it in the request or session scope and it
> would work exactly the same.
>
> The trick with the interceptor is just to get it to ignore the special
> tracking parameters that DisplayTag uses in the prev/next links.
>
>  (*Chris*)
>
>
> On Wed, Jan 6, 2010 at 4:28 PM, Frans Thamura <frans@(protected):
>
>> wah can share how the interceptor work with display tag
>>
>> sorry if this is silly question, but honestly i still need the glue
>>
>> usually i create a private xxx List, and will be passed to the list
>>
>> how integrate the list $xxx with the display tag?
>>
>> thx
>>
>>
>> On Thu, Jan 7, 2010 at 7:25 AM, Chris Pratt <thechrispratt@(protected)>
>> wrote:
>> > It's just a standard JSP Tag Library. Because Struts 2 has the Request
>> > Wrapper, you can use standard JSTL EL to get the list from your action
>> and
>> > pass it to the DisplayTag Table, from then on it's just using the
>> > capabilities of DisplayTag to put the data where you want it. The one
>> > caveat is that we've had to set the requestURI attribute to make sure
>> that
>> > the prev/next links go to the right place and I added the excludeParams
>> > parameter below to the params interceptor so that you don't get the ugly
>> > warnings from struts.
>> >
>> >     <interceptor-ref name="params">
>> >       <param name="excludeParams">d-\d*-[a-z]</param>
>> >     </interceptor-ref>
>> >
>> > (*Chris*)
>> >
>> > On Wed, Jan 6, 2010 at 4:12 PM, Frans Thamura <frans@(protected)>
>> wrote:
>> >
>> >> can share how the struts2 work with display tag
>> >>
>> >>
>> >> sorry never use this also, how the display tag work with List when we
>> >> submit the grid
>> >>
>> >> F
>> >>
>> >>
>> >>
>> >>
>> >> On Thu, Jan 7, 2010 at 7:00 AM, Chris Pratt <thechrispratt@(protected)>
>> >> wrote:
>> >> > We use DisplayTag (http://www.displaytag.org), it works pretty well.
>> >> > (*Chris*)
>> >> >
>> >> > On Wed, Jan 6, 2010 at 3:28 PM, Sergio
>> >> > <killing-is-my-business@(protected):
>> >> >
>> >> >> Hi, people, how can i show a table into a jsp from the struts
>> action?
>> >> Are
>> >> >> there a simple method for doing that? I've tried with java
>> collections
>> >> into
>> >> >> the action and "property" tag into the jsp with no success.
>> >> >>
>> >> >> thanks in advance
>> >> >>
>> >> >> --
>> >> >> Sergio
>> >> >>
>> >> >>
>> >> >>
>> ---------------------------------------------------------------------
>> >> >> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> >> >> For additional commands, e-mail: user-help@(protected)
>> >> >>
>> >> >>
>> >> >
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> >> For additional commands, e-mail: user-help@(protected)
>> >>
>> >>
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>

Attachment: user_204541.ezm (zipped)
Chris Pratt escribió:
> Maybe this will clear things up. This is a working example from our site:
>
>  <s:url action="reset-password-csr" id="reset" escapeAmp="false"/>
>  <display:table uid="user" name="${users.list}" pagesize="20"
> requestURI="csr-search-results.html" class="tableWithHeaderBG"
> cellpadding="0" cellspacing="0" summary="This table lists Users
> resulting from a previous search" export="false">
>   <display:setProperty name="basic.msg.empty_list">No Users
> Found</display:setProperty>
>   <display:column title="Last Name" property="name.lastname"
> class="tdLeft" scope="row"/>
>   <display:column title="First Name" property="name.firstname"
> class="tdLeftNoPad"/>
>   <display:column title="User ID" property="userid" paramId="userid"
> value="%{'userid'}" paramProperty="userid" class="tdLeft"
> scope="row"/>
>   <display:column title="Email" property="email" paramId="email"
> paramProperty="email" class="tdLeftNoPad"/>
>   <display:column title="Security Question"
> property="securityChallenge" class="tdLeftNoPad"/>
>   <display:column title="Security Answer"
> property="securityResponse" class="tdLeftNoPad"/>
>   <display:column title="&nbsp;" href="${reset}" paramId="userid"
> paramProperty="userid" class="tdLeftNoPad">Reset
> Password</display:column>
>  </display:table>
>
>   (*Chris*)
>
>
> On Wed, Jan 6, 2010 at 5:00 PM, Chris Pratt <thechrispratt@(protected):
>
>  
>> In your action, add a getList() method that returns the list generated by
>> the action, then just pass name="${list}" to the display:table tag. Or, you
>> could create the list and put it in the request or session scope and it
>> would work exactly the same.
>>
>> The trick with the interceptor is just to get it to ignore the special
>> tracking parameters that DisplayTag uses in the prev/next links.
>>
>>  (*Chris*)
>>
>>
>> On Wed, Jan 6, 2010 at 4:28 PM, Frans Thamura <frans@(protected):
>>
>>  
>>> wah can share how the interceptor work with display tag
>>>
>>> sorry if this is silly question, but honestly i still need the glue
>>>
>>> usually i create a private xxx List, and will be passed to the list
>>>
>>> how integrate the list $xxx with the display tag?
>>>
>>> thx
>>>
>>>
>>> On Thu, Jan 7, 2010 at 7:25 AM, Chris Pratt <thechrispratt@(protected)>
>>> wrote:
>>>    
>>>> It's just a standard JSP Tag Library. Because Struts 2 has the Request
>>>> Wrapper, you can use standard JSTL EL to get the list from your action
>>>>      
>>> and
>>>    
>>>> pass it to the DisplayTag Table, from then on it's just using the
>>>> capabilities of DisplayTag to put the data where you want it. The one
>>>> caveat is that we've had to set the requestURI attribute to make sure
>>>>      
>>> that
>>>    
>>>> the prev/next links go to the right place and I added the excludeParams
>>>> parameter below to the params interceptor so that you don't get the ugly
>>>> warnings from struts.
>>>>
>>>>     <interceptor-ref name="params">
>>>>       <param name="excludeParams">d-\d*-[a-z]</param>
>>>>     </interceptor-ref>
>>>>
>>>> (*Chris*)
>>>>
>>>> On Wed, Jan 6, 2010 at 4:12 PM, Frans Thamura <frans@(protected)>
>>>>      
>>> wrote:
>>>    
>>>>> can share how the struts2 work with display tag
>>>>>
>>>>>
>>>>> sorry never use this also, how the display tag work with List when we
>>>>> submit the grid
>>>>>
>>>>> F
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Thu, Jan 7, 2010 at 7:00 AM, Chris Pratt <thechrispratt@(protected)>
>>>>> wrote:
>>>>>      
>>>>>> We use DisplayTag (http://www.displaytag.org), it works pretty well.
>>>>>> (*Chris*)
>>>>>>
>>>>>> On Wed, Jan 6, 2010 at 3:28 PM, Sergio
>>>>>> <killing-is-my-business@(protected):
>>>>>>
>>>>>>        
>>>>>>> Hi, people, how can i show a table into a jsp from the struts
>>>>>>>          
>>> action?
>>>    
>>>>> Are
>>>>>      
>>>>>>> there a simple method for doing that? I've tried with java
>>>>>>>          
>>> collections
>>>    
>>>>> into
>>>>>      
>>>>>>> the action and "property" tag into the jsp with no success.
>>>>>>>
>>>>>>> thanks in advance
>>>>>>>
>>>>>>> --
>>>>>>> Sergio
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>          
>>> ---------------------------------------------------------------------
>>>    
>>>>>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>>>>>>> For additional commands, e-mail: user-help@(protected)
>>>>>>>
>>>>>>>
>>>>>>>          
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>>>>> For additional commands, e-mail: user-help@(protected)
>>>>>
>>>>>
>>>>>      
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>>> For additional commands, e-mail: user-help@(protected)
>>>
>>>
>>>    
>
>  
but i don't understand the data structure to hold the users. When you
get the ResultSet from mysql, how do you put it into the list? Without
using hibernate or similar, i've tried with several collections, for
example a <String >, Map <String><String>. The first string holds the
name or user id, and the map holds attribute-value pair. No success, i
think that is a bad solution.

and another question: i need the user id be passed to another action as
a parameter. I've tried with a s:form and a hidden field, something like
<input type="hidden" value="<s:property>"> is the idea. It's about an
online shop, and i'm having problems with:

1.- listing products from mysql
2.- adding products to the cart (from a mysql products list

i'm a little newbie with struts.....

regards

--
Sergio



Attachment: user_204543.ezm (zipped)
you can use iterator over a collection.
see in
http://www.vaannila.com/struts-2/struts-2-example/struts-2-crud-example-1.html

<s:iterator value="userList" status="userStatus">
44.        <tr
45.           class="<s:if test="#userStatus.odd == true ">odd</s:if> <
s:else>even</s:else>">
46.           <td><s:property value="name" /></td>
47.           <td><s:property value="gender" /></td>
48.           <td><s:property value="country" /></td>
49.           <td><s:property value="aboutYou" /></td>
50.           <td><s:property value="mailingList" /></td>
51.           <td>
52.           <s:url id="editURL" action="editUser">
53.             <s:param name="id" value="%{id}"></s:param>
54.           </s:url>
55.           <s:a href="%{editURL}">Edit</s:a>
56.           </td>
57.           <td>
58.           <s:url id="deleteURL" action="deleteUser">
59.             <s:param name="id" value="%{id}"></s:param>
60.           </s:url>
61.           <s:a href="%{deleteURL}">Delete</s:a>
62.           </td>


2010/1/7 Frans Thamura <frans@(protected)>

> can share how the struts2 work with display tag
>
>
> sorry never use this also, how the display tag work with List when we
> submit the grid
>
> F
>
>
>
>
> On Thu, Jan 7, 2010 at 7:00 AM, Chris Pratt <thechrispratt@(protected)>
> wrote:
> > We use DisplayTag (http://www.displaytag.org), it works pretty well.
> > (*Chris*)
> >
> > On Wed, Jan 6, 2010 at 3:28 PM, Sergio
> > <killing-is-my-business@(protected):
> >
> >> Hi, people, how can i show a table into a jsp from the struts action?
> Are
> >> there a simple method for doing that? I've tried with java collections
> into
> >> the action and "property" tag into the jsp with no success.
> >>
> >> thanks in advance
> >>
> >> --
> >> Sergio
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@(protected)
> >> For additional commands, e-mail: user-help@(protected)
> >>
> >>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>


--
Serafin Hernandez Blazquez
649 81 64 87

Attachment: user_204545.ezm (zipped)

Thanx for this post. This method is pretty simple and very useful.

~ Maran


xerax nono wrote:
>
> you can use iterator over a collection.
> see in
> http://www.vaannila.com/struts-2/struts-2-example/struts-2-crud-example-1.html
>
> <s:iterator value="userList" status="userStatus">
> 44.        <tr
> 45.           class="<s:if test="#userStatus.odd == true ">odd</s:if>
> <
> s:else>even</s:else>">
> 46.           <td><s:property value="name" /></td>
> 47.           <td><s:property value="gender" /></td>
> 48.           <td><s:property value="country" /></td>
> 49.           <td><s:property value="aboutYou" /></td>
> 50.           <td><s:property value="mailingList" /></td>
> 51.           <td>
> 52.           <s:url id="editURL" action="editUser">
> 53.             <s:param name="id" value="%{id}"></s:param>
> 54.           </s:url>
> 55.           <s:a href="%{editURL}">Edit</s:a>
> 56.           </td>
> 57.           <td>
> 58.           <s:url id="deleteURL" action="deleteUser">
> 59.             <s:param name="id" value="%{id}"></s:param>
> 60.           </s:url>
> 61.           <s:a href="%{deleteURL}">Delete</s:a>
> 62.           </td>
>
>
> 2010/1/7 Frans Thamura <frans@(protected)>
>
>> can share how the struts2 work with display tag
>>
>>
>> sorry never use this also, how the display tag work with List when we
>> submit the grid
>>
>> F
>>
>>
>>
>>
>> On Thu, Jan 7, 2010 at 7:00 AM, Chris Pratt <thechrispratt@(protected)>
>> wrote:
>> > We use DisplayTag (http://www.displaytag.org), it works pretty well.
>> > (*Chris*)
>> >
>> > On Wed, Jan 6, 2010 at 3:28 PM, Sergio
>> > <killing-is-my-business@(protected):
>> >
>> >> Hi, people, how can i show a table into a jsp from the struts action?
>> Are
>> >> there a simple method for doing that? I've tried with java collections
>> into
>> >> the action and "property" tag into the jsp with no success.
>> >>
>> >> thanks in advance
>> >>
>> >> --
>> >> Sergio
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> >> For additional commands, e-mail: user-help@(protected)
>> >>
>> >>
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>
>
> --
> Serafin Hernandez Blazquez
> 649 81 64 87
>
>

--
Sent from the Struts - User mailing list archive at Nabble.com.



Attachment: user_204538.ezm (zipped)

Hi ,
Iam beginner in Struts2,
iam having query on Execute and wait Interceptor ,

my code flow is like this

Login->Wait Interceptor->Menu/Fail.jsp

I added Interceptor in Struts.xml


  <action name="doLogin" class="validatorlogin.Login">
       <interceptor-ref name="completeStack" />
       <interceptor-ref name="execAndWait" />            
       <result name="wait">Wait.jsp</result>
       <result name="success">menudemo.jsp</result>
       <result name="error">Fail.jsp</result>
    </action>



When i run the project,
After Submitting Login.jsp ,Wait.jsp is rendered after that i[b]t throws
Null pointer Exception instead of Menu.jsp[/b]



With reference to
http://struts.apache.org/2.0.6/docs/execute-and-wait-interceptor.html
http://struts.apache.org/2.0.6/docs/execute-and-wait-interceptor.html
i tried adding delay before the wait page but i get Compilation error

<interceptor-ref name="execAndWait">
    1000
    50
  <interceptor-ref>


Could any one please help me out ,
Thanks in advance,
Arvin


--
Sent from the Struts - User mailing list archive at Nabble.com.



Attachment: user_204539.ezm (zipped)

Hi ,
Iam beginner in Struts2,
iam having query on Execute and wait Interceptor ,

my code flow is like this

Login->Wait Interceptor->Menu/Fail.jsp

I added Interceptor in Struts.xml


  <action name="doLogin" class="validatorlogin.Login">
       <interceptor-ref name="completeStack" />
       <interceptor-ref name="execAndWait" />            
       <result name="wait">Wait.jsp</result>
       <result name="success">menudemo.jsp</result>
       <result name="error">Fail.jsp</result>
    </action>



When i run the project,
After Submitting Login.jsp ,Wait.jsp is rendered after that i[b]t throws
Null pointer Exception instead of Menu.jsp[/b]



With reference to
http://struts.apache.org/2.0.6/docs/execute-and-wait-interceptor.html
http://struts.apache.org/2.0.6/docs/execute-and-wait-interceptor.html
i tried adding delay before the wait page but i get Compilation error

<interceptor-ref name="execAndWait">
    1000
    50
  <interceptor-ref>


Could any one please help me out ,
Thanks in advance,



--
Sent from the Struts - User mailing list archive at Nabble.com.



Attachment: user_204540.ezm (zipped)
Hi,

Struts Version - 2.1.7

We have an issue with the Map<String, List<Object>>. Here is the
scenario, we are displaying the data from the List on the UI as the
text fields. When a user changes and submits the form, the form data
has to be saved.

We are able to display the data from the List onto the UI. When the
form is submitted, the Map is coming back as null in the action class.

 <s:iterator value="textMap" status="iterStatus">
   <s:iterator value="value" status="iterStatus1">
     <s:textfield name="textMap['%{key}']['%{#iterStatus1.index}'].name"
value="%{name}"/>
   </s:iterator>  
 </s:iterator>

I am also attaching the source code

SampleAction.java
Sample.java (Pojo representing the Object in the list)
struts.xml
struts
sample.jsp.

Please help.

Rgds,

Satya
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC      "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"      "http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
  <package name="test" namespace="/test" extends="as-tiles-default">
 
     <action name="testMapsShow" class="test.SampleAction" method="display">
       <result name="success">/testapps/sample.jsp</result>
    </action>

     <action name="testMapsSave" class="test.SampleAction" method="save">
       <result name="success">/testapps/sample.jsp</result>
    </action>
   
 </package>
</struts>

Attachment: user_204546.ezm (zipped)
You didn't attach the action source code, but I guess you are not
instantiating the Map before the ParameterInterceptor is executed. I
can think of 3 choices to do that:

1) instantiate the Map in the same place you declare the instance variable:
 Map<String, List<Object> textMap = new HashMap<String, List<Object>();

2) instantiate the Map inside a prepare method (the action must
implement Preparable interface)
public void prepare() {
  textMap = new HashMap<String, List<Object>();
}

3) get the (not null) instance from another place inside in the Map
getter & setter, for example, from session scope:
public Map<String, List<Object> getTextMap() {
  return (Map<String, List<Object>) sessionMap.get("themap");
}

HTH

2010/1/7 satyanarayana katta <saty.prasad@(protected)>:
> Hi,
>
> Struts Version - 2.1.7
>
> We have an issue with the Map<String, List<Object>>.  Here is the
> scenario, we are displaying the data from the List on the UI as the
> text fields.  When a user changes and submits the form, the form data
> has to be saved.
>
> We are able to display the data from the List onto the UI.  When the
> form is submitted, the Map is coming back as null in the action class.
>
>        <s:iterator value="textMap" status="iterStatus">
>                <s:iterator value="value" status="iterStatus1">
>                        <s:textfield name="textMap['%{key}']['%{#iterStatus1.index}'].name"
> value="%{name}"/>
>                </s:iterator>
>        </s:iterator>
>
> I am also attaching the source code
>
> SampleAction.java
> Sample.java (Pojo representing the Object in the list)
> struts.xml
> struts
> sample.jsp.
>
> Please help.
>
> Rgds,
>
> Satya
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>


Attachment: user_204542.ezm (zipped)

Hi

<interceptor-ref name="sampleInterceptorStackIncludingDefaultStack">
 
          d-\d+?-[sop]
 
</interceptor-ref>

Instead of applying the above pattern, apply the following in struts.xml

its easy and simple to resolve the problem of ( Inappropriate OGNL
expression d-345234)

 <interceptor name="params"
   class="com.opensymphony.xwork2.interceptor.ParametersInterceptor"/>


~ Maran



jsubei wrote:
>
> Ok, I've configured the struts.xml as you say (directly in the
> defaultStack for me) and it's perfect ! Thank you a lot !
> Regards,
> Norbert
>
>
> Oscar Calderón-2 wrote:
>>
>> As Musachy says, you could ignore it in the params interceptor in this
>> way:
>>
>> <interceptor-ref name="sampleInterceptorStackIncludingDefaultStack">
>>          
>>            d-\d+?-[sop]
>>          
>>         </interceptor-ref>
>>
>>>
>>>
>>> Musachy Barroso escribió:
>>>> try adding quotes around it 'd-6836677-p' then it will be interpreted
>>>> as a string, or try to ignore it in the params interceptor.
>>>>
>>>> On Mon, Nov 23, 2009 at 8:27 AM, jsubei <jsubei@(protected):
>>>>  
>>>>> Dear all,
>>>>>
>>>>> I'm using struts 2.1.8 with displaytag 1.2
>>>>> and, of course, I have the same problem.
>>>>>
>>>>> Have you found a solution ?
>>>>>
>>>>> Thank you,
>>>>>
>>>>> Norbert
>>>>>
>>>>>
>>>>>
>>>>> jctovarueda wrote:
>>>>>  
>>>>>> Lu Ying,
>>>>>>
>>>>>> I could detect the problem, it's apparently a bug from Struts 2
>>>>>> (XWorks).
>>>>>>
>>>>>> It seems to be that OGNL Utils setValue confuses the "d-6836677-p"
>>>>>> expression as substract operation, it means, the expression is
>>>>>> evaluated
>>>>>> like ( d - 6836677 ) - p as mathematical operation.
>>>>>>
>>>>>> I will try to find a solution to this problem, if you have some
>>>>>> solution,
>>>>>> pls write to me.
>>>>>>
>>>>>> Regards,
>>>>>> JC
>>>>>>
>>>>>>
>>>>>> luy wrote:
>>>>>>    
>>>>>>>>> params interceptor doesn't like parameters with spaces
>>>>>>>>> in the name (this was fixed in xwork already), to fix it, set
>>>>>>>>> "acceptedParamNames" to "[[\p{Graph}\s]&&[^,#:=]]*" in your param
>>>>>>>>> interceptor.
>>>>>>>>>        
>>>>>>>> Right, I am using displayTag(displaytag-1.2.jar). The parameter
>>>>>>>> looks
>>>>>>>> like:
>>>>>>>>
>>>>>>>> https://info/ProcessBrowse.action?d-6836677-p=7
>>>>>>>>
>>>>>>>> "d-6836677-p=7" caused the problem. Is there any way that
>>>>>>>> "d-6836677-p=7" can be accepted?
>>>>>>>>      
>>>>>>> Ok, I did a hack to disable warning message as a temporal solution:
>>>>>>>
>>>>>>> log4j.logger.com.opensymphony.xwork2.util.logging.commons.CommonsLogger=ERROR
>>>>>>>
>>>>>>> --
>>>>>>> Lu Ying
>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>>>>>>> For additional commands, e-mail: user-help@(protected)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>      
>>>>>>    
>>>>> --
>>>>> View this message in context:
>>>>> http://old.nabble.com/What-may-cause---ognl.InappropriateExpressionException--warning---tp21818620p26481347.html
>>>>> Sent from the Struts - User mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>>>>> For additional commands, e-mail: user-help@(protected)
>>>>>
>>>>>
>>>>>  
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>>>> For additional commands, e-mail: user-help@(protected)
>>>>
>>>>
>>>>  
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>>
>
>

--
Sent from the Struts - User mailing list archive at Nabble.com.



Attachment: user_204544.ezm (zipped)

Hello,

today i got this error while rendering an simple select box.

2010-01-07 11:08:41,420 ERROR (freemarker.runtime:96) -
Error on line 69, column 13 in template/simple/select.ftl
stack.findValue('top') is undefined.
It cannot be assigned to itemKey
The problematic instruction:
----------
==> assignment: itemKey=stack.findValue('top') [on line 69, column 13 in
template/simple/select.ftl]
in user-directive s.iterator [on line 59, column 1 in
template/simple/select.ftl]
----------

Java backtrace for programmers:
----------
freemarker.core.InvalidReferenceException: Error on line 69, column 13 in
template/simple/select.ftl
stack.findValue('top') is undefined.
It cannot be assigned to itemKey
    at freemarker.core.Assignment.accept (Assignment.java:111)
    at freemarker.core.Environment.visit (Environment.java:209)
    at freemarker.core.MixedContent.accept (MixedContent.java:92)
    at freemarker.core.Environment.visit (Environment.java:209)
    at freemarker.core.IfBlock.accept (IfBlock.java:82)
    at freemarker.core.Environment.visit (Environment.java:209)
    at freemarker.core.MixedContent.accept (MixedContent.java:92)
    at freemarker.core.Environment.visit (Environment.java:209)
    at freemarker.core.Environment.visit (Environment.java:298)
    at freemarker.core.UnifiedCall.accept (UnifiedCall.java:130)
    at freemarker.core.Environment.visit (Environment.java:209)
    at freemarker.core.MixedContent.accept (MixedContent.java:92)
    at freemarker.core.Environment.visit (Environment.java:209)
    at freemarker.core.Environment.process (Environment.java:189)
    at freemarker.template.Template.process (Template.java:237)
    at
org.apache.struts2.components.template.FreemarkerTemplateEngine.renderTemplate(FreemarkerTemplateEn
gine.java:182)
    at
org.apache.struts2.components.UIBean.mergeTemplate (UIBean.java:559)
    at org.apache.struts2.components.UIBean.end (UIBean.java:513)
    at
org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag (ComponentTagSupport.java:42)
    at
org.apache.jsp.pages.sap_jsp._jspx_meth_s_select_2(sap_jsp.java:346)

I don't know what freemarker wants to say.
Does anyone have a suggestion?

Best Regards

Johannes Geppert


-----
---
web: http://www.jgeppert.com
twitter: http://twitter.com/jogep

--
Sent from the Struts - User mailing list archive at Nabble.com.



Attachment: user_204547.ezm (zipped)
Please post the S2 version number, the <s:select> tag you are using
together with the action code to initialize the select list/map.

2010/1/7 Johannes Geppert <jogep@(protected)>:
>
> Hello,
>
> today i got this error while rendering an simple select box.
>
> 2010-01-07 11:08:41,420 ERROR (freemarker.runtime:96) -
> Error on line 69, column 13 in template/simple/select.ftl
> stack.findValue('top') is undefined.
> It cannot be assigned to itemKey
> The problematic instruction:
> ----------
> ==> assignment: itemKey=stack.findValue('top') [on line 69, column 13 in
> template/simple/select.ftl]
>  in user-directive s.iterator [on line 59, column 1 in
> template/simple/select.ftl]
> ----------
>
> Java backtrace for programmers:
> ----------
> freemarker.core.InvalidReferenceException: Error on line 69, column 13 in
> template/simple/select.ftl
> stack.findValue('top') is undefined.
> It cannot be assigned to itemKey
>        at freemarker.core.Assignment.accept (Assignment.java:111)
>        at freemarker.core.Environment.visit (Environment.java:209)
>        at freemarker.core.MixedContent.accept (MixedContent.java:92)
>        at freemarker.core.Environment.visit (Environment.java:209)
>        at freemarker.core.IfBlock.accept (IfBlock.java:82)
>        at freemarker.core.Environment.visit (Environment.java:209)
>        at freemarker.core.MixedContent.accept (MixedContent.java:92)
>        at freemarker.core.Environment.visit (Environment.java:209)
>        at freemarker.core.Environment.visit (Environment.java:298)
>        at freemarker.core.UnifiedCall.accept (UnifiedCall.java:130)
>        at freemarker.core.Environment.visit (Environment.java:209)
>        at freemarker.core.MixedContent.accept (MixedContent.java:92)
>        at freemarker.core.Environment.visit (Environment.java:209)
>        at freemarker.core.Environment.process (Environment.java:189)
>        at freemarker.template.Template.process (Template.java:237)
>        at
> org.apache.struts2.components.template.FreemarkerTemplateEngine.renderTemplate(FreemarkerTemplateEn
> gine.java:182)
>        at
> org.apache.struts2.components.UIBean.mergeTemplate (UIBean.java:559)
>        at org.apache.struts2.components.UIBean.end (UIBean.java:513)
>        at
> org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag (ComponentTagSupport.java:42)
>        at
> org.apache.jsp.pages.sap_jsp._jspx_meth_s_select_2(sap_jsp.java:346)
>
> I don't know what freemarker wants to say.
> Does anyone have a suggestion?
>
> Best Regards
>
> Johannes Geppert
>
>
> -----
> ---
> web: http://www.jgeppert.com
> twitter: http://twitter.com/jogep
>
> --
> View this message in context: http://old.nabble.com/freemarker-error-in-select-tag-tp27057643p27057643.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

©2008 gg3721.com - Jax Systems, LLC, U.S.A.