Java Mailing List Archive

http://www.gg3721.com/

Home » Struts Users Mailing List »

user Digest 27 Mar 2008 20:05:15 -0000 Issue 7947

user-digest-help

2008-03-27


Author LoginPost Reply

user Digest 27 Mar 2008 20:05:15 -0000 Issue 7947

Topics (messages 184700 through 184727):

Re: Struts 2.1 autocompleter, get the value
 184700 by: sassien

FormFile to Next Page
 184701 by: Tom Holmes Jr.
 184702 by: Antonio Petrelli
 184704 by: Tom Holmes Jr.
 184705 by: Antonio Petrelli
 184707 by: Tom Holmes Jr.
 184708 by: Antonio Petrelli
 184709 by: Antonio Petrelli
 184710 by: Tom Holmes Jr.
 184711 by: Antonio Petrelli

Tabbed panel question
 184703 by: Jiang, Jane (NIH/NCI) [C]

Another select-option question
 184706 by: Tom Holmes Jr.

Calling Action on form load
 184712 by: aum strut
 184713 by: Jiang, Jane (NIH/NCI) [C]
 184714 by: Randy Burgess
 184715 by: aum strut
 184716 by: Jiang, Jane (NIH/NCI) [C]

Re: Dojo not working in Struts2.
 184717 by: Kropp, Henning

s:submit and cssStyle
 184718 by: Brian Relph

Action chaining problem
 184719 by: Enrico Drusiani

Re: Struts2 / Spring not working a a WAR in Weblogic9.1
 184720 by: Laurie Harper

Re: submit and cssStyle
 184721 by: Michael Gagnon

Struts constants
 184722 by: Matthew Seaborn

Message surviving redirect
 184723 by: chubi
 184724 by: chubi
 184725 by: chubi
 184726 by: chubi
 184727 by: chubi

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_184700.ezm (zipped)

Ok, I finally managed to make it work.

so now the answer...

as I said, I did it exactly the same way as the example:

<form id="selectForm">
<sx:autocompleter theme="simple" name="select" list="{'fruits','colors'}"
value="colors" notifyTopics="/Changed" />
</form>
Autocompleter 2 <sx:autocompleter href="%{#autoex}" formId="selectForm"
listenTopics="/Changed"/>

and here we never get the result (the selected thing). Of course if we want
to have it we have to add name="mySelectedValue" and have a
setMySelectedValue in the action class.
This value should be necessary, for example, to generate a third list, or
whatever.

But what I didn't know was that we have to surround the second autocompleter
by
<s:form id="selectForm2">...</s:form>, and to reference it to the tag which
needs it.

now I realize, as expected, that the solution was really simple, but I
hadn't seen this explanation anywhere before...



sassien wrote:
>
> Yes I mean to use the value on my action, and I did set name="myVar" and I
> do have a "myVar" field and a public setMyVar() method on my action.
> This is strange, because when I write my autocompleter this way:
> <sx:autocompleter name="myValue" list="{'fruits','colors'}"
> valueNotifyTopics="/changed" />
>
> here the value is "stored" and I can use it in my action.
>
> But if I write exactly the same autocompleter, but using an action, like
> here:
> <sx:autocompleter href="%{jsonList}" name="myValue"
> valueNotifyTopics="/changed" />
>
> ... in this case it doesn't work... I mean the select box does work, it is
> displayed, but no value is returned to the action. :-\
>
> so I guess I must do something wrong, but I have to say I really don't
> know what.
> Maybe I have to specify that the action I use to fill the list is not the
> same as the one which get the results.
>
>

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


Attachment: user_184701.ezm (zipped)
I have found dozens of examples on the Net to use Struts 1 to upload a
file using the FormFile object.
This works great.  However, there is probably a bug in the FormFile
since getting the inputStream doesn't seem to work.
But using the getFileData to get the byte array does work fine, so then
I have to create a ByteArrayInputStream.

Anyway, my question is after I upload my file and look at the data, I
want to hold onto that file to the next page.
Can I do that.  After I successfully upload my CSV file on the first
page, and parse it to get the first line which are headers.
Then I go to the next JSP page and I display those headers ... and I
want to keep that FormFile around from the first page.

Can I do this, or do I need to parse the entire file after the first
page, and then how would I persist this without writing it to a database.

Thanks!
                Tom


Attachment: user_184702.ezm (zipped)
2008/3/27, Tom Holmes Jr. <tom@(protected)>:
>
> Anyway, my question is after I upload my file and look at the data, I
> want to hold onto that file to the next page.

...
> Can I do this, or do I need to parse the entire file after the first
> page, and then how would I persist this without writing it to a database.



You need to parse the input stream as it comes. The reason why the FormFile
does not return an input stream at the following request is that the input
stream is connected to the previous HTTP request.
How you can persist it is a problem of yours, Struts cannot help in this.
But anyway, I suggest to parse that file and "remember" only the portions
you really need.

Antonio

Attachment: user_184704.ezm (zipped)
Ok ..... maybe what I'll do in this case is put the FormFile into the
request manually, so I can pass it from one page to the next.
I'm not so much concerned with the FormFile.getInputStream since I can
use FormFile.getFileData to get the byte array data.

Thanks!

Antonio Petrelli wrote:
> 2008/3/27, Tom Holmes Jr. <tom@(protected)>:
>  
>> Anyway, my question is after I upload my file and look at the data, I
>> want to hold onto that file to the next page.
>>  
>
> ...
>  
>> Can I do this, or do I need to parse the entire file after the first
>> page, and then how would I persist this without writing it to a database.
>>  
>
>
>
> You need to parse the input stream as it comes. The reason why the FormFile
> does not return an input stream at the following request is that the input
> stream is connected to the previous HTTP request.
> How you can persist it is a problem of yours, Struts cannot help in this.
> But anyway, I suggest to parse that file and "remember" only the portions
> you really need.
>
> Antonio
>
>  
> ------------------------------------------------------------------------
>
> No virus found in this incoming message.
> Checked by AVG.
> Version: 7.5.519 / Virus Database: 269.22.1/1346 - Release Date: 3/27/2008 10:03 AM
>  


Attachment: user_184705.ezm (zipped)
2008/3/27, Tom Holmes Jr. <tom@(protected)>:
>
> Ok ..... maybe what I'll do in this case is put the FormFile into the
> request manually



Isn't it easier to parse the FormFile in the action?

Antonio

Attachment: user_184707.ezm (zipped)
Well, my use case, I am parsing a CSV file and the first line contains
the header information.
Each column has a header .... so rather than parse the entire file at
this time, I just grab the first line.
That's all I need to do in that action, then I need to hold onto that
file, and then go to the next page.
I need some user/mapping information on this second page ... and then
when I submit from the second page.
Then I have all the information I need so I can parse the rest of the data.

If I parse the file after the first page ... I'm not ready to do
anything with it yet.
So, I still need to hold onto this file until after the second page.
That's my use case.    Thanks!
                                             Tom

Antonio Petrelli wrote:
> 2008/3/27, Tom Holmes Jr. <tom@(protected)>:
>  
>> Ok ..... maybe what I'll do in this case is put the FormFile into the
>> request manually
>>  
>
>
>
> Isn't it easier to parse the FormFile in the action?
>
> Antonio
>
>  
> ------------------------------------------------------------------------
>
> No virus found in this incoming message.
> Checked by AVG.
> Version: 7.5.519 / Virus Database: 269.22.1/1346 - Release Date: 3/27/2008 10:03 AM
>  


Attachment: user_184708.ezm (zipped)
2008/3/27, Tom Holmes Jr. <tom@(protected)>:
>
> Well, my use case, I am parsing a CSV file and the first line contains
> the header information.
> Each column has a header .... so rather than parse the entire file at
> this time, I just grab the first line.
> That's all I need to do in that action, then I need to hold onto that
> file, and then go to the next page.
> I need some user/mapping information on this second page ... and then
> when I submit from the second page.
> Then I have all the information I need so I can parse the rest of the
> data.
>
> If I parse the file after the first page ... I'm not ready to do
> anything with it yet.
> So, I still need to hold onto this file until after the second page.
> That's my use case.    Thanks!



Why don't you parse it "before" you need it, storing the result of the
parsing in session?

Antonio

Attachment: user_184709.ezm (zipped)
2008/3/27, Tom Holmes Jr. <tom@(protected)>:
>
> Well, my use case, I am parsing a CSV file and the first line contains
> the header information.
> Each column has a header .... so rather than parse the entire file at
> this time, I just grab the first line.
> That's all I need to do in that action, then I need to hold onto that
> file, and then go to the next page.
> I need some user/mapping information on this second page ... and then
> when I submit from the second page.
> Then I have all the information I need so I can parse the rest of the
> data.
>
> If I parse the file after the first page ... I'm not ready to do
> anything with it yet.
> So, I still need to hold onto this file until after the second page.
> That's my use case.    Thanks!



Why don't you parse it "before" you need it, storing the result of the
parsing in session?

Antonio

Attachment: user_184710.ezm (zipped)
Yes, I thought I mentioned that .... I could parse it and store it until
I need it.
However, I don't like to store data like that in a session ... it could
be a lot of data.
But I could pass it into the request ....

Antonio Petrelli wrote:
> 2008/3/27, Tom Holmes Jr. <tom@(protected)>:
>  
>> Well, my use case, I am parsing a CSV file and the first line contains
>> the header information.
>> Each column has a header .... so rather than parse the entire file at
>> this time, I just grab the first line.
>> That's all I need to do in that action, then I need to hold onto that
>> file, and then go to the next page.
>> I need some user/mapping information on this second page ... and then
>> when I submit from the second page.
>> Then I have all the information I need so I can parse the rest of the
>> data.
>>
>> If I parse the file after the first page ... I'm not ready to do
>> anything with it yet.
>> So, I still need to hold onto this file until after the second page.
>> That's my use case.    Thanks!
>>  
>
>
>
> Why don't you parse it "before" you need it, storing the result of the
> parsing in session?
>
> Antonio
>
>  
> ------------------------------------------------------------------------
>
> No virus found in this incoming message.
> Checked by AVG.
> Version: 7.5.519 / Virus Database: 269.22.1/1346 - Release Date: 3/27/2008 10:03 AM
>  


Attachment: user_184711.ezm (zipped)
2008/3/27, Tom Holmes Jr. <tom@(protected)>:
>
> Yes, I thought I mentioned that .... I could parse it and store it until
> I need it.
> However, I don't like to store data like that in a session ... it could
> be a lot of data.
> But I could pass it into the request ....



Wait a moment, maybe I misunderstood.
You are writing about "pages", but do they stay in the same HTTP request?
If yes, ok, the FormFile is available through the whole request, but it can
be read only once (IIRC).

Antonio

Attachment: user_184703.ezm (zipped)
I just started using tabbed panel. I started with these simple 3 tabs.
I now want to add a link to tab one that when clicked opens up tab 2. I
know I can use the selectedTab attribute to dynamically select a tab.
Is there a better/simpler way to do that?

Thanks a lot for your help,

Jane

 <s:tabbedPanel id="test" >

   <s:div id="one" label="Manager" theme="ajax" labelposition="top" >
    <s:include value="Manager.jsp" />
   </s:div>

   <s:div id="two" label="Queries" theme="ajax">
    <s:include value="queryList.jsp" />
    <s:include value="Criteria.jsp" />
    <s:include value="Queries.jsp" />
   </s:div>
   
   <s:div id="three" label="Grant Lists" theme="ajax">
    <s:include value="GrantLists.jsp" />
    <br>
   </s:div>
  </s:tabbedPanel>

Attachment: user_184706.ezm (zipped)
I've created numerous pages with multiple combo-dropdown boxes that
captured the label and value of a select box.
The formbean for these was always clear cut and simple.

Now, I have a select like the following:
<select name="test" multiple="true">
  <option value="selection a">A</option>
  <option value="selection b">B</option>
  <option value="selection c">C</option>
</select>
As I understand it, when I submit, this will submit back a string array
(String[] test) which is defined in my form bean ... right?

Now lets say I have the following single select
<select name="test">
  <option value="selection a">A</option>
  <option value="selection b">B</option>
  <option value="selection c">C</option>
</select>
<select name="test">
  <option value="selection d">D</option>
  <option value="selection e">E</option>
  <option value="selection f">F</option>
</select>
So now there are two with the same name ... I am guessing that I will
still get back a string array (String[] test) which is defined in my
form bean ... right?

What I'd really like is a little different.
I'd like the first selection test to be test[0] = A,B, or C (since it is
single select) AND
I'd like the second selection test to be test[1] = D,E, or F (since it
is single select)
Or even better yet:
I'd like the first selection test to be test["first_letter"] = A,B, or C
(since it is single select) AND
I'd like the second selection test to be test["second_letter"] = D,E, or
F (since it is single select)

So, how would I setup the form bean for this?
The way it is setup now, I have a Collection for test, and it comes back
with an argument type mismatch.

Any help would be much appreciated, and I will keep working on this.

Thanks!
                          Tom


Attachment: user_184712.ezm (zipped)
Hi all,

is it possible to call an action in struts2 everytime when the page get
loaded if yes how it is possible.
my problem is i am using <s:select> tag and using a list to pupulate this
drop down this list is coming from the action which i m calling before the
page is being displayed.

the folw is like this:

if usercall for this JSP page instaed to direct user directly to this page
i m calling an action which is preaparing a list for the <s:select> tag
and then it is forwarding the user to this page.

Till now eveything is working fine,but when on this page user is entering
some values in the fields and hitting the submitting button,exception is
being thrown which is saying that:


select', field 'list', name 'code': The requested list key 'ItemCode' could
not be resolved as a collection/array/map/enumeration/iterator type.
Example: people or people.{name} - [unknown location]

because i thik it is unable to call the action again which is returning the
list...is theer any way to call that action each time when user is
submitting the value..



any pointer in this regard will be much appriciated.

-aum

Attachment: user_184713.ezm (zipped)
Aum,

I know what you are talking about. I end up putting all lists for
select tag in the session. Otherwise, you will have to reload the list
every time the form submits and when validation error happens. I'd like
to find out if there are other ways to get around too.

Jane



-----Original Message-----
From: aum strut [mailto:aum.struts@(protected)]
Sent: Thursday, March 27, 2008 12:34 PM
To: Struts Users Mailing List
Subject: Calling Action on form load

Hi all,

is it possible to call an action in struts2 everytime when the page get
loaded if yes how it is possible.
my problem is i am using <s:select> tag and using a list to pupulate
this
drop down this list is coming from the action which i m calling before
the
page is being displayed.

the folw is like this:

if usercall for this JSP page instaed to direct user directly to this
page
i m calling an action which is preaparing a list for the <s:select> tag
and then it is forwarding the user to this page.

Till now eveything is working fine,but when on this page user is
entering
some values in the fields and hitting the submitting button,exception is
being thrown which is saying that:


select', field 'list', name 'code': The requested list key 'ItemCode'
could
not be resolved as a collection/array/map/enumeration/iterator type.
Example: people or people.{name} - [unknown location]

because i thik it is unable to call the action again which is returning
the
list...is theer any way to call that action each time when user is
submitting the value..



any pointer in this regard will be much appriciated.

-aum

Attachment: user_184714.ezm (zipped)
Use the <s:action> tag.

http://struts.apache.org/2.x/docs/action.html

Regards,
Randy Burgess
Sr. Web Applications Developer
Nuvox Communications



> From: aum strut <aum.struts@(protected)>
> Reply-To: Struts Users Mailing List <user@(protected)>
> Date: Thu, 27 Mar 2008 22:04:04 +0530
> To: Struts Users Mailing List <user@(protected)>
> Subject: Calling Action on form load
>
> Hi all,
>
> is it possible to call an action in struts2 everytime when the page get
> loaded if yes how it is possible.
> my problem is i am using <s:select> tag and using a list to pupulate this
> drop down this list is coming from the action which i m calling before the
> page is being displayed.
>
> the folw is like this:
>
> if usercall for this JSP page instaed to direct user directly to this page
> i m calling an action which is preaparing a list for the <s:select> tag
> and then it is forwarding the user to this page.
>
> Till now eveything is working fine,but when on this page user is entering
> some values in the fields and hitting the submitting button,exception is
> being thrown which is saying that:
>
>
> select', field 'list', name 'code': The requested list key 'ItemCode' could
> not be resolved as a collection/array/map/enumeration/iterator type.
> Example: people or people.{name} - [unknown location]
>
> because i thik it is unable to call the action again which is returning the
> list...is theer any way to call that action each time when user is
> submitting the value..
>
>
>
> any pointer in this regard will be much appriciated.
>
> -aum



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_184715.ezm (zipped)
Jane,

can you just give me a brief aidea about (or even if u can a demo code ) how
u put ur list in to the action.

that will be of gr8 help

--aum


On 3/27/08, Randy Burgess <RBurgess@(protected):
>
> Use the <s:action> tag.
>
> http://struts.apache.org/2.x/docs/action.html
>
> Regards,
> Randy Burgess
> Sr. Web Applications Developer
> Nuvox Communications
>
>
>
> > From: aum strut <aum.struts@(protected)>
> > Reply-To: Struts Users Mailing List <user@(protected)>
> > Date: Thu, 27 Mar 2008 22:04:04 +0530
> > To: Struts Users Mailing List <user@(protected)>
> > Subject: Calling Action on form load
> >
> > Hi all,
> >
> > is it possible to call an action in struts2 everytime when the page get
> > loaded if yes how it is possible.
> > my problem is i am using <s:select> tag and using a list to pupulate
> this
> > drop down this list is coming from the action which i m calling before
> the
> > page is being displayed.
> >
> > the folw is like this:
> >
> > if usercall for this JSP page instaed to direct user directly to this
> page
> > i m calling an action which is preaparing a list for the <s:select> tag
> > and then it is forwarding the user to this page.
> >
> > Till now eveything is working fine,but when on this page user is
> entering
> > some values in the fields and hitting the submitting button,exception is
> > being thrown which is saying that:
> >
> >
> > select', field 'list', name 'code': The requested list key 'ItemCode'
> could
> > not be resolved as a collection/array/map/enumeration/iterator type.
> > Example: people or people.{name} - [unknown location]
> >
> > because i thik it is unable to call the action again which is returning
> the
> > list...is theer any way to call that action each time when user is
> > submitting the value..
> >
> >
> >
> > any pointer in this regard will be much appriciated.
> >
> > -aum
>
>
>
> 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.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment: user_184716.ezm (zipped)
Aum,

After you retrieve the list in your action, save it in session using

session.put("mySelectionList", list);

Then in your jsp, use the list in session for s:selection.

 <s:select name="mysSelection" cssClass="large" value="selectedValue"
        list="%{#session.mySelectionList}" listKey="value"
        listValue="label" />

Hope this helps,

Jane

-----Original Message-----
From: aum strut [mailto:aum.struts@(protected)]
Sent: Thursday, March 27, 2008 1:08 PM
To: Struts Users Mailing List
Subject: Re: Calling Action on form load

Jane,

can you just give me a brief aidea about (or even if u can a demo code )
how
u put ur list in to the action.

that will be of gr8 help

--aum


On 3/27/08, Randy Burgess <RBurgess@(protected):
>
> Use the <s:action> tag.
>
> http://struts.apache.org/2.x/docs/action.html
>
> Regards,
> Randy Burgess
> Sr. Web Applications Developer
> Nuvox Communications
>
>
>
> > From: aum strut <aum.struts@(protected)>
> > Reply-To: Struts Users Mailing List <user@(protected)>
> > Date: Thu, 27 Mar 2008 22:04:04 +0530
> > To: Struts Users Mailing List <user@(protected)>
> > Subject: Calling Action on form load
> >
> > Hi all,
> >
> > is it possible to call an action in struts2 everytime when the page
get
> > loaded if yes how it is possible.
> > my problem is i am using <s:select> tag and using a list to pupulate
> this
> > drop down this list is coming from the action which i m calling
before
> the
> > page is being displayed.
> >
> > the folw is like this:
> >
> > if usercall for this JSP page instaed to direct user directly to
this
> page
> > i m calling an action which is preaparing a list for the <s:select>
tag
> > and then it is forwarding the user to this page.
> >
> > Till now eveything is working fine,but when on this page user is
> entering
> > some values in the fields and hitting the submitting
button,exception is
> > being thrown which is saying that:
> >
> >
> > select', field 'list', name 'code': The requested list key
'ItemCode'
> could
> > not be resolved as a collection/array/map/enumeration/iterator type.
> > Example: people or people.{name} - [unknown location]
> >
> > because i thik it is unable to call the action again which is
returning
> the
> > list...is theer any way to call that action each time when user is
> > submitting the value..
> >
> >
> >
> > any pointer in this regard will be much appriciated.
> >
> > -aum
>
>
>
> 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.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment: user_184717.ezm (zipped)
Hi Sharath,

I am not quit sure, but I think it might help if you simply remove the
<s:head /> tag. You see dojo is already configured inside of struts
(inside the core jar and static folder or so) to be used with it's tags
http://struts.apache.org/2.x/docs/tag-reference.html . Since you are not
using any of those you can just remove the <s:head />. This is what the
head template looks like:
http://struts.apache.org/2.x/docs/ajax-head-template.html

You should thought consider using the struts2 tags.

If you plan not to do so or you want to use a newer version of dojo
since struts is a little behind you need to configure your web.xml file,
as I believe, to use the static filter right to point to the location of
your ajax files:

<filter>
    <filter-name>staticFilter</filter-name>
    <filter-class>com.bitpitch.webapp.filter.StaticFilter</filter-class>
    <init-param>
       <param-name>includes</param-name>
       <param-value>/scripts/dojo/*,/dwr/*</param-value>
    </init-param>
  </filter>

regards

sharath karnati schrieb:
> Hi All,
>
>   Please find 'test4Dialog.jsp' in attachment. This .jsp file is
> placed inside /WEB-INF/pages directory.
>
>   When I'm accessing this .jsp with
> (http://localhost:7001/hibernate/pages/test4Dialog.jsp), it is
> displaying 'dijit.TooltipDialog' correctly.
>
>   The same page I configured in struts2 action with below code
>    
>       <action name="Dojo">
>         <result>/pages/test4Dialog.jsp</result>
>       </action>
>
>   When I try to access this page with
> URL(http://localhost:7001/hibernate/events/Dojo.action), I'm getting
> below error message in firefox console.
>
> dojo is not defined
>  dojo.require("dojo.parser");
>
> I didn't place any dojo plugin jar files in my library? I think
> struts2 is supporting Dojo inclusively.
>
> If I need to install Dojo plugin to correct this problem then where I
> can find this .jar file(dojo plugin)?
>
>  Please let me know, how to correct this problem.
>
> Have a nice day.
>
> Thanks,
> Sharath.
>
>
>
> ------------------------------------------------------------------------
> Looking for last minute shopping deals? Find them fast with Yahoo!
> Search.
> <http://us.rd.yahoo.com/evt=51734/*http://tools.search.yahoo.com/newsearch/category.php?category=shopping>
>
> ------------------------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)


Attachment: user_184718.ezm (zipped)
Hello,

I am trying to add a cssStyle to my <s:submit> button - that includes an
<s:url> :

<s:submit value="%{getText('healthe.admin.edit.template')}"
cssClass="previewToggle" cssStyle="background: #F6F6F6 url(<s:url
value="/images/edit-small.png" />) no-repeat;" action="cancelPreview"
onclick="skipAlert(this);" />

However, it appears that the <s:submit> tag does not like the <s:url> inside
the cssStyle property ... if this is the case, could anyone point me to the
where i would modify the tag to support this?

--
Brian

Attachment: user_184719.ezm (zipped)
hi

i've a problem with action chaining. i've defined a xml action in a xml
file called struts-ordini.xml with the following result

<result name="input" type="redirect-action">ResiSelection</result>

the target action is in another xml file that is imported before the
"struts-ordini.xml".
i can't understand why the chaining fails, reloading the page as per
"success" without even giving any error.

thanks for your time and help






Attachment: user_184720.ezm (zipped)
mpaschke wrote:
> I'm having a problem with using Struts2 and Spring with Weblogic9.1. When I
> deploy the application as an exploded directory, no problem. Struts2
> autowires without a problem. When I deploy as a WAR, with NO other changes,
> autowire can't find the beans. Is there some special classpath setting I'm
> missing, something I need to change when deploying as a war?
>
> I have the basic settings correct (I think)
>
> struts.properties:
> struts.objectFactory=spring
> struts.objectFactory.spring.autoWire=name
> struts.objectFactory.spring.useClassCache=true
>
> application-context.xml:
> <beans default-autowire="autodetect">
> ....

If the application works OK as an expanded WAR, I would suspect a WL
configuration issue rather than a Struts configuration issue.
Unfortunately I don't know WL so I can't offer specific advise. Maybe
someone else who uses it can point you in the right direction.

L.


Attachment: user_184721.ezm (zipped)
Would:


<s:url id="editSmall" value="/images/edit-small.png" />

<s:submit value="%{getText('healthe.admin.edit.template')}"
cssClass="previewToggle" cssStyle="background: #F6F6F6 url(%{editSmall})
no-repeat;" action="cancelPreview"
onclick="skipAlert(this);" />


not work?

-----Original Message-----
From: Brian Relph [mailto:relphie@(protected)]
Sent: Thursday, March 27, 2008 2:33 PM
To: Struts Users Mailing List
Subject: s:submit and cssStyle

Hello,

I am trying to add a cssStyle to my <s:submit> button - that includes an
<s:url> :

<s:submit value="%{getText('healthe.admin.edit.template')}"
cssClass="previewToggle" cssStyle="background: #F6F6F6 url(<s:url
value="/images/edit-small.png" />) no-repeat;" action="cancelPreview"
onclick="skipAlert(this);" />

However, it appears that the <s:submit> tag does not like the <s:url> inside
the cssStyle property ... if this is the case, could anyone point me to the
where i would modify the tag to support this?

--
Brian



Attachment: user_184722.ezm (zipped)

How can you get hold of the constants defined in the struts.xml?

 

 



 


Matthew Seaborn

Software Architect
t    +44(0) 208 484 0729
m  +44(0) 7949 465 142

e   matthew.seaborn@performgroup.com


Sussex House
Plane Tree Crescent
Feltham, Middlesex, TW13 7HE
United Kingdom
http://www.performgroup.com/

 

 


________________________________________________________________________

CONFIDENTIALITY - This email and any files transmitted with it, are confidential, may be legally privileged and are intended solely for the use of the individual or entity to whom they are addressed. If this has come to you in error, you must not copy, distribute, disclose or use any of the information it contains. Please notify the sender immediately and delete them from your system.

SECURITY - Please be aware that communication by email, by its very nature, is not 100% secure and by communicating with Perform Group by email you consent to us monitoring and reading any such correspondence.

VIRUSES - Although this email message has been scanned for the presence of computer viruses, the sender accepts no liability for any damage sustained as a result of a computer virus and it is the recipient’s responsibility to ensure that email is virus free.

AUTHORITY - Any views or opinions expressed in this email are solely those of the sender and do not necessarily represent those of Perform Group.

COPYRIGHT - Copyright of this email and any attachments belongs to Perform Group, Companies House Registration number 6324278.

Attachment: user_184723.ezm (zipped)

Hello,
----I have posted the same problem in a previous thread, yet got no reply,
but I'm really stuck with it and spending days trying to solve it, in
vain... ----

I have two actions: editFeature and saveFeature. Whereas editFeature should
submit successfuly to saveFeature the latter performs and redirects
transparently to editFeature again. This is ok using redirect-action.

But in case when validation fails after submission, I get back to
editFeature without error messages lost.
I read a previous thread talkin about the same problem and giving a
satisfying solution with the store interceptor, though I could not come to
solve my problem.
Here is my struts actions:
pst: the store interceptor tags do not show correctly in this thread.

<action name="editFeature"
class="com.intelligile.lms.webapp.action.FeatureAction" method="edit">
               <interceptor-ref name="defaultStack" />
               <interceptor-ref name="store">
                    RETRIEVE
               </interceptor-ref>
       <result>/WEB-INF/pages/featureForm.jsp</result>
       <result name="error">/WEB-INF/pages/featureList.jsp</result>
    </action>
    <action name="saveFeature"
class="com.intelligile.lms.webapp.action.FeatureAction" method="save">
               <interceptor-ref name="defaultStack" />
               <interceptor-ref name="store">
                    STORE
               </interceptor-ref>
       <result name="success" type="redirect">features.html</result>
       <result name="input" type="redirect-action">
                    editFeature.html
                    true
                    ${feature.dkey}
               </result>
    </action>

Please help me figure out where the problem exists.
Thank you for your support.
Best regards.
--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_184724.ezm (zipped)

Hello,
----I have posted the same problem in a previous thread, yet got no reply,
but I'm really stuck with it and spending days trying to solve it, in
vain... ----

I have two actions: editFeature and saveFeature. Whereas editFeature should
submit successfuly to saveFeature the latter performs and redirects
transparently to editFeature again. This is ok using redirect-action.

But in case when validation fails after submission, I get back to
editFeature with all error messages lost.
I read a previous thread talkin about the same problem and giving a
satisfying solution with the store interceptor, though I could not come to
solve my problem.
Here is my struts actions:
pst: the store interceptor tags do not show correctly in this thread.

<action name="editFeature"
class="com.intelligile.lms.webapp.action.FeatureAction" method="edit">
               <interceptor-ref name="defaultStack" />
               <interceptor-ref name="store">
                    RETRIEVE
               </interceptor-ref>
       <result>/WEB-INF/pages/featureForm.jsp</result>
       <result name="error">/WEB-INF/pages/featureList.jsp</result>
    </action>
    <action name="saveFeature"
class="com.intelligile.lms.webapp.action.FeatureAction" method="save">
               <interceptor-ref name="defaultStack" />
               <interceptor-ref name="store">
                    STORE
               </interceptor-ref>
       <result name="success" type="redirect">features.html</result>
       <result name="input" type="redirect-action">
                    editFeature.html
                    true
                    ${feature.dkey}
               </result>
    </action>

Please help me figure out where the problem exists.
Thank you for your support.
Best regards.
--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_184725.ezm (zipped)

Hello,
----I have posted the same problem in a previous thread, yet got no reply,
but I'm really stuck with it and spending days trying to solve it, in
vain... ----

I have two actions: editFeature and saveFeature. Whereas editFeature should
submit successfuly to saveFeature the latter performs and redirects
transparently to editFeature again. This is ok using redirect-action.

But in case when validation fails after submission, I get back to
editFeature with all error messages lost.
I read a previous thread talkin about the same problem and giving a
satisfying solution with the store interceptor, though I could not come to
solve my problem.
Here is my struts actions:
pst: the store interceptor tags do not show correctly in this thread.

<action name="editFeature"
class="com.intelligile.lms.webapp.action.FeatureAction" method="edit">
               <interceptor-ref name="defaultStack" />
               <interceptor-ref name="store">
                    RETRIEVE
               </interceptor-ref>
       <result>/WEB-INF/pages/featureForm.jsp</result>
       <result name="error">/WEB-INF/pages/featureList.jsp</result>
    </action>

    <action name="saveFeature"
class="com.intelligile.lms.webapp.action.FeatureAction" method="save">
               <interceptor-ref name="defaultStack" />
               <interceptor-ref name="store">
                    STORE
               </interceptor-ref>
       <result name="success" type="redirect">features.html</result>
       <result name="input" type="redirect-action">
                    editFeature.html
                    true
                    ${feature.dkey}
               </result>
    </action>

Please help me figure out where the problem exists.
Thank you for your support.
Best regards.
--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_184726.ezm (zipped)

Hello,
----I have posted the same problem in a previous thread, yet got no reply,
but I'm really stuck with it and spending days trying to solve it, in
vain... ----

I have two actions: editFeature and saveFeature. Whereas editFeature should
submit successfuly to saveFeature the latter performs and redirects
transparently to editFeature again. This is ok using redirect-action.

But in case when validation fails after submission, I get back to
editFeature with all error messages lost.
I read a previous thread talkin about the same problem and giving a
satisfying solution with the store interceptor, though I could not come to
solve my problem.
Here is my struts actions:
pst: the store interceptor tags do not show correctly in this thread.

<action name="editFeature"
class="com.intelligile.lms.webapp.action.FeatureAction" method="edit">
               <interceptor-ref name="defaultStack" />
               <interceptor-ref name="store">
                    RETRIEVE
               </interceptor-ref>
       <result>/WEB-INF/pages/featureForm.jsp</result>
       <result name="error">/WEB-INF/pages/featureList.jsp</result>
    </action>

    <action name="saveFeature"
class="com.intelligile.lms.webapp.action.FeatureAction" method="save">
               <interceptor-ref name="defaultStack" />
               <interceptor-ref name="store">
                    STORE
               </interceptor-ref>
       <result name="success" type="redirect">features.html</result>
       <result name="input" type="redirect-action">
                    editFeature.html
                    true
                    ${feature.dkey}
               </result>
    </action>

Please help me figure out where the problem exists.
Thank you for your support.
Best regards.
--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_184727.ezm (zipped)

Hello,
----I have posted the same problem in a previous thread, yet got no reply,
but I'm really stuck with it and spending days trying to solve it, in
vain... ----

I have two actions: editFeature and saveFeature. Whereas editFeature should
submit successfuly to saveFeature the latter performs and redirects
transparently to editFeature again. This is ok using redirect-action.

But in case when validation fails after submission, I get back to
editFeature with all error messages lost.
I read a previous thread talkin about the same problem and giving a
satisfying solution with the store interceptor, though I could not come to
solve my problem.
Here is my struts actions:
pst: the store interceptor tags do not show correctly in this thread.

<action name="editFeature"
class="com.intelligile.lms.webapp.action.FeatureAction" method="edit">
               <interceptor-ref name="defaultStack" />
               <interceptor-ref name="store">
                    RETRIEVE
               </interceptor-ref>
       <result>/WEB-INF/pages/featureForm.jsp</result>
       <result name="error">/WEB-INF/pages/featureList.jsp</result>
    </action>

    <action name="saveFeature"
class="com.intelligile.lms.webapp.action.FeatureAction" method="save">
               <interceptor-ref name="defaultStack" />
               <interceptor-ref name="store">
                    STORE
               </interceptor-ref>
       <result name="success" type="redirect">features.html</result>
       <result name="input" type="redirect-action">
                    editFeature.html
                    true
                    ${feature.dkey}
               </result>
    </action>

Please help me figure out where the problem exists.
Thank you for your support.
Best regards.
--
Sent from the Struts - User mailing list archive at Nabble.com.

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