Java Mailing List Archive

http://www.gg3721.com/

Home » Struts Users Mailing List »

user Digest 5 Feb 2010 22:27:09 -0000 Issue 9001

user-digest-help

2010-02-05


Author LoginPost Reply

user Digest 5 Feb 2010 22:27:09 -0000 Issue 9001

Topics (messages 204966 through 204991):

Re: dynamic i18n
 204966 by: Peter Symoens

Re: Struts 2 - Global Validation
 204967 by: wild_oscar

Dynamic values for rows attribute of s:textarea
 204968 by: Jim Talbut
 204969 by: Wes Wannemacher
 204981 by: Jim Talbut

Problem with Exception Interceptor
 204970 by: DavidZaz
 204971 by: Cimballi
 204972 by: DavidZaz
 204973 by: Cimballi
 204974 by: DavidZaz
 204976 by: Cimballi
 204986 by: Greg Lindholm

Re: how to customize the rendering of a tabbedpanel? struts2, dojo plugin
 204975 by: Stephen Ince
 204985 by: Jake Vang
 204987 by: Stephen Ince
 204988 by: Jake Vang
 204991 by: Stephen Ince

Re: array list validation
 204977 by: Stephen Ince
 204978 by: Stephen Ince
 204979 by: Stephen Ince

Re: NPE
 204980 by: Saeed Iqbal
 204982 by: Lukasz Lenart
 204983 by: Saeed Iqbal
 204984 by: Saeed Iqbal

Struts 1.x and servlet 2.5
 204989 by: Chad Lehnert

Re: JSON plugin ignoring includeProperties parameter
 204990 by: new2struts

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_204966.ezm (zipped)
Works fine. Why didn't I think of that?

Thank you!

Peter

On 04/02/2010 17:14, Brian Thompson wrote:
> What do you get when you try<s:property value="%{getText(name)}" /> ?
>
> -Brian
>
> On Thu, Feb 4, 2010 at 10:09 AM, Peter Symoens<peter.symoens@(protected):
>
>  
>> Sorry, my message was incorrect.
>>
>> <s:property value="%{getText('%{name}')}" />  prints out the (non-i18nzed)
>> property value.
>>
>>
>> <s:property value="%{getText(%{name})}" />  prints out nothing.
>>
>>
>>
>>
>>
>>
>> On 04/02/2010 16:59, Lukasz Lenart wrote:
>>
>>    
>>> 2010/2/4 Peter Symoens<peter.symoens@(protected)>:
>>>
>>>
>>>    
>>>> <s:property value="%{getText(%{name})}" />  doesn't seem to do the trick.
>>>>
>>>>
>>>>      
>>> Did you try
>>> <s:property value="%{getText(%{name})}" />
>>>
>>>
>>> Regards
>>>
>>>
>>>    
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>>    
>  




Attachment: user_204967.ezm (zipped)

As for the topic, I don't know the answer.

As for the chinese address, I believe everyone in the mailing list gets
those annoying mails. Can't someone just remove the address from the list?



Stephen Turner wrote:
>
> Hello Arul,
>
> No worries - welcome to the list.
>
> The message you got was from a list subscriber's email system, not from
> the struts mailing list so it's outside the list admins' control. They
> happen from time to time - best to ignore those messages.
>
> Don't get discouraged - this is a good place to hang out for struts 2
> help!
>
> Steve
>
> On Thu, 04 Feb 2010 07:10:31 -0500, Arulmani V A <arulmani_s@(protected)>
> wrote:
>
>> Hi,
>>
>> Apologies for having posted the same query 5 times - it was purely
>> UNINTENTIONAL. I'm new to this list and when I posted my query for the
>> first
>> time, I got the following reply :
>>
>> Hi. This is the deliver program at bjtu.edu.cn.
>> I'm afraid I wasn't able to deliver your message to the following
>> addresses.
>> This is a permanent error; I've given up. Sorry it didn't work out.
>>
>> 02211071@(protected)
>> quota exceed
>> --- Attachment is a copy of the message.
>>
>> [这是服务器 bjtu.edu.cn 的投递程序返回的提示信息]
>>
>> 到下列地址的信件投递失败,对方服务器无法正常接受或者拒绝接受这封邮件,
>> 这是一个永久性的错误,服务器已经放弃继续投递。
>> 02211071@(protected)
>>
>> 对方服务器返回错误提示:
>> quota exceed
>> --
>> [附件是您所发送信件的原件]
>>
>> Hence thinking that my message was not posted (owing to length), I went
>> about
>> modifying my query and tried posting it repeatedly, each time getting
>> the same
>> reply
>> as above. Finally frustrated that my message is not going through at all
>> and that I get do not spam replies, I unsubscribed from the mailing
>> list..
>>
>> When the message gets posted successfully, why would you send a
>> auto-reply like
>> above which perplexes the new user... If you could fix this, then there
>> won't be confusion to the newbies who post.
>>
>> Regards
>> Arul
>>
>>
>>
>>
>>     The INTERNET now has a personality. YOURS! See your Yahoo!
>> Homepage. http://in.yahoo.com/
>
>
> --
> Stephen Turner
> Senior Programmer/Analyst - SAIS
> MIT IS&T
>
> ---------------------------------------------------------------------
> 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_204968.ezm (zipped)
Hi,

I have:
            <s:textarea label="Request Definition" name="requestDefinition" labelSeparator="" labelposition="left" readonly="true" cols="80" rows="5" />
Sometimes I have a LOT of data to display in the box, other times I have none at all.
I'd like the box to resize based on the amount of data.

My best effort involved getting the length of requestDefinition (using s:set), calculating a decent row count based on that and then trying to set the rows="<%=len%>"
Unfortunately that's against the DTD and struts blows up.

Apart from a long series of ugly s:if elements is there any way to get a dynamic rowcount?

I may resort to use javascript, but that'd be quite a faff (these textareas are in a series of forms generated by an iterator).

Thanks

Jim


Attachment: user_204969.ezm (zipped)
If you're calculating your value with s:set and setting a variable
called, "len" did you try the following -

<s:textarea label="Request Definition"
            name="requestDefinition"
            labelSeparator=""
            labelposition="left"
            readonly="true"
            cols="80"
            rows="%{#len}" />

On Thu, Feb 4, 2010 at 2:27 PM, Jim Talbut <Jim.Talbut@(protected):
> Hi,
>
> I have:
>                    <s:textarea label="Request Definition" name="requestDefinition" labelSeparator="" labelposition="left" readonly="true" cols="80" rows="5" />
> Sometimes I have a LOT of data to display in the box, other times I have none at all.
> I'd like the box to resize based on the amount of data.
>
> My best effort involved getting the length of requestDefinition (using s:set), calculating a decent row count based on that and then trying to set the rows="<%=len%>"
> Unfortunately that's against the DTD and struts blows up.
>
> Apart from a long series of ugly s:if elements is there any way to get a dynamic rowcount?
>
> I may resort to use javascript, but that'd be quite a faff (these textareas are in a series of forms generated by an iterator).
>
> Thanks
>
> Jim
>
>



--
Wes Wannemacher

Head Engineer, WanTii, Inc.
Need Training? Struts, Spring, Maven, Tomcat...
Ask me for a quote!


Attachment: user_204981.ezm (zipped)
That's it, thank you.
          <s:set var="len" value="requestDefinition == null ? 1 : ( requestDefinition.length() > 49 ? requestDefinition.length() / 50 : 1 )" />
          <s:textarea label="Request Definition" name="requestDefinition" labelSeparator="" labelposition="left" readonly="true" cols="80" rows="%{#len}" />

Jim

-----Original Message-----
From: Wes Wannemacher [mailto:wesw@(protected)]
Sent: 04 February 2010 20:08
To: Struts Users Mailing List
Subject: Re: Dynamic values for rows attribute of s:textarea

If you're calculating your value with s:set and setting a variable
called, "len" did you try the following -

<s:textarea label="Request Definition"
            name="requestDefinition"
            labelSeparator=""
            labelposition="left"
            readonly="true"
            cols="80"
            rows="%{#len}" />

On Thu, Feb 4, 2010 at 2:27 PM, Jim Talbut <Jim.Talbut@(protected):
> Hi,
>
> I have:
>                    <s:textarea label="Request Definition" name="requestDefinition" labelSeparator="" labelposition="left" readonly="true" cols="80" rows="5" />
> Sometimes I have a LOT of data to display in the box, other times I have none at all.
> I'd like the box to resize based on the amount of data.
>
> My best effort involved getting the length of requestDefinition (using s:set), calculating a decent row count based on that and then trying to set the rows="<%=len%>"
> Unfortunately that's against the DTD and struts blows up.
>
> Apart from a long series of ugly s:if elements is there any way to get a dynamic rowcount?
>
> I may resort to use javascript, but that'd be quite a faff (these textareas are in a series of forms generated by an iterator).
>
> Thanks
>
> Jim
>
>



--
Wes Wannemacher

Head Engineer, WanTii, Inc.
Need Training? Struts, Spring, Maven, Tomcat...
Ask me for a quote!

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)



Attachment: user_204970.ezm (zipped)

I have an exception interceptor declared in my struts.xml, but no log
messages ever appear in the log category that I specified. In my struts.xml,
I have the following:

<package name="default" extends="struts-default">
 <interceptor-stack name="defaultStack">
   <interceptor-ref name="exception">
       true
       error.unhandled
       WARN
   </interceptor-ref>
 </interceptor-stack>
</package>

In my log4j.xml file, I have the following logger configured:

<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
  <layout class="org.apache.log4j.PatternLayout">
   
  </layout>
</appender>
<logger name="error.unhandled">
  <level value="DEBUG"/>
  <appender-ref ref="CONSOLE" />
</logger>

When I run my application and throw an unhandled exception, the log4j logger
does not print the exception to my appender. As a test, I wrote the
following code into one of my actions:

org.apache.log4j.Logger myLogger =
org.apache.log4j.Logger.getLogger("error.unhandled");
myLogger.warn("Test Message");

The "Test Message" did appear in my log, but I don't understand why struts
will not provide the same behavior through its exception interceptor.

Does anyone have any ideas about what I am doing wrong?
--
Sent from the Struts - User mailing list archive at Nabble.com.



Attachment: user_204971.ezm (zipped)
You interceptor declaration should be like that :
    <interceptor-ref name="exception">
      <param name="logEnabled">true</param>
      <param name="logCategory">com.xxx</param>
      <param name="logLevel">ERROR</param>
    </interceptor-ref>

Cimballi


On Thu, Feb 4, 2010 at 4:14 PM, DavidZaz <dzazeski@(protected):
>
> I have an exception interceptor declared in my struts.xml, but no log
> messages ever appear in the log category that I specified. In my struts.xml,
> I have the following:
>
> <package name="default" extends="struts-default">
>   <interceptor-stack name="defaultStack">
>      <interceptor-ref name="exception">
>            true
>            error.unhandled
>            WARN
>      </interceptor-ref>
>   </interceptor-stack>
> </package>
>
> In my log4j.xml file, I have the following logger configured:
>
> <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
>    <layout class="org.apache.log4j.PatternLayout">
>
>    </layout>
> </appender>
> <logger name="error.unhandled">
>    <level value="DEBUG"/>
>    <appender-ref ref="CONSOLE" />
> </logger>
>
> When I run my application and throw an unhandled exception, the log4j logger
> does not print the exception to my appender. As a test, I wrote the
> following code into one of my actions:
>
> org.apache.log4j.Logger myLogger =
> org.apache.log4j.Logger.getLogger("error.unhandled");
> myLogger.warn("Test Message");
>
> The "Test Message" did appear in my log, but I don't understand why struts
> will not provide the same behavior through its exception interceptor.
>
> Does anyone have any ideas about what I am doing wrong?
> --
> View this message in context: http://old.nabble.com/Problem-with-Exception-Interceptor-tp27459864p27459864.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)
>
>


Attachment: user_204972.ezm (zipped)

I actually had the interceptor-ref configured like that in my source code. It
looks like my code didn't paste from eclipse very well. Sorry about that.

Does the logCategory need to start with com.packageName? Can it start with
error or org or something else?


Cimballi-2 wrote:
>
> You interceptor declaration should be like that :
>      <interceptor-ref name="exception">
>       true
>       com.xxx
>       ERROR
>      </interceptor-ref>
>
> Cimballi
>
>
> On Thu, Feb 4, 2010 at 4:14 PM, DavidZaz <dzazeski@(protected):
>>
>> I have an exception interceptor declared in my struts.xml, but no log
>> messages ever appear in the log category that I specified. In my
>> struts.xml,
>> I have the following:
>>
>> <package name="default" extends="struts-default">
>>   <interceptor-stack name="defaultStack">
>>      <interceptor-ref name="exception">
>>            true
>>            error.unhandled
>>            WARN
>>      </interceptor-ref>
>>   </interceptor-stack>
>> </package>
>>
>> In my log4j.xml file, I have the following logger configured:
>>
>> <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
>>    <layout class="org.apache.log4j.PatternLayout">
>>
>>    </layout>
>> </appender>
>> <logger name="error.unhandled">
>>    <level value="DEBUG"/>
>>    <appender-ref ref="CONSOLE" />
>> </logger>
>>
>> When I run my application and throw an unhandled exception, the log4j
>> logger
>> does not print the exception to my appender. As a test, I wrote the
>> following code into one of my actions:
>>
>> org.apache.log4j.Logger myLogger =
>> org.apache.log4j.Logger.getLogger("error.unhandled");
>> myLogger.warn("Test Message");
>>
>> The "Test Message" did appear in my log, but I don't understand why
>> struts
>> will not provide the same behavior through its exception interceptor.
>>
>> Does anyone have any ideas about what I am doing wrong?
>> --
>> View this message in context:
>> http://old.nabble.com/Problem-with-Exception-Interceptor-tp27459864p27459864.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)
>
>
>

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



Attachment: user_204973.ezm (zipped)
:D Ok, I just noticed than the mailing list engine, or maybe google,
removes the < param > tag...

Cimballi


On Thu, Feb 4, 2010 at 4:40 PM, DavidZaz <dzazeski@(protected):
>
> I actually had the interceptor-ref configured like that in my source code. It
> looks like my code didn't paste from eclipse very well. Sorry about that.
>
> Does the logCategory need to start with com.packageName? Can it start with
> error or org or something else?
>
>
> Cimballi-2 wrote:
>>
>> You interceptor declaration should be like that :
>>         <interceptor-ref name="exception">
>>           true
>>           com.xxx
>>           ERROR
>>         </interceptor-ref>
>>
>> Cimballi
>>
>>
>> On Thu, Feb 4, 2010 at 4:14 PM, DavidZaz <dzazeski@(protected):
>>>
>>> I have an exception interceptor declared in my struts.xml, but no log
>>> messages ever appear in the log category that I specified. In my
>>> struts.xml,
>>> I have the following:
>>>
>>> <package name="default" extends="struts-default">
>>>   <interceptor-stack name="defaultStack">
>>>      <interceptor-ref name="exception">
>>>            true
>>>            error.unhandled
>>>            WARN
>>>      </interceptor-ref>
>>>   </interceptor-stack>
>>> </package>
>>>
>>> In my log4j.xml file, I have the following logger configured:
>>>
>>> <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
>>>    <layout class="org.apache.log4j.PatternLayout">
>>>
>>>    </layout>
>>> </appender>
>>> <logger name="error.unhandled">
>>>    <level value="DEBUG"/>
>>>    <appender-ref ref="CONSOLE" />
>>> </logger>
>>>
>>> When I run my application and throw an unhandled exception, the log4j
>>> logger
>>> does not print the exception to my appender. As a test, I wrote the
>>> following code into one of my actions:
>>>
>>> org.apache.log4j.Logger myLogger =
>>> org.apache.log4j.Logger.getLogger("error.unhandled");
>>> myLogger.warn("Test Message");
>>>
>>> The "Test Message" did appear in my log, but I don't understand why
>>> struts
>>> will not provide the same behavior through its exception interceptor.
>>>
>>> Does anyone have any ideas about what I am doing wrong?
>>> --
>>> View this message in context:
>>> http://old.nabble.com/Problem-with-Exception-Interceptor-tp27459864p27459864.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)
>>
>>
>>
>
> --
> View this message in context: http://old.nabble.com/Problem-with-Exception-Interceptor-tp27459864p27460190.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)
>
>


Attachment: user_204974.ezm (zipped)

As an update, I changed the level in my struts.xml to FATAL and the logging
started working. This behavior confuses me since I don't have any loggers
set higher than DEBUG/INFO in my log4j.xml file. However, this does lead me
to believe that log4j and not struts is the problem.


Cimballi-2 wrote:
>
> :D Ok, I just noticed than the mailing list engine, or maybe google,
> removes the < param > tag...
>
> Cimballi
>
>
> On Thu, Feb 4, 2010 at 4:40 PM, DavidZaz <dzazeski@(protected):
>>
>> I actually had the interceptor-ref configured like that in my source
>> code. It
>> looks like my code didn't paste from eclipse very well. Sorry about that.
>>
>> Does the logCategory need to start with com.packageName? Can it start
>> with
>> error or org or something else?
>>
>>
>> Cimballi-2 wrote:
>>>
>>> You interceptor declaration should be like that :
>>>         <interceptor-ref name="exception">
>>>           true
>>>           com.xxx
>>>           ERROR
>>>         </interceptor-ref>
>>>
>>> Cimballi
>>>
>>>
>>> On Thu, Feb 4, 2010 at 4:14 PM, DavidZaz <dzazeski@(protected):
>>>>
>>>> I have an exception interceptor declared in my struts.xml, but no log
>>>> messages ever appear in the log category that I specified. In my
>>>> struts.xml,
>>>> I have the following:
>>>>
>>>> <package name="default" extends="struts-default">
>>>>   <interceptor-stack name="defaultStack">
>>>>      <interceptor-ref name="exception">
>>>>            true
>>>>            error.unhandled
>>>>            WARN
>>>>      </interceptor-ref>
>>>>   </interceptor-stack>
>>>> </package>
>>>>
>>>> In my log4j.xml file, I have the following logger configured:
>>>>
>>>> <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
>>>>    <layout class="org.apache.log4j.PatternLayout">
>>>>
>>>>    </layout>
>>>> </appender>
>>>> <logger name="error.unhandled">
>>>>    <level value="DEBUG"/>
>>>>    <appender-ref ref="CONSOLE" />
>>>> </logger>
>>>>
>>>> When I run my application and throw an unhandled exception, the log4j
>>>> logger
>>>> does not print the exception to my appender. As a test, I wrote the
>>>> following code into one of my actions:
>>>>
>>>> org.apache.log4j.Logger myLogger =
>>>> org.apache.log4j.Logger.getLogger("error.unhandled");
>>>> myLogger.warn("Test Message");
>>>>
>>>> The "Test Message" did appear in my log, but I don't understand why
>>>> struts
>>>> will not provide the same behavior through its exception interceptor.
>>>>
>>>> Does anyone have any ideas about what I am doing wrong?
>>>> --
>>>> View this message in context:
>>>> http://old.nabble.com/Problem-with-Exception-Interceptor-tp27459864p27459864.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)
>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://old.nabble.com/Problem-with-Exception-Interceptor-tp27459864p27460190.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)
>
>
>

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



Attachment: user_204976.ezm (zipped)
Hum, it's strange because in fact at fatal level you should only have
fatal log messages...


On Thu, Feb 4, 2010 at 5:33 PM, DavidZaz <dzazeski@(protected):
>
> As an update, I changed the level in my struts.xml to FATAL and the logging
> started working. This behavior confuses me since I don't have any loggers
> set higher than DEBUG/INFO in my log4j.xml file. However, this does lead me
> to believe that log4j and not struts is the problem.


Attachment: user_204986.ezm (zipped)
It's Nabble that removes the < param > tags

On Thu, Feb 4, 2010 at 5:10 PM, Cimballi <cimballi.cimballi@(protected):
> :D Ok, I just noticed than the mailing list engine, or maybe google,
> removes the < param > tag...
>
> Cimballi
>

>
>


Attachment: user_204975.ezm (zipped)
Jake,
The sx: tags are based on the .4 dojo tags. I would just use the
dojo tags themselves. The dojo plugin is also being depricated. The
new dojo tags are at 1.4. I solved a similiar height problem on dojo
1.4 by doing the following.


<style type="text/css">
   body, html { height: 99%;overflow:hidden;
margin-bottom:0;padding-bottom:0;}
</style>
</head>
<body class="tundra">
<div id="tabbedPaneContainer" style="height:100%;">
<div id="tabbedPane" dojoType="dijit.layout.TabContainer"
preload="false" style="width:100%;height:100%">

Steve



On Thu, Feb 4, 2010 at 10:25 AM, Jake Vang <vangjake@(protected):
> i'm using the <sx:tabbedpanel/> in the struts2-dojo-plugin. i have a
> few questions on controlling the display/rendering of this component.
>
> 1. can i make the <sx:tabbedpanel/> expand 100% in height? i've tried
> several things: a) place the <sx:tabbedpanel/> inside a <table> and
> set the height of the table to 100%, b) set the <body/> height to
> 100%, c) set the <sx:tabbedpanel/> height to 100% (with combinations
> of a and/or b). none of these seem to work unless i explicitly set the
> height in px (i.e. <sx:tabbedpanel cssStyle="width: 100%; height:
> 400px;"/>), but then this doesn't expand 100% in height.
>
> 2. how can i control how the actual tabs inside <sx:tabbedpanel/> gets
> displayed (the <sx:div/>)? from looking at the TLD and generated HTML,
> it seems the rendering is controlled through CSS. however, at which
> level, <sx:tabbedpanel/> or <sx:div/>, do i set the CSS? my problem is
> that i don't particularly like the rounded, blue tab display. i want
> to change it to something more linear/rectangular. when i look at the
> HTML generated, there is a link to
> /<my-context>/struts/TabbedPanel.css, but looking at this CSS file, i
> just see something defined for, .strutsDisabledTab div span.
>
> any help is appreciated. thanks.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>


Attachment: user_204985.ezm (zipped)
stephen,

thanks. i'm looking into the dojo js framework right now. i've
downloaded the files, but they are almost 10 MB? !!!! i know you can
reference the JS on other servers too, but i'd like local copies for
development testing. i didn't really want to use dojo directly because
i didn't want to do programming (Java or JavaScript) right on the
page.

On Thu, Feb 4, 2010 at 6:10 PM, Stephen Ince <stephenpince@(protected):
> Jake,
>  The sx: tags are based on the .4 dojo tags. I would just use the
> dojo tags themselves. The dojo plugin is also being depricated. The
> new dojo tags are at 1.4.  I solved a similiar height problem on dojo
> 1.4 by doing the following.
>
>
>  <style type="text/css">
>      body, html { height: 99%;overflow:hidden;
> margin-bottom:0;padding-bottom:0;}
>  </style>
> </head>
> <body class="tundra">
> <div id="tabbedPaneContainer" style="height:100%;">
> <div id="tabbedPane" dojoType="dijit.layout.TabContainer"
> preload="false" style="width:100%;height:100%">
>
> Steve
>
>
>
> On Thu, Feb 4, 2010 at 10:25 AM, Jake Vang <vangjake@(protected):
>> i'm using the <sx:tabbedpanel/> in the struts2-dojo-plugin. i have a
>> few questions on controlling the display/rendering of this component.
>>
>> 1. can i make the <sx:tabbedpanel/> expand 100% in height? i've tried
>> several things: a) place the <sx:tabbedpanel/> inside a <table> and
>> set the height of the table to 100%, b) set the <body/> height to
>> 100%, c) set the <sx:tabbedpanel/> height to 100% (with combinations
>> of a and/or b). none of these seem to work unless i explicitly set the
>> height in px (i.e. <sx:tabbedpanel cssStyle="width: 100%; height:
>> 400px;"/>), but then this doesn't expand 100% in height.
>>
>> 2. how can i control how the actual tabs inside <sx:tabbedpanel/> gets
>> displayed (the <sx:div/>)? from looking at the TLD and generated HTML,
>> it seems the rendering is controlled through CSS. however, at which
>> level, <sx:tabbedpanel/> or <sx:div/>, do i set the CSS? my problem is
>> that i don't particularly like the rounded, blue tab display. i want
>> to change it to something more linear/rectangular. when i look at the
>> HTML generated, there is a link to
>> /<my-context>/struts/TabbedPanel.css, but looking at this CSS file, i
>> just see something defined for, .strutsDisabledTab div span.
>>
>> any help is appreciated. thanks.
>>
>> ---------------------------------------------------------------------
>> 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_204987.ezm (zipped)
Jake,
I actually ran into a lot problems accessing dojo from other
servers. They all went away when I installed it locally. I think you
get some sandbox security issues with some of the packages.

cheers,
Steve

On Fri, Feb 5, 2010 at 8:44 AM, Jake Vang <vangjake@(protected):
> stephen,
>
> thanks. i'm looking into the dojo js framework right now. i've
> downloaded the files, but they are almost 10 MB? !!!! i know you can
> reference the JS on other servers too, but i'd like local copies for
> development testing. i didn't really want to use dojo directly because
> i didn't want to do programming (Java or JavaScript) right on the
> page.
>
> On Thu, Feb 4, 2010 at 6:10 PM, Stephen Ince <stephenpince@(protected):
>> Jake,
>>  The sx: tags are based on the .4 dojo tags. I would just use the
>> dojo tags themselves. The dojo plugin is also being depricated. The
>> new dojo tags are at 1.4.  I solved a similiar height problem on dojo
>> 1.4 by doing the following.
>>
>>
>>  <style type="text/css">
>>      body, html { height: 99%;overflow:hidden;
>> margin-bottom:0;padding-bottom:0;}
>>  </style>
>> </head>
>> <body class="tundra">
>> <div id="tabbedPaneContainer" style="height:100%;">
>> <div id="tabbedPane" dojoType="dijit.layout.TabContainer"
>> preload="false" style="width:100%;height:100%">
>>
>> Steve
>>
>>
>>
>> On Thu, Feb 4, 2010 at 10:25 AM, Jake Vang <vangjake@(protected):
>>> i'm using the <sx:tabbedpanel/> in the struts2-dojo-plugin. i have a
>>> few questions on controlling the display/rendering of this component.
>>>
>>> 1. can i make the <sx:tabbedpanel/> expand 100% in height? i've tried
>>> several things: a) place the <sx:tabbedpanel/> inside a <table> and
>>> set the height of the table to 100%, b) set the <body/> height to
>>> 100%, c) set the <sx:tabbedpanel/> height to 100% (with combinations
>>> of a and/or b). none of these seem to work unless i explicitly set the
>>> height in px (i.e. <sx:tabbedpanel cssStyle="width: 100%; height:
>>> 400px;"/>), but then this doesn't expand 100% in height.
>>>
>>> 2. how can i control how the actual tabs inside <sx:tabbedpanel/> gets
>>> displayed (the <sx:div/>)? from looking at the TLD and generated HTML,
>>> it seems the rendering is controlled through CSS. however, at which
>>> level, <sx:tabbedpanel/> or <sx:div/>, do i set the CSS? my problem is
>>> that i don't particularly like the rounded, blue tab display. i want
>>> to change it to something more linear/rectangular. when i look at the
>>> HTML generated, there is a link to
>>> /<my-context>/struts/TabbedPanel.css, but looking at this CSS file, i
>>> just see something defined for, .strutsDisabledTab div span.
>>>
>>> any help is appreciated. thanks.
>>>
>>> ---------------------------------------------------------------------
>>> 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_204988.ezm (zipped)
Steve, i know this is a dojo question, but while we're on it, i don't
think i need all those .js files. i think the only ones i need are
referenced by dojo.require(..) right? thanks for the heads up (i was
worried about those remote servers going away too).

On Fri, Feb 5, 2010 at 9:40 AM, Stephen Ince <stephenpince@(protected):
> Jake,
>  I actually ran into a lot problems accessing dojo from other
> servers. They all went away when I installed it locally. I think you
> get some sandbox security issues with some of the packages.
>
> cheers,
> Steve
>
> On Fri, Feb 5, 2010 at 8:44 AM, Jake Vang <vangjake@(protected):
>> stephen,
>>
>> thanks. i'm looking into the dojo js framework right now. i've
>> downloaded the files, but they are almost 10 MB? !!!! i know you can
>> reference the JS on other servers too, but i'd like local copies for
>> development testing. i didn't really want to use dojo directly because
>> i didn't want to do programming (Java or JavaScript) right on the
>> page.
>>
>> On Thu, Feb 4, 2010 at 6:10 PM, Stephen Ince <stephenpince@(protected):
>>> Jake,
>>>  The sx: tags are based on the .4 dojo tags. I would just use the
>>> dojo tags themselves. The dojo plugin is also being depricated. The
>>> new dojo tags are at 1.4.  I solved a similiar height problem on dojo
>>> 1.4 by doing the following.
>>>
>>>
>>>  <style type="text/css">
>>>      body, html { height: 99%;overflow:hidden;
>>> margin-bottom:0;padding-bottom:0;}
>>>  </style>
>>> </head>
>>> <body class="tundra">
>>> <div id="tabbedPaneContainer" style="height:100%;">
>>> <div id="tabbedPane" dojoType="dijit.layout.TabContainer"
>>> preload="false" style="width:100%;height:100%">
>>>
>>> Steve
>>>
>>>
>>>
>>> On Thu, Feb 4, 2010 at 10:25 AM, Jake Vang <vangjake@(protected):
>>>> i'm using the <sx:tabbedpanel/> in the struts2-dojo-plugin. i have a
>>>> few questions on controlling the display/rendering of this component.
>>>>
>>>> 1. can i make the <sx:tabbedpanel/> expand 100% in height? i've tried
>>>> several things: a) place the <sx:tabbedpanel/> inside a <table> and
>>>> set the height of the table to 100%, b) set the <body/> height to
>>>> 100%, c) set the <sx:tabbedpanel/> height to 100% (with combinations
>>>> of a and/or b). none of these seem to work unless i explicitly set the
>>>> height in px (i.e. <sx:tabbedpanel cssStyle="width: 100%; height:
>>>> 400px;"/>), but then this doesn't expand 100% in height.
>>>>
>>>> 2. how can i control how the actual tabs inside <sx:tabbedpanel/> gets
>>>> displayed (the <sx:div/>)? from looking at the TLD and generated HTML,
>>>> it seems the rendering is controlled through CSS. however, at which
>>>> level, <sx:tabbedpanel/> or <sx:div/>, do i set the CSS? my problem is
>>>> that i don't particularly like the rounded, blue tab display. i want
>>>> to change it to something more linear/rectangular. when i look at the
>>>> HTML generated, there is a link to
>>>> /<my-context>/struts/TabbedPanel.css, but looking at this CSS file, i
>>>> just see something defined for, .strutsDisabledTab div span.
>>>>
>>>> any help is appreciated. thanks.
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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)
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>


Attachment: user_204991.ezm (zipped)
I haven't gone around to trimming the fat yet.
You also need the css files.

On Fri, Feb 5, 2010 at 10:43 AM, Jake Vang <vangjake@(protected):
> Steve, i know this is a dojo question, but while we're on it, i don't
> think i need all those .js files. i think the only ones i need are
> referenced by dojo.require(..) right? thanks for the heads up (i was
> worried about those remote servers going away too).
>
> On Fri, Feb 5, 2010 at 9:40 AM, Stephen Ince <stephenpince@(protected):
>> Jake,
>>  I actually ran into a lot problems accessing dojo from other
>> servers. They all went away when I installed it locally. I think you
>> get some sandbox security issues with some of the packages.
>>
>> cheers,
>> Steve
>>
>> On Fri, Feb 5, 2010 at 8:44 AM, Jake Vang <vangjake@(protected):
>>> stephen,
>>>
>>> thanks. i'm looking into the dojo js framework right now. i've
>>> downloaded the files, but they are almost 10 MB? !!!! i know you can
>>> reference the JS on other servers too, but i'd like local copies for
>>> development testing. i didn't really want to use dojo directly because
>>> i didn't want to do programming (Java or JavaScript) right on the
>>> page.
>>>
>>> On Thu, Feb 4, 2010 at 6:10 PM, Stephen Ince <stephenpince@(protected):
>>>> Jake,
>>>>  The sx: tags are based on the .4 dojo tags. I would just use the
>>>> dojo tags themselves. The dojo plugin is also being depricated. The
>>>> new dojo tags are at 1.4.  I solved a similiar height problem on dojo
>>>> 1.4 by doing the following.
>>>>
>>>>
>>>>  <style type="text/css">
>>>>      body, html { height: 99%;overflow:hidden;
>>>> margin-bottom:0;padding-bottom:0;}
>>>>  </style>
>>>> </head>
>>>> <body class="tundra">
>>>> <div id="tabbedPaneContainer" style="height:100%;">
>>>> <div id="tabbedPane" dojoType="dijit.layout.TabContainer"
>>>> preload="false" style="width:100%;height:100%">
>>>>
>>>> Steve
>>>>
>>>>
>>>>
>>>> On Thu, Feb 4, 2010 at 10:25 AM, Jake Vang <vangjake@(protected):
>>>>> i'm using the <sx:tabbedpanel/> in the struts2-dojo-plugin. i have a
>>>>> few questions on controlling the display/rendering of this component.
>>>>>
>>>>> 1. can i make the <sx:tabbedpanel/> expand 100% in height? i've tried
>>>>> several things: a) place the <sx:tabbedpanel/> inside a <table> and
>>>>> set the height of the table to 100%, b) set the <body/> height to
>>>>> 100%, c) set the <sx:tabbedpanel/> height to 100% (with combinations
>>>>> of a and/or b). none of these seem to work unless i explicitly set the
>>>>> height in px (i.e. <sx:tabbedpanel cssStyle="width: 100%; height:
>>>>> 400px;"/>), but then this doesn't expand 100% in height.
>>>>>
>>>>> 2. how can i control how the actual tabs inside <sx:tabbedpanel/> gets
>>>>> displayed (the <sx:div/>)? from looking at the TLD and generated HTML,
>>>>> it seems the rendering is controlled through CSS. however, at which
>>>>> level, <sx:tabbedpanel/> or <sx:div/>, do i set the CSS? my problem is
>>>>> that i don't particularly like the rounded, blue tab display. i want
>>>>> to change it to something more linear/rectangular. when i look at the
>>>>> HTML generated, there is a link to
>>>>> /<my-context>/struts/TabbedPanel.css, but looking at this CSS file, i
>>>>> just see something defined for, .strutsDisabledTab div span.
>>>>>
>>>>> any help is appreciated. thanks.
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> 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)
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> 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_204977.ezm (zipped)
Okay. In struts 1 they have an indexedListProperty attribute.
Question.
 Does struts2 validation work for indexed lists? . I looked at the
dtd and could not find it. I tried the following but it failed.

  <field name="name" indexedListProperty="workspaces" >
    <field-validator type="required">

Is it possible to use the struts1 validation frame works with struts2.

Steve


On Thu, Feb 4, 2010 at 7:45 AM, Stephen Ince <stephenpince@(protected):
>  I am using struts 2 and I am trying to use the validation framework. I
> am having difficulty trying to validate a list.
>
> e.g
> workspaces[0].name
> workspaces[1].name
> workspaces[2].name
> workspaces[3].name
> workspaces[4].name
> workspaces[5].name
>
> I would like to require name.
> I have tried the following but it does not seem to work.
>
>   <field name="workspaces.name">
>       <field-validator type="required">
>
>   <field name="workspaces[].name">
>       <field-validator type="required">
>
>
> Any help would be appreciated.
>
> Steve
>


Attachment: user_204978.ezm (zipped)
Okay. It looks what I want is a collection validator but it does not
seem to work with struts2.
Question.
 Does anyone know if the Xwork collection validator is bundled with
struts2. I tried the following but it failed.

  <field name="workspaces" >
    <field-validator type="collection">
        <param name="property">workspaces.name</param>

Steve

On Thu, Feb 4, 2010 at 6:34 PM, Stephen Ince <stephenpince@(protected):
> Okay. In struts 1 they have an indexedListProperty attribute.
> Question.
>   Does struts2 validation work for indexed lists? . I looked at the
> dtd and could not find it. I tried the following but it failed.
>
>    <field name="name" indexedListProperty="workspaces" >
>        <field-validator type="required">
>
> Is it possible to use the struts1 validation frame works with struts2.
>
> Steve
>
>
> On Thu, Feb 4, 2010 at 7:45 AM, Stephen Ince <stephenpince@(protected):
>>  I am using struts 2 and I am trying to use the validation framework. I
>> am having difficulty trying to validate a list.
>>
>> e.g
>> workspaces[0].name
>> workspaces[1].name
>> workspaces[2].name
>> workspaces[3].name
>> workspaces[4].name
>> workspaces[5].name
>>
>> I would like to require name.
>> I have tried the following but it does not seem to work.
>>
>>   <field name="workspaces.name">
>>       <field-validator type="required">
>>
>>   <field name="workspaces[].name">
>>       <field-validator type="required">
>>
>>
>> Any help would be appreciated.
>>
>> Steve
>>
>


Attachment: user_204979.ezm (zipped)
Okay.
It looks like struts2 does not have collection validation.
Does anyone know how to add it manually from Xworks?
This is not posted on the struts2 site at all. It should be posted to a FAQ.

This is my workaround?
 <validator type="expression">
    <param name="expression">
    workspaces.{#this.name.length() &gt; 0}.{? #this == false
}.size() &lt;= 0
    </param>
    <message key="workspace.name.required" />
 </validator>

Steve

On Thu, Feb 4, 2010 at 8:19 PM, Stephen Ince <stephenpince@(protected):
> Okay. It looks what I want is a collection validator but it does not
> seem to work with struts2.
> Question.
>   Does anyone know if the Xwork collection validator is bundled with
> struts2.  I tried the following but it failed.
>
>    <field name="workspaces" >
>        <field-validator type="collection">
>             <param name="property">workspaces.name</param>
>
> Steve
>
> On Thu, Feb 4, 2010 at 6:34 PM, Stephen Ince <stephenpince@(protected):
>> Okay. In struts 1 they have an indexedListProperty attribute.
>> Question.
>>   Does struts2 validation work for indexed lists? . I looked at the
>> dtd and could not find it. I tried the following but it failed.
>>
>>    <field name="name" indexedListProperty="workspaces" >
>>        <field-validator type="required">
>>
>> Is it possible to use the struts1 validation frame works with struts2.
>>
>> Steve
>>
>>
>> On Thu, Feb 4, 2010 at 7:45 AM, Stephen Ince <stephenpince@(protected):
>>>  I am using struts 2 and I am trying to use the validation framework. I
>>> am having difficulty trying to validate a list.
>>>
>>> e.g
>>> workspaces[0].name
>>> workspaces[1].name
>>> workspaces[2].name
>>> workspaces[3].name
>>> workspaces[4].name
>>> workspaces[5].name
>>>
>>> I would like to require name.
>>> I have tried the following but it does not seem to work.
>>>
>>>   <field name="workspaces.name">
>>>       <field-validator type="required">
>>>
>>>   <field name="workspaces[].name">
>>>       <field-validator type="required">
>>>
>>>
>>> Any help would be appreciated.
>>>
>>> Steve
>>>
>>
>


Attachment: user_204980.ezm (zipped)
Looks like Google has fixed the OGNL issue however this is the new issue I
saw.

Please help.

On Thu, Feb 4, 2010 at 7:14 PM, Saeed Iqbal <saeedcs@(protected):

> Any ideas why my application is throwing this error on Google App Engine
>
> Uncaught exception from servlet
> java.lang.NullPointerException
>  at org.apache.struts2.dispatcher.mapper.DefaultActionMapper.getUriFromActionMapping (DefaultActionMapper.java:533)
>
>  at org.apache.struts2.dispatcher.ServletActionRedirectResult.execute (ServletActionRedirectResult.java:172)
>  at com.opensymphony.xwork2.DefaultActionInvocation.executeResult (DefaultActionInvocation.java:362)
>  at com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:266)
>
>  at
>
>
>
> --
> Saeed Iqbal
> Independant Consultant
> J2EE - Application Architect / Developer
>
>


--
Saeed Iqbal
Independant Consultant
J2EE - Application Architect / Developer

Attachment: user_204982.ezm (zipped)
2010/2/5 Saeed Iqbal <saeedcs@(protected)>:
> Looks like Google has fixed the OGNL issue however this is the new issue I
> saw.

Take a look here
http://code.google.com/p/struts2-jquery/source/browse/#svn/showcase

The showcase is here
http://struts2-jquery.appspot.com/home.action


Regards
--
Łukasz
http://www.lenart.org.pl/
Kapituła Javarsovia 2010
http://javarsovia.pl


Attachment: user_204983.ezm (zipped)
Thanks will do.

On Friday, February 5, 2010, Lukasz Lenart <lukasz.lenart@(protected):
> 2010/2/5 Saeed Iqbal <saeedcs@(protected)>:
>> Looks like Google has fixed the OGNL issue however this is the new issue I
>> saw.
>
> Take a look here
> http://code.google.com/p/struts2-jquery/source/browse/#svn/showcase
>
> The showcase is here
> http://struts2-jquery.appspot.com/home.action
>
>
> Regards
> --
> Łukasz
> http://www.lenart.org.pl/
> Kapituła Javarsovia 2010
> http://javarsovia.pl
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

--
Saeed Iqbal
Independant Consultant
J2EE - Application Architect / Developer


Attachment: user_204984.ezm (zipped)
I kind of didnt find a project i could deploy to appengine there. I think
regular servlets is the way to go for me.

On Fri, Feb 5, 2010 at 2:22 PM, Saeed Iqbal <saeedcs@(protected):

> Thanks will do.
>
> On Friday, February 5, 2010, Lukasz Lenart <lukasz.lenart@(protected)>
> wrote:
> > 2010/2/5 Saeed Iqbal <saeedcs@(protected)>:
> >> Looks like Google has fixed the OGNL issue however this is the new issue
> I
> >> saw.
> >
> > Take a look here
> > http://code.google.com/p/struts2-jquery/source/browse/#svn/showcase
> >
> > The showcase is here
> > http://struts2-jquery.appspot.com/home.action
> >
> >
> > Regards
> > --
> > Łukasz
> > http://www.lenart.org.pl/
> > Kapituła Javarsovia 2010
> > http://javarsovia.pl
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > For additional commands, e-mail: user-help@(protected)
> >
> >
>
> --
> Saeed Iqbal
> Independant Consultant
> J2EE - Application Architect / Developer
>



--
Saeed Iqbal
Independant Consultant
J2EE - Application Architect / Developer

Attachment: user_204989.ezm (zipped)
Is there any issues that I should know about if I take the Struts 1.x
framework and run it with a servlet 2.5 specification, instead of the
2.3 servlet spec? What are the pitfalls?



Ein Unternehmen der mediantis AG (Hauptsitz)
Hauptstr. 2, D-82327 Tutzing
Aufsichtsrat (Vorsitzender): Richard K. Frhr. v. Rheinbaben
Vorstand: Rolf R. Frhr. v. Rheinbaben
Register: München HRB 121774

Attachment: user_204990.ezm (zipped)

Since no one seems to have posted an answer anywhere (and this exact same
problem stumped me for a while), I thought I'd share what worked for me.

I loaded the jsonplugin code and figured out what I needed to do to use the
"includeProperties" param to only serialize a certain property of my list.
It seems that you also need to include the parent objects in your
includeProperties parameters.

Using your Map below, if you only wanted to serialize "myProperty" member of
your map, your includeProperties would look something like:


productCategoriesMap,
productCategoriesMap\[\d+\],     <--- in this case, the index is an
integer, but yours might be a string
productCategoriesMap\[\d+\].myProperty


While stepping through the code, I found that as the jsonplugin is walking
the object hierarchy, it starts at the parent, which is
"productCategoriesMap." It will then look to see if it should include this
property -- unless you have a rule in there to allow this, it won't continue
walking productCategoriesMap to get to "myProperty," which is why when you
only specify a rule for productCategoriesMap\[\d+\].myProperty, it
serializes nothing.

Hope this helps!


Gadbury wrote:
>
> The first regex returns nothing and the second everything (as before). My
> regex is pretty poor but if I ignore regex, what would the syntax be for
> accessing the property of a bean is a list in the map. i.e. given the
> map:
>
> private Map<String, List<Category>> productCategoriesMap
>
> Would it be:
>
> myMap['myKey'].beanProperty  
> myMap.myKey.beanProperty    
>
> or both, I seem to recall?
>
> Is it definitely possible to filter out properties of beans within a map
> using 0.33 / 0.34 (I've tried both) of the json plugin?
>
> Sorry to go on aout this - it's been driving me crazy all day :)
>
>
> Musachy Barroso wrote:
>>
>> Java regexes are greedy by default if I dont remember wrong, so you
>> should try something like:
>>
>> productCategoriesMap[.*?]\.name
>>
>> or
>>
>> productCategoriesMap\..*?\.name
>>
>> musachy
>>
>> On Tue, Sep 1, 2009 at 6:15 AM, Gadbury<gadbury@(protected):
>>>
>>> Hi,
>>>
>>> Sorry to jump a (dead?) thread but it's relevant to what I am trying to
>>> do
>>> and it made sense to put it in the same thread.
>>>
>>> I have the following HashMap:
>>>
>>> private Map<String, List<Category>> productCategoriesMap;
>>>
>>> in my includeProperties, productCategoriesMap.* populates the json with
>>> every property of the Category bean.  For example:
>>>
>>>        {
>>>        "productCategoriesMap":{"ac80e9b6-29e6-4f00-9410-1a18a9dfd317":[{
>>>                "UUID":"4bd497a1-bd1b-417b-8d62-e1273fa5e648",
>>>                "name":"Test Sub-Category EDIT",
>>>              
>>>  "parentCategoryUUID":"65750a38-d596-48d7-a215-56bcb21d8067",
>>>              
>>>  "providerRepositoryUUID":"69011624-112a-457b-a222-edd3b543e585"
>>>                },{
>>>                "UUID":"65750a38-d596-48d7-a215-56bcb21d8067",
>>>                "name":"Category 4",
>>>              
>>>  "parentCategoryUUID":"98e4b067-5b6b-4777-a28a-443a77209948",
>>>              
>>>  "providerRepositoryUUID":"69011624-112a-457b-a222-edd3b543e585"
>>>                }]
>>>        }
>>>
>>> However, I would like to only include UUID and name, as an example.  I
>>> have
>>> tried:
>>>
>>> productCategoriesMap.*.name
>>> productCategoriesMap.*.*
>>> productCategoriesMap[*].name
>>> productCategoriesMap.*\.name
>>> productCategoriesMap\.*\.name
>>>
>>> How do I use includeProperties to filter properties of beans within a
>>> map?
>>> --
>>> View this message in context:
>>> http://www.nabble.com/JSON-plugin-ignoring-includeProperties-parameter-tp23660860p25240134.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)
>>>
>>>
>>
>>
>>
>> --
>> "Hey you! Would you help me to carry the stone?" Pink Floyd
>>
>> ---------------------------------------------------------------------
>> 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.


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