Java Mailing List Archive

http://www.gg3721.com/

Home » Struts Users Mailing List »

user Digest 17 Apr 2008 13:05:18 -0000 Issue 7984

user-digest-help

2008-04-17


Author LoginPost Reply

user Digest 17 Apr 2008 13:05:18 -0000 Issue 7984

Topics (messages 185517 through 185536):

Re: ParameterAware Arrays
 185517 by: Gabriel Belingueres

Ajax components inside a tabbed panel
 185518 by: Márcio Gurgel

Re: Overriding subset of interceptor params
 185519 by: Gabriel Belingueres
 185522 by: Jon Wilmoth

Re: Is it possible to make a pop up window using Struts?
 185520 by: ryan webb

datetimepicker doesn't show up
 185521 by: tristan_colson
 185526 by: Jeromy Evans

Vote for Java runtime for Google App Engine
 185523 by: Van Riper

Re: ServletRedirectActionResult - is there a way to set parameters?
 185524 by: Alex Shneyderman

Re: How do you format a date and use it as a param value in a s:url
 185525 by: David Harland
 185529 by: Jeromy Evans

Re: Trouble executing scripts in returned ajax content
 185527 by: Jeromy Evans
 185536 by: Jukka Välimaa

exception in url tag.
 185528 by: zubair syed

logout when using j_security_check
 185530 by: temp temp
 185531 by: Rishi Deepak
 185533 by: Antonio Petrelli

How to reflect table row data in the text boxes
 185532 by: Rishi Deepak

Re: sent value to freemarker template
 185534 by: zer0

Re: Problem with Select tag
 185535 by: Milan Milanovic

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_185517.ezm (zipped)
You can of course set up instance variables in your action class with
identical names as the parameters you intend to use.

2008/4/16, Dustin S. <icedout3e@(protected)>:
> I noticed the the map for setParameters is <String, String[]>. If I
> intend to always only use [0], is there any easy way to accomplish
> this without having to do [0] everytime I get() a parameter from the
> map? I noticed there is SingleValueMap in webwork for this purpose.
> Does something exist like this in Struts 2 or possibly is there any
> easier way to get params from a url (page?parm1=value1&param2=value2)
> that I am not seeing?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment: user_185518.ezm (zipped)
I'm having lots of problems with components inside tabbedPanels...

For example:
This example from show case works outside a tabbed panel:

2. Attach to "onmouseover", and "onclick" event on Area below and update
content of Div1, highlight targets with green color
  <sx:bind id="ex2" href="%{#urlAbrirDadosGerais}" sources="div2"
targets="div1" events="onmouseover,onclick" highlightColor="green"/>
  <div id="div2" style="width: 300px; height: 50px; border: 1px solid
black">
    Mouse Over or Click Here!
  </div>

When its inside a div from tabbedpanel just doesn't work.

Does anyone can help me?
I this a issue?

Regards,

Márcio Gurgel

Attachment: user_185519.ezm (zipped)
Seems OK to me (according to the current documentation.)

I've only overriden interceptor parameters in the declaration of a new
stack, and it is working OK:

   <interceptor-stack name="secureStack">
    <interceptor-ref name="auth" />
    <interceptor-ref name="defaultStack">
      <param name="exception.logEnabled">true</param>
      <param name="exception.logLevel">ERROR</param>
      <param name="exception.logCategory">my.package.here</param>
    </interceptor-ref>
   </interceptor-stack>

Try to create a new stack for your action (for testing pourposes only)
to see if the results are the same. If they are, post your struts.xml
file here.

2008/4/16, Jon Wilmoth <jonwilmoth@(protected)>:
> I'm trying to override one of three interceptor parameters in an action specific config using method #2 described in
> http://struts.apache.org/2.0.11.1/docs/interceptors.html#Interceptors-InterceptorParameterOverriding. Unfortunately the other two parameters that I'm not overriding are not being taken from the default stack definition and are ending up as null on the interceptor. Before I open a Jira bug (or enhancement request), I thought I'd make sure a) this isn't user error b) the expected behavior is "my" expected behavior (i.e. bug vs. enhancement). Below is a sample action config showing what I'm attempting...
>
> <package name="packageA"...>
>   <interceptors>
>     <interceptor name="myInterceptor" class="..."/>
>     <interceptor-stack name="myStack">
>        <interceptor-ref name="defaultStack"/>
>        <interceptor-ref name="myInterceptor">
>           <param name="paramA">defaultValueA</param>
>           <param name="paramB">defaultValueB</param>
>           <param name="paramC">defaultValueC</param>
>        </interceptor-ref>
>     </interceptor-stack>
> </package>
>
> With the following action config, the "myInterceptor" interceptor's paramA & paramB are null and not "defaultValueA" and "defaultValueB" as expected/desired.
>
> <package name="packageB" extends="packageA"...>
>   <action name="myAction" class="myActionClass">
>     <interceptor-ref name="myStack">
>        <param name="myInterceptor.paramC">actionSpecificValue</param>
>     </interceptor-ref>
>   </action>
> </package>
>
> Thanks,
> Jon

Attachment: user_185522.ezm (zipped)
Thanks for the response. The issue I'm seeing isn't with overriding parameters all parameters available, but rather just one or two out of all the interceptor params

Doesn't work:
<action name="myAction" class="myActionClass">
<interceptor-ref name="myStack">
   <param name="myInterceptor.paramC">actionSpecificValue</param>
</interceptor-ref>
</action>

Works:
<action name="myAction" class="myActionClass">
<interceptor-ref name="myStack">
  <!-- same value as defined in "myStack" declaration -->
  <param name="myInterceptor.paramA">defaultValueA</param>
  <!-- same value as defined in "myStack" declaration -->
  <param name="myInterceptor.paramB">defaultValueB</param>
  <param name="myInterceptor.paramC">actionSpecificValue</param>
</interceptor-ref>
</action>

The exception interceptor may not be a good example as it doesn't initialize any of the 3 parameters in the stack definition in struts-default.xml. Any way, I've opened https://issues.apache.org/struts/browse/WW-2595 to capture the issue (or maybe enhancement).

----- Original Message ----
From: Gabriel Belingueres <belingueres@(protected)>
To: Struts Users Mailing List <user@(protected)>
Sent: Wednesday, April 16, 2008 4:55:25 PM
Subject: Re: Overriding subset of interceptor params

Seems OK to me (according to the current documentation.)

I've only overriden interceptor parameters in the declaration of a new
stack, and it is working OK:

   <interceptor-stack name="secureStack">
    <interceptor-ref name="auth" />
    <interceptor-ref name="defaultStack">
      <param name="exception.logEnabled">true</param>
      <param name="exception.logLevel">ERROR</param>
      <param name="exception.logCategory">my.package.here</param>
    </interceptor-ref>
   </interceptor-stack>

Try to create a new stack for your action (for testing pourposes only)
to see if the results are the same. If they are, post your struts.xml
file here.

2008/4/16, Jon Wilmoth <jonwilmoth@(protected)>:
> I'm trying to override one of three interceptor parameters in an action specific config using method #2 described in
> http://struts.apache.org/2.0.11.1/docs/interceptors.html#Interceptors-InterceptorParameterOverriding. Unfortunately the other two parameters that I'm not overriding are not being taken from the default stack definition and are ending up as null on the interceptor. Before I open a Jira bug (or enhancement request), I thought I'd make sure a) this isn't user error b) the expected behavior is "my" expected behavior (i.e. bug vs. enhancement). Below is a sample action config showing what I'm attempting...
>
> <package name="packageA"...>
>   <interceptors>
>     <interceptor name="myInterceptor" class="..."/>
>     <interceptor-stack name="myStack">
>        <interceptor-ref name="defaultStack"/>
>        <interceptor-ref name="myInterceptor">
>           <param name="paramA">defaultValueA</param>
>           <param name="paramB">defaultValueB</param>
>           <param name="paramC">defaultValueC</param>
>        </interceptor-ref>
>     </interceptor-stack>
> </package>
>
> With the following action config, the "myInterceptor" interceptor's paramA & paramB are null and not "defaultValueA" and "defaultValueB" as expected/desired.
>
> <package name="packageB" extends="packageA"...>
>   <action name="myAction" class="myActionClass">
>     <interceptor-ref name="myStack">
>        <param name="myInterceptor.paramC">actionSpecificValue</param>
>     </interceptor-ref>
>   </action>
> </package>
>
> Thanks,
> Jon

Attachment: user_185520.ezm (zipped)
Dear Randy,

Thank you very much for your kind reply..your method is very good. I will
note your reply. =)
Is it possible to transfer query string using this method? although i am not
quite sure yet that this will work.

I will get parameter in my action class using *
request.getParameter("orderNumber");* then store it to a form bean
variable(String data type)then on popup window I will use *<jsp:getProperty>
* accessing form bean variable (form bean property).

Again, I would like to thank you for your answer.

-Ryan Webb


On Thu, Apr 17, 2008 at 3:56 AM, Randy Burgess <RBurgess@(protected):

> You can pass a query string to the popup window. Here is an example.
>
> <a
>
> href="javascript:popup('printOrder.do?orderNumber=${order.workOrderNumber}',
> 600, 600, true);">
>
> And then in the popup window to get the orderNumber param passed in above:
>
> <c:if test="${not empty param.orderNumber}">
> Reference Number: ${param.orderNumber}
> </c:if>
>
> You might want to change the href to # and put the window.open code in the
> onclick event but other than that this will work fine. In this case order
> Is a request attribute for this action.
>
> Regards,
> Randy Burgess
> Sr. Web Applications Developer
> Nuvox Communications
>
>
>
> > From: ryan webb <webb.ryan1@(protected)>
> > Reply-To: Struts Users Mailing List <user@(protected)>
> > Date: Wed, 16 Apr 2008 16:40:25 +0800
> > To: Struts Users Mailing List <user@(protected)>
> > Subject: Re: Is it possible to make a pop up window using Struts?
> >
> > Antonio,
> >
> >> 1) What Struts? Struts 1.2.9 (Netbeans bundle)
> >> 2) You can still do it in Javascript. I see.. I just want to know if
> you do
> > it with struts.
> >
> > I am having trouble with it..I created a pop up window using javascript
> and
> > i cant pass query string on new window.
> > when i clicked a <html:link> I pass a paramId and paramProperty and I
> cant
> > make it appear to new window.
> >
> > I have an action class that has *request.setAttribute("username",
> > request.getParameter("username"));*
> > on the new window I have *<%=
> out.println(request.getAttribute("username"))
> > %>* but this only displays the word NULL
> >
> > I am new to struts..
> >
> > Ryan
> >
> > On Wed, Apr 16, 2008 at 4:22 PM, Antonio Petrelli <
> > antonio.petrelli@(protected):
> >
> >> 2008/4/16, ryan webb <webb.ryan1@(protected)>:
> >>> Is it possible to make a window pop up using struts?
> >>> usually this can be done in Javascript..
> >>
> >> 1) What Struts?
> >> 2) You can still do it in Javascript
> >>
> >> Antonio
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@(protected)
> >> For additional commands, e-mail: user-help@(protected)
> >>
> >>
>
>
>
> This email and any attachments ("Message") may contain legally privileged
> and/or confidential information. If you are not the addressee, or if this
> Message has been addressed to you in error, you are not authorized to read,
> copy, or distribute it, and we ask that you please delete it (including all
> copies) and notify the sender by return email. Delivery of this Message to
> any person other than the intended recipient(s) shall not be deemed a waiver
> of confidentiality and/or a privilege.
>
>
> This email and any attachments ("Message") may contain legally privileged
> and/or confidential information. If you are not the addressee, or if this
> Message has been addressed to you in error, you are not authorized to read,
> copy, or distribute it, and we ask that you please delete it (including all
> copies) and notify the sender by return email. Delivery of this Message to
> any person other than the intended recipient(s) shall not be deemed a waiver
> of confidentiality and/or a privilege.
>

Attachment: user_185521.ezm (zipped)

I am trying to use s:datetimepicker.
I have the <s:head theme="ajax" /> in my <head> section.
I have <s:datetimepicker> like this:
 <s:datetimepicker name="campaign.startDate" /> to <s:datetimepicker
name="campaign.endDate" />

The html renders like this:
<link rel="stylesheet" href="/struts/xhtml/styles.css" type="text/css"/>
<script type="text/javascript">
  // Dojo configuration
  djConfig = {
    baseRelativePath: "/struts/dojo",
    isDebug: false,
    bindEncoding: "UTF-8",
    debugAtAllCosts: true // not needed, but allows the Venkman debugger
to work with the includes
  };
</script>
<script type="text/javascript"
    src="/struts/dojo/dojo.js"></script>
<script type="text/javascript"
    src="/struts/simple/dojoRequire.js"></script>
<script type="text/javascript"
    src="/struts/ajax/dojoRequire.js"></script>
<script type="text/javascript"
    src="/struts/CommonFunctions.js"></script>

.....

script type="text/javascript">
  dojo.require("dojo.widget.DatePicker");
</script>
<div
    dojoType="dropdowndatepicker"  
id="saveCampaign_campaign_startDate"   name="dojo.campaign.startDate"  
inputName="campaign.startDate" saveFormat="rfc"></div>

Note that the above div tag is empty. Seems like there should be something
in it.
The datetimepicker doesn't show up on the page.

Am I using the tag wrong? Or might my environment be missing something?
Many thanks for any help!

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


Attachment: user_185526.ezm (zipped)
It looks right.
Turn on debugging with s:head

<s:head theme="ajax" debug="true"/>

and use the FireFox FireBug plugin to determine if it failed to find any
resources.

The template for the calendar is loaded via an ajax request. If that
request fails you see nothing.

tristan_colson wrote:
> I am trying to use s:datetimepicker.
> I have the <s:head theme="ajax" /> in my <head> section.
> I have <s:datetimepicker> like this:
>   <s:datetimepicker name="campaign.startDate" /> to <s:datetimepicker
> name="campaign.endDate" />
>
> The html renders like this:
> <link rel="stylesheet" href="/struts/xhtml/styles.css" type="text/css"/>
> <script type="text/javascript">
>   // Dojo configuration
>   djConfig = {
>      baseRelativePath: "/struts/dojo",
>      isDebug: false,
>      bindEncoding: "UTF-8",
>      debugAtAllCosts: true // not needed, but allows the Venkman debugger
> to work with the includes
>   };
> </script>
> <script type="text/javascript"
>      src="/struts/dojo/dojo.js"></script>
> <script type="text/javascript"
>      src="/struts/simple/dojoRequire.js"></script>
> <script type="text/javascript"
>      src="/struts/ajax/dojoRequire.js"></script>
> <script type="text/javascript"
>      src="/struts/CommonFunctions.js"></script>
>
> .....
>
> script type="text/javascript">
>   dojo.require("dojo.widget.DatePicker");
> </script>
> <div
>      dojoType="dropdowndatepicker"  
> id="saveCampaign_campaign_startDate"   name="dojo.campaign.startDate"  
> inputName="campaign.startDate" saveFormat="rfc"></div>
>
> Note that the above div tag is empty. Seems like there should be something
> in it.
> The datetimepicker doesn't show up on the page.
>
> Am I using the tag wrong? Or might my environment be missing something?
> Many thanks for any help!
>
>  


Attachment: user_185523.ezm (zipped)
If you have not heard about the recent launch of Google App Engine, I
blogged about it here with links to more information and video
recorded at the official launch event on April 7th:

http://weblogs.java.net/blog/van_riper/archive/2008/04/google_app_engi_1.html

It is a free (up to a fair amount of page views and bandwidth per
month) scalable web application hosting environment. It sounds like a
really nice setup except for one thing. The only supported runtime is
Python initially. If you would like to voice your support for adding
Java runtime support to GAE, you can do so by starring this issue:

http://tinyurl.com/5svpmh

Important Note: Please do *not* add a "+1" comment to this issue like
many others have already done. All that is necessary is to star the
issue. Comments are intended to provide more information about an
issue and everyone that stars an issue sees these comments. So, it
ends up generating essentially spam email for everyone that has
starred the issue.

I fully realize that more factors than simply the number of stars an
issue receives will go into the decision process with respect to a
major feature addition like this. Still, the Java runtime issue is the
top vote getter so far and I would like to keep it that way. The Ruby
runtime issue is not that far behind us. :-)

Cheers, Van

--
| Michael "Van" Riper
| http://weblogs.java.net/blog/van_riper/
| http://www.linkedin.com/in/vanriper
----
| Silicon Valley Web Developer JUG
| mailto:van_riper@(protected)
| https://sv-web-jug.dev.java.net
----
| Silicon Valley Google Technology User Group
| mailto:van.gtug@(protected)
| http://sv-gtug.org

Attachment: user_185524.ezm (zipped)
Thanks, Brad!

> Having said all of that, I've been able to get the zero
> config/codebehind working and (in Spring 2.5) component scanned Spring
> beans so that newly written Actions and DAOs require few annotations and
> no xml configuration. What other kind of problems have you had?

How do I specify an interceptor stack/ref on an action with
annotations? I have lookup actions that need no stack at all, so I
created an almost empty stack in my struts.xml. Now, how do I specify
this on an action without specifying the action in struts.xml?

I simply find annotation way very much incomplete. Maybe it will get
there some day but I really need to be in full control of what I can
specify - just the way I could do with strtus.xml file. I do not want
to have several strategies to configure my actions on the same project
... it's not cool and makes things hard to read/maintain.

Attachment: user_185525.ezm (zipped)
I have an action with a List<Message> messages. The
Message class has a Date senddate. In my jsp I am
iterating over the messages and want to create a s:url
with a param of formatedDate but I want to set the
value as a formatted version of senddate. I am
presently adding a getFormattedDate method which is
using SimpleDateFormat("dd/MM/yyyy
hh:mm:ss").format(senddate) in the Message class but I
don't want the formatting to be done in the Message.
Is there a more elegant way of doing this in the jsp please?


   ____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

Attachment: user_185529.ezm (zipped)
David Harland wrote:
> I have an action with a List<Message> messages. The
> Message class has a Date senddate. In my jsp I am
> iterating over the messages and want to create a s:url
> with a param of formatedDate but I want to set the
> value as a formatted version of senddate. I am
> presently adding a getFormattedDate method which is
> using SimpleDateFormat("dd/MM/yyyy
> hh:mm:ss").format(senddate) in the Message class but I
> don't want the formatting to be done in the Message.
> Is there a more elegant way of doing this in the jsp please?
>
>
>     _______________

This is a common question. It's something like this:

<s:url href="....">
 <s:param name="theDate">
   <s:date name="date" format="dd/MM/yyyy"/>
 </s:param>
</s:url>


ie. that's an s:date tag within a s:param tag within an s:url tag. The
formatted date is the body of the param tag.

It becomes more complicated when you need a locale dependent date or
date conversion.

Hope that helps,
Jeromy Evans

Attachment: user_185527.ezm (zipped)
It looks like you're doing everything okay (and well explained) If you
enable debugging do you get any useful feedback ?
<s:head theme="ajax" debug="true"/>

The complexity here is that Dojo must parse the response, extract the
scripts, insert the html in the dom and then execute the scripts. If
you include an alert in an inline script and it's still not being
executed then there's definitely a problem with it completing the last
operation. You may have to switched to the uncompressed dojo script to
find out where it's failing in within the div widget.

Jukka Välimaa wrote:
> Hi everyone,
>
> I'm using Struts 2.1's ajax tags to replace content in a section of my page.
> I have this section enclosed in sx:div tags, like so:
>
> <sx:div id="pageContentSection" preload="false" href="%{myUrl}"
>   listenTopics="/reloadContentSection"
>   afterNotifyTopics="/contentSectionLoaded" executeScripts="true"
>   showLoadingText="true" separateScripts="true" indicator="barIndicator">
>
> ..
>
> </sx:div>
>
> I change the div content by editing its href with javascript and then
> publishing the topic it's listening to:
>
> function reloadContentSection(url){
>   if(!isAnUrl(url)) return false;
>
>   var contentSection = dojo.widget.byId("pageContentSection");
>   if(contentSection == null) return false;
>
>   var origHref = contentSection.href;
>
>   contentSection.href = url;
>
>   dojo.event.topic.publish('/reloadContentSection', '','');
>
>   contentSection.href =origHref;
> }
>
> It's working fine otherwise, but I have trouble executing scripts in
> returned content. I've experimented with different values of executeScripts
> and separateScripts to no effect. I've even tried to include scripts as a
> reference to separate javascript library--no better luck there. Even though
> scripts I write don't work, a datetimepicker in the same returned content,
> done using ajax tags and of course relying on scripts, works perfectly.
>
> When I set separateScripts as false, my scripts are included in generated
> DOM source, after some scripts by Matt Cruse, which I assume are directly
> related to struts ajax functionality. Of course, being included doesn't mean
> that they work.
>
> Right now, I've worked around this problem by including the scripts I need
> in the page I'm calling ajax from, and not in returned content. I don't
> think this is good design, and won't work if I need to generate scripts
> dynamically.
>
> Can any of you tell me what's wrong, or how to fix it?
>
> Jukka
>
>  
> ------------------------------------------------------------------------
>
> No virus found in this incoming message.
> Checked by AVG.
> Version: 7.5.519 / Virus Database: 269.23.0/1379 - Release Date: 15/04/2008 6:10 PM
>  


Attachment: user_185536.ezm (zipped)
Thanks for input,

Yes, I have debug on. Interestingly enough, with firefox it gives me just
this:
DEBUG: Error running scripts from content

However, I just noticed that with IE, I get this:
DEBUG: Error running scripts from content:Could not complete the operation
due to error 80020101

At the moment, I'm working around this problem by writing the scripts I need
to call outside the context I need to fetch by ajax, and calling those
scripts by function calls placed in form onsubmit attributes, for example.
Messy but workable. I'll work on debugging the issue with struts tags later
-- there is no guarantee it's even fixable directly, since I'm using a
snapshot version and not an official distribution.

On Thu, Apr 17, 2008 at 11:19 AM, Jeromy Evans <
jeromy.evans@(protected):

> It looks like you're doing everything okay (and well explained) If you
> enable debugging do you get any useful feedback ?
> <s:head theme="ajax" debug="true"/>
>
> The complexity here is that Dojo must parse the response, extract the
> scripts, insert the html in the dom and then execute the scripts. If you
> include an alert in an inline script and it's still not being executed then
> there's definitely a problem with it completing the last operation. You may
> have to switched to the uncompressed dojo script to find out where it's
> failing in within the div widget.
>
> Jukka Välimaa wrote:
>
> > Hi everyone,
> >
> > I'm using Struts 2.1's ajax tags to replace content in a section of my
> > page.
> > I have this section enclosed in sx:div tags, like so:
> >
> > <sx:div id="pageContentSection" preload="false" href="%{myUrl}"
> >   listenTopics="/reloadContentSection"
> >   afterNotifyTopics="/contentSectionLoaded" executeScripts="true"
> >   showLoadingText="true" separateScripts="true"
> > indicator="barIndicator">
> >
> > ..
> >
> > </sx:div>
> >
> > I change the div content by editing its href with javascript and then
> > publishing the topic it's listening to:
> >
> > function reloadContentSection(url){
> >   if(!isAnUrl(url)) return false;
> >
> >   var contentSection = dojo.widget.byId("pageContentSection");
> >   if(contentSection == null) return false;
> >
> >   var origHref = contentSection.href;
> >
> >   contentSection.href = url;
> >
> >   dojo.event.topic.publish('/reloadContentSection', '','');
> >
> >   contentSection.href =origHref;
> > }
> >
> > It's working fine otherwise, but I have trouble executing scripts in
> > returned content. I've experimented with different values of
> > executeScripts
> > and separateScripts to no effect. I've even tried to include scripts as
> > a
> > reference to separate javascript library--no better luck there. Even
> > though
> > scripts I write don't work, a datetimepicker in the same returned
> > content,
> > done using ajax tags and of course relying on scripts, works perfectly.
> >
> > When I set separateScripts as false, my scripts are included in
> > generated
> > DOM source, after some scripts by Matt Cruse, which I assume are
> > directly
> > related to struts ajax functionality. Of course, being included doesn't
> > mean
> > that they work.
> >
> > Right now, I've worked around this problem by including the scripts I
> > need
> > in the page I'm calling ajax from, and not in returned content. I don't
> > think this is good design, and won't work if I need to generate scripts
> > dynamically.
> >
> > Can any of you tell me what's wrong, or how to fix it?
> >
> > Jukka
> >
> >
> > ------------------------------------------------------------------------
> >
> > No virus found in this incoming message.
> > Checked by AVG. Version: 7.5.519 / Virus Database: 269.23.0/1379 -
> > Release Date: 15/04/2008 6:10 PM
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment: user_185528.ezm (zipped)
Hi All,

i have downloaded the 'Struts
2.0.11.1<http://struts.apache.org/download.cgi#struts20111>'
distribution and trying to deploy application by following apache struts
tutorial document . I got this exception due to var attribute missing in the
url tag.*

org.apache.jasper.JasperException*: /HelloWorld.jsp(13,8) Attribute var
invalid for tag url according to TLD

at org.apache.jasper.compiler.DefaultErrorHandler.jspError(*
DefaultErrorHandler.java:40*)

at org.apache.jasper.compiler.ErrorDispatcher.dispatch(*
ErrorDispatcher.java:406*)

at org.apache.jasper.compiler.ErrorDispatcher.jspError(*
ErrorDispatcher.java:235*)* ' *

**

I have checked tld in core struts jar and it doen't contain the attribute
'var' for url tag . Please let me know if am doing something wrong or there
is error in the jar of the latest distribution.

Regards,

Zuber






.

Attachment: user_185530.ezm (zipped)
my application uses container managed security , j_security_check,
we create session before user login so i dont want to call session.invalidate
if users wants to logout is there anything i can do to logout user ?

   
---------------------------------
Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.

Attachment: user_185531.ezm (zipped)
Hi,
My project has the requirement to display the records
in table and when i click on a particular row, the
data would be displayed in the text boxes.

I have applied Struts frame work and data is displayed
in table, now any body can help how to show that data
in textboxes on click to a record in table.

Is there ready made tool or sample code for that.

thanks in advance..
Deepak.
--- temp temp <miroconnect@(protected):

> my application uses container managed security ,
> j_security_check,
> we create session before user login so i dont
> want to call session.invalidate
> if users wants to logout is there anything i can do
> to logout user ?
>
>    
> ---------------------------------
> Be a better friend, newshound, and know-it-all with
> Yahoo! Mobile. Try it now.



   ____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

Attachment: user_185533.ezm (zipped)
Rishi
Do not hijack others thread please. Create a new e-mail.

Antonio

2008/4/17, Rishi Deepak <deepakrishi@(protected)>:
>
> Hi,
> My project has the requirement to display the records
> in table and when i click on a particular row, the
> data would be displayed in the text boxes.
>
> I have applied Struts frame work and data is displayed
> in table, now any body can help how to show that data
> in textboxes on click to a record in table.
>
> Is there ready made tool or sample code for that.
>
> thanks in advance..
> Deepak.
>
> --- temp temp <miroconnect@(protected):
>
> > my application uses container managed security ,
> > j_security_check,
> > we create session before user login so i dont
> > want to call session.invalidate
> > if users wants to logout is there anything i can do
> > to logout user ?
> >
> >
> > ---------------------------------
> > Be a better friend, newshound, and know-it-all with
> > Yahoo! Mobile. Try it now.
>
>
>
>
>
>     ____________________________________________________________________________________
>
> Be a better friend, newshound, and
>
> know-it-all with Yahoo! Mobile. Try it now.
> http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment: user_185532.ezm (zipped)
Hi,
My project has the requirement to display the records
in table and when i click on a particular row, the
data would be displayed in the text boxes.

I have applied Struts frame work and data is displayed
in table, now any body can help how to show that data
in textboxes on click to a record in table.

Is there ready made tool or sample code for that.

thanks in advance..
Deepak.
--- temp temp <miroconnect@(protected):

> my application uses container managed security ,
> j_security_check,
> we create session before user login so i dont
> want to call session.invalidate
> if users wants to logout is there anything i can do
> to logout user ?
>
>    
> ---------------------------------
> Be a better friend, newshound, and know-it-all with
> Yahoo! Mobile. Try it now.



   ____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

Attachment: user_185534.ezm (zipped)

I have the same trouble. Has anyone solve this problem ?
Thanks,


niels-15 wrote:
>
> I want to pass a value to my fielderror.ftl
>
> lik this:
>
> <s:fielderror>
>  <s:param name="foo" value="bar"/>
> </s:fielderror>
>
>
>
> Does someone knows how to retrief the value in de template?
>
> ${parameters.foo}
>
> gives me the error:
> freemarker.core.InvalidReferenceException: Expression Expression
> parameters.foo is undefined
>

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


Attachment: user_185535.ezm (zipped)
Hi,

what is also wierd, if I put that array in the session in my Action class like this (in prepare method):

Map session = ActionContext.getContext().getSession();
session.put("allRoles", allRoles);

and then I change my .jsp to use this array from session:

...
<s:select
id = "roleChoose"
label="Role"
list="%{#session.allRoles}"
name="user.roles"
emptyOption="false"
value="user.roles"
headerKey="None"
multiple="true"/>
<s:submit theme="ajax" value="Save" targets="users" notifyTopics="/save"/>
...

I got the same error (as I wrote in the first message), that it cannot locate allRoles.

What is the problem ?

--
Thx in advance, Milan Milanovic


----- Original Message ----
From: Milan Milanovic <milanmilanovich@(protected)>
To: Struts Users Mailing List <user@(protected)>
Sent: Wednesday, April 16, 2008 4:23:03 PM
Subject: Re: Problem with Select tag

Yes, I understand. But if you read my post, EVERYTHING works fine, but when I add namespace to package
in struts.xml (and in <s:form...) automatically "list" attribute of <s:select... doesn't recognize array anymore. I've tried
this many times and every time it works in the same way.

Here is excerpt of my code:

struts.xml:
--
<struts>
  <constant name="struts.objectFactory" value="spring" />
  <constant name="struts.devMode" value="true" />

<package name="administration" namespace="/administration" extends="struts-default">
    <action name="save" class="userAction" method="save">
       <result>/pages/administration/list.jsp</result>
       <result name="input">/pages/administration/list.jsp</result>
    </action>
</package>
<package name="register" namespace="/registers" extends="struts-default">
...
</struts>

UserAction.java:
--
public class UserAction extends ActionSupport implements Preparable {
/**
*
*/
private static final long serialVersionUID = 7654885094460681178L;
private UserService service;
private List<User> users;
private User user;
private String username;
private String [] allRoles;
public UserAction(UserService service) {
this.service = service;
}
public String execute() {
users = service.findAllUsers();
allRoles = service.getAllRoles(); <- this method works fine, it return an array of roles

    user = new User();
    return Action.SUCCESS;
  }
 
  public String save() {
   service.save(user);
 
   return execute();
}

public void prepare() throws Exception {
if (username != null)
if (!username.equals(""))
  user = servis.findUserByUsername(username);
}

public void setAllRoles(String [] allRoles) {
this.allRoles = allRoles;
}

public String [] getAllRoles() {
return allRoles;
}

// Other getters/setters
}

users.jsp:
--
<body>
...
<s:form action="save" namespace="/administration" validate="true" method="post">
<s:textfield id="username" label="Username" name="user.username"/>
<s:textfield id="password" label="Password" name="user.password"/>
<s:select
id = "roleChoose"
label="Role"
list="allRoles" <- THIS DOESN'T WORK WHEN I ADD NAMESPACE HERE IN FORM AND IN STRUTS.XML FOR CORRESPODING PACKAGE
name="user.roles"
emptyOption="false"
value="user.roles"
headerKey="None"
multiple="true"/>
<s:submit theme="ajax" value="Save" targets="users" notifyTopics="/save"/>
</s:form>
...
</body>

--
Thx in advance, Milan Milanovic

----- Original Message ----
From: Michael Gagnon <mgagnon@(protected)>
To: Struts Users Mailing List <user@(protected)>
Sent: Wednesday, April 16, 2008 3:38:38 PM
Subject: RE: Problem with Select tag

Can you show your struts xml, calling java action, and resulting jsp code?
I've noticed error messages like that whenever ANYTHING was wrong on a page
with a select box -- completely independent of anything to do with the
select box. So I think whatever you changed MAY have broken something else
and the message may be misleading you.

-----Original Message-----
From: Milan Milanovic [mailto:milanmilanovich@(protected)]
Sent: Wednesday, April 16, 2008 9:28 AM
To: Struts Users Mailing List
Subject: Re: Problem with Select tag

Nobody has an answer to this simple question ?

As I asked, there is with select's tag "list" attribute, when namespace is
added to the package and to the form tag. It doesn't recognize given array
from the action class anymore. Do I miss something or this is a serious
error in Struts 2 ?

--
Thanks, Milan Milanovic



----- Original Message ----
From: Milan Milanovic <milanmilanovich@(protected)>
To: user@(protected)
Sent: Tuesday, April 15, 2008 11:21:37 PM
Subject: Problem with Select tag

Hi,

I'm using Struts 2.0.11.1, and I have wierd problem with select UI tag. It
works perfectly, but
when I added namespace to the package in struts.xml, which is used in form
where this select tag
is located, I get an error:

"tag 'select', field 'list', id 'roles', name 'user.roles': The requested
list key 'allRoles' could not be resolved as a
collection/array/map/enumeration/iterator type. Example: people or
people.{name} - [unkown location]"

I should note that I've added this namespace to the form tag too, where
select tag is located.

How can I solve this problem ? It seems when namespace is added to package,
select's list attribute doesn't recognize correct value stack anymore.

___________________________
Thanks in advance, Milan Milanovic






____________________________________________________________________________
________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now.
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ



____________________________________________________________________________
________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now.
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ



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


   ____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ


   ____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
©2008 gg3721.com - Jax Systems, LLC, U.S.A.