Java Mailing List Archive

http://www.gg3721.com/

Home » Struts Users Mailing List »

user Digest 29 Dec 2009 15:59:00 -0000 Issue 8970

user-digest-help

2009-12-29


Author LoginPost Reply

user Digest 29 Dec 2009 15:59:00 -0000 Issue 8970

Topics (messages 204420 through 204449):

Re: Forwarding to a Java Application
 204420 by: Rafael Muneton
 204422 by: Saeed Iqbal

Clear text while using File Upload in Struts2
 204421 by: Mageshwaran
 204423 by: Saeed Iqbal
 204424 by: Mageshwaran
 204425 by: Saeed Iqbal
 204426 by: Rafael Taboada
 204429 by: vineith kaul
 204430 by: Rafael Taboada
 204440 by: Saeed Iqbal

Example of dumping the valuestack?
 204427 by: Jim Collings
 204428 by: Greg Lindholm
 204431 by: Stephen Turner
 204432 by: Musachy Barroso

[Struts 2.1.8] Dependency injection and Struts actions
 204433 by: Celinio Fernandes

focusElement in s:form
 204434 by: CRANFORD, CHRIS
 204435 by: Dale Newfield
 204436 by: CRANFORD, CHRIS
 204437 by: Dale Newfield
 204438 by: CRANFORD, CHRIS
 204439 by: Dale Newfield
 204442 by: CRANFORD, CHRIS
 204443 by: CRANFORD, CHRIS
 204445 by: Wes Wannemacher

An update to StartSoft
 204441 by: Saeed Iqbal
 204444 by: Frans Thamura

Getting unexpected ActionInvocation
 204446 by: Steve Mitchell
 204447 by: Wes Wannemacher
 204449 by: Steve Mitchell

Re: <s:Date> and timeZone
 204448 by: Sanjay Patel

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

Hi Wes:



Thanks for your answer.

I am a little bit confused now.

What I am trying to do is uncommon?????

The fact that I want to launch a Java class(Nor a Servlet) from a Java Server Page is something odd???

Or is it against the rules of Struts????

The question is now ===> How would you do something like that????



Thanks again.



Rafael.

> Date: Thu, 24 Dec 2009 13:48:49 -0500
> Subject: Re: Forwarding to a Java Application
> From: wesw@(protected)
> To: user@(protected)
>
> On Thu, Dec 24, 2009 at 12:52 PM, Rafael Muneton
> <rafael_muneton@(protected):
> >
> > Hi Vitor:
> >
> > What I am trying to achieve is that , after a user can log in to the Web Application, this user receives the MainMenu screen of the Application, where there are several options, that he/she can choose from.This MainMenu is a Java application not a Servlet.
> >
> > And after reading your answer, I think that maybe I need to upgrade to Struts 2.
> >
> > I am using Struts 1.1
> >
>
> I don't think an upgrade is necessary. I think you just need to
> understand a little better how things work in a JSP/Servlet
> environment... The page that launches the MainMenu application is
> bound to have either an <applet... or <object... tag. It has been a
> while for me, I can't remember which. But, if there is information
> that needs passed to the MainMenu, then you need to make that
> information into params. Then, when the page that launches the
> MainMenu is rendered, pass the information to the MainMenu by
> rendering the appropriate <param... tags.
>
> -Wes
>
>
>
> --
> 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)
>
           
_________________________________________________________________
Windows Live: Keep your friends up to date with what you do online.
http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_1:092010

Attachment: user_204422.ezm (zipped)
An action bean is similar to a java bean

just point in struts xml the java bean name

On Monday, December 28, 2009, Rafael Muneton <rafael_muneton@(protected):
>
> Hi Wes:
>
>
>
> Thanks for your answer.
>
> I am a little bit confused now.
>
> What I am trying to do is uncommon?????
>
> The fact that I want to launch a Java class(Nor a Servlet) from a Java Server Page is something odd???
>
> Or is it against the rules of Struts????
>
> The question is now ===>  How would you do something like that????
>
>
>
> Thanks again.
>
>
>
> Rafael.
>
>> Date: Thu, 24 Dec 2009 13:48:49 -0500
>> Subject: Re: Forwarding to a Java Application
>> From: wesw@(protected)
>> To: user@(protected)
>>
>> On Thu, Dec 24, 2009 at 12:52 PM, Rafael Muneton
>> <rafael_muneton@(protected):
>> >
>> > Hi Vitor:
>> >
>> > What I am trying to achieve is that , after a user can log in to the Web Application, this user receives the MainMenu screen of the Application, where there are several options, that he/she can choose from.This MainMenu is a Java application not a Servlet.
>> >
>> > And after reading your answer, I think that maybe I need to upgrade to Struts 2.
>> >
>> > I am using Struts 1.1
>> >
>>
>> I don't think an upgrade is necessary. I think you just need to
>> understand a little better how things work in a JSP/Servlet
>> environment... The page that launches the MainMenu application is
>> bound to have either an <applet... or <object... tag. It has been a
>> while for me, I can't remember which. But, if there is information
>> that needs passed to the MainMenu, then you need to make that
>> information into params. Then, when the page that launches the
>> MainMenu is rendered, pass the information to the MainMenu by
>> rendering the appropriate <param... tags.
>>
>> -Wes
>>
>>
>>
>> --
>> 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)
>>
>
> _________________________________________________________________
> Windows Live: Keep your friends up to date with what you do online.
> http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_1:092010

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


Attachment: user_204421.ezm (zipped)
Hi All,
    In my jsp code i had used "<s:file name="uploadFile"
label="File" size="20" onkeypress = "killEvent(event)"/>" for file
upload using IFrame.

The issue is if i select a file using file dialog, there is no option to
clear the selected text. Can any one help me how to clear the uploaded
file path text?

Thanks in Advance,
Magesh.




Attachment: user_204423.ezm (zipped)
It gets submitted after post

if you want to clear maybe use javascript to clear

On Monday, December 28, 2009, Mageshwaran <mageshwaran@(protected):
> Hi All,
>       In my jsp code i had used "<s:file name="uploadFile" label="File" size="20" onkeypress = "killEvent(event)"/>" for file upload using IFrame.
>
> The issue is if i select a file using file dialog, there is no option to clear the selected text. Can any one help me how to clear the uploaded file path text?
>
> Thanks in Advance,
> Magesh.
>
>
>
>

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


Attachment: user_204424.ezm (zipped)
I have not submitted the form.
I just only selected the file using file dialog.

It would be helpful if you give the code snippet to implement in Java
Script.

Magesh.


Saeed Iqbal wrote:
> It gets submitted after post
>
> if you want to clear maybe use javascript to clear
>
> On Monday, December 28, 2009, Mageshwaran <mageshwaran@(protected):
>  
>> Hi All,
>>     In my jsp code i had used "<s:file name="uploadFile" label="File" size="20" onkeypress = "killEvent(event)"/>" for file upload using IFrame.
>>
>> The issue is if i select a file using file dialog, there is no option to clear the selected text. Can any one help me how to clear the uploaded file path text?
>>
>> Thanks in Advance,
>> Magesh.
>>
>>
>>
>>
>>  
>
>  


Attachment: user_204425.ezm (zipped)
If you have not submitted the form and you want this functionality
then you are talking about ajax file upload

struts doesnt provide ajax file upload but you can do that in struts
using other libraries

On Monday, December 28, 2009, Mageshwaran <mageshwaran@(protected):
> I have not submitted the form.
> I just only selected the file using file dialog.
>
> It would be helpful if you give the code snippet to implement in Java Script.
>
> Magesh.
>
>
> Saeed Iqbal wrote:
>
> It gets submitted after post
>
> if you want to clear maybe use javascript to clear
>
> On Monday, December 28, 2009, Mageshwaran <mageshwaran@(protected):
>
>
> Hi All,
>       In my jsp code i had used "<s:file name="uploadFile" label="File" size="20" onkeypress = "killEvent(event)"/>" for file upload using IFrame.
>
> The issue is if i select a file using file dialog, there is no option to clear the selected text. Can any one help me how to clear the uploaded file path text?
>
> Thanks in Advance,
> Magesh.
>
>
>
>
>
>
>
>
>
>
>

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


Attachment: user_204426.ezm (zipped)
Puedes usar javascript:

function limpiarText(){
 var idUpload=document.getElementById("idUpload");
 var frm=document.getElementById("frm");
 idUpload.setAttribute("value","");
 frm.reset();
}


<s:form id="frm" action="doUploadFile" method="post"
enctype="multipart/form-data">
 <input name="upload" id="idUpload" type="file" class="file" size="1"
onclick="limpiarText()" />
    </s:form>
On Mon, Dec 28, 2009 at 2:12 AM, Saeed Iqbal <saeedcs@(protected):

> If you have not submitted the form and you want this functionality
> then you are talking about ajax file upload
>
> struts doesnt provide ajax file upload but you can do that in struts
> using other libraries
>
> On Monday, December 28, 2009, Mageshwaran <mageshwaran@(protected):
> > I have not submitted the form.
> > I just only selected the file using file dialog.
> >
> > It would be helpful if you give the code snippet to implement in Java
> Script.
> >
> > Magesh.
> >
> >
> > Saeed Iqbal wrote:
> >
> > It gets submitted after post
> >
> > if you want to clear maybe use javascript to clear
> >
> > On Monday, December 28, 2009, Mageshwaran <mageshwaran@(protected)>
> wrote:
> >
> >
> > Hi All,
> >     In my jsp code i had used "<s:file name="uploadFile" label="File"
> size="20" onkeypress = "killEvent(event)"/>" for file upload using IFrame.
> >
> > The issue is if i select a file using file dialog, there is no option to
> clear the selected text. Can any one help me how to clear the uploaded file
> path text?
> >
> > Thanks in Advance,
> > Magesh.
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
>
> --
> Saeed Iqbal
> Independant Consultant
> J2EE - Application Architect / Developer
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>


--
Rafael Taboada
Software Engineer

Cell : +511-992741026

"No creo en el destino pues no me gusta tener la idea de controlar mi vida"

Attachment: user_204429.ezm (zipped)
If I understand your question right, I think a reset button should do the
job right ?

something like this:

<input type="reset" value='Clear Input' name="reset1"
onclick="doReset(document.listForm);return false">

Vineith

On Mon, Dec 28, 2009 at 6:16 AM, Rafael Taboada
<kaliman.forever@(protected):

> Puedes usar javascript:
>
> function limpiarText(){
>  var idUpload=document.getElementById("idUpload");
>  var frm=document.getElementById("frm");
>  idUpload.setAttribute("value","");
>  frm.reset();
> }
>
>
> <s:form id="frm" action="doUploadFile" method="post"
> enctype="multipart/form-data">
>  <input name="upload" id="idUpload" type="file" class="file" size="1"
> onclick="limpiarText()" />
>     </s:form>
> On Mon, Dec 28, 2009 at 2:12 AM, Saeed Iqbal <saeedcs@(protected):
>
> > If you have not submitted the form and you want this functionality
> > then you are talking about ajax file upload
> >
> > struts doesnt provide ajax file upload but you can do that in struts
> > using other libraries
> >
> > On Monday, December 28, 2009, Mageshwaran <mageshwaran@(protected)>
> wrote:
> > > I have not submitted the form.
> > > I just only selected the file using file dialog.
> > >
> > > It would be helpful if you give the code snippet to implement in Java
> > Script.
> > >
> > > Magesh.
> > >
> > >
> > > Saeed Iqbal wrote:
> > >
> > > It gets submitted after post
> > >
> > > if you want to clear maybe use javascript to clear
> > >
> > > On Monday, December 28, 2009, Mageshwaran <mageshwaran@(protected)>
> > wrote:
> > >
> > >
> > > Hi All,
> > >     In my jsp code i had used "<s:file name="uploadFile"
> label="File"
> > size="20" onkeypress = "killEvent(event)"/>" for file upload using
> IFrame.
> > >
> > > The issue is if i select a file using file dialog, there is no option
> to
> > clear the selected text. Can any one help me how to clear the uploaded
> file
> > path text?
> > >
> > > Thanks in Advance,
> > > Magesh.
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> >
> > --
> > Saeed Iqbal
> > Independant Consultant
> > J2EE - Application Architect / Developer
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > For additional commands, e-mail: user-help@(protected)
> >
> >
>
>
> --
> Rafael Taboada
> Software Engineer
>
> Cell : +511-992741026
>
> "No creo en el destino pues no me gusta tener la idea de controlar mi vida"
>

Attachment: user_204430.ezm (zipped)
u can change the event to onchange for example... code shows onclick because
I have another button above the file upload to change its style. but the
main idea is to clear the value like javascript function shows

On Mon, Dec 28, 2009 at 11:11 AM, vineith kaul <vineith@(protected):

> If I understand your question right, I think a reset button should do the
> job right ?
>
> something like this:
>
> <input type="reset" value='Clear Input' name="reset1"
> onclick="doReset(document.listForm);return false">
>
> Vineith
>
> On Mon, Dec 28, 2009 at 6:16 AM, Rafael Taboada
> <kaliman.forever@(protected):
>
> > Puedes usar javascript:
> >
> > function limpiarText(){
> >  var idUpload=document.getElementById("idUpload");
> >  var frm=document.getElementById("frm");
> >  idUpload.setAttribute("value","");
> >  frm.reset();
> > }
> >
> >
> > <s:form id="frm" action="doUploadFile" method="post"
> > enctype="multipart/form-data">
> >  <input name="upload" id="idUpload" type="file" class="file" size="1"
> > onclick="limpiarText()" />
> >     </s:form>
> > On Mon, Dec 28, 2009 at 2:12 AM, Saeed Iqbal <saeedcs@(protected):
> >
> > > If you have not submitted the form and you want this functionality
> > > then you are talking about ajax file upload
> > >
> > > struts doesnt provide ajax file upload but you can do that in struts
> > > using other libraries
> > >
> > > On Monday, December 28, 2009, Mageshwaran <mageshwaran@(protected)>
> > wrote:
> > > > I have not submitted the form.
> > > > I just only selected the file using file dialog.
> > > >
> > > > It would be helpful if you give the code snippet to implement in Java
> > > Script.
> > > >
> > > > Magesh.
> > > >
> > > >
> > > > Saeed Iqbal wrote:
> > > >
> > > > It gets submitted after post
> > > >
> > > > if you want to clear maybe use javascript to clear
> > > >
> > > > On Monday, December 28, 2009, Mageshwaran <mageshwaran@(protected)>
> > > wrote:
> > > >
> > > >
> > > > Hi All,
> > > >     In my jsp code i had used "<s:file name="uploadFile"
> > label="File"
> > > size="20" onkeypress = "killEvent(event)"/>" for file upload using
> > IFrame.
> > > >
> > > > The issue is if i select a file using file dialog, there is no option
> > to
> > > clear the selected text. Can any one help me how to clear the uploaded
> > file
> > > path text?
> > > >
> > > > Thanks in Advance,
> > > > Magesh.
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > > --
> > > Saeed Iqbal
> > > Independant Consultant
> > > J2EE - Application Architect / Developer
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > > For additional commands, e-mail: user-help@(protected)
> > >
> > >
> >
> >
> > --
> > Rafael Taboada
> > Software Engineer
> >
> > Cell : +511-992741026
> >
> > "No creo en el destino pues no me gusta tener la idea de controlar mi
> vida"
> >
>



--
Rafael Taboada
Software Engineer

Cell : +511-992741026

"No creo en el destino pues no me gusta tener la idea de controlar mi vida"

Attachment: user_204440.ezm (zipped)
The major thing you would want is to have the selected file uploaded to the
server first before clear.

Think in that direction, maybe.

On Mon, Dec 28, 2009 at 9:14 PM, Rafael Taboada
<kaliman.forever@(protected):

> u can change the event to onchange for example... code shows onclick
> because
> I have another button above the file upload to change its style. but the
> main idea is to clear the value like javascript function shows
>
> On Mon, Dec 28, 2009 at 11:11 AM, vineith kaul <vineith@(protected):
>
> > If I understand your question right, I think a reset button should do the
> > job right ?
> >
> > something like this:
> >
> > <input type="reset" value='Clear Input' name="reset1"
> > onclick="doReset(document.listForm);return false">
> >
> > Vineith
> >
> > On Mon, Dec 28, 2009 at 6:16 AM, Rafael Taboada
> > <kaliman.forever@(protected):
> >
> > > Puedes usar javascript:
> > >
> > > function limpiarText(){
> > >  var idUpload=document.getElementById("idUpload");
> > >  var frm=document.getElementById("frm");
> > >  idUpload.setAttribute("value","");
> > >  frm.reset();
> > > }
> > >
> > >
> > > <s:form id="frm" action="doUploadFile" method="post"
> > > enctype="multipart/form-data">
> > >  <input name="upload" id="idUpload" type="file" class="file" size="1"
> > > onclick="limpiarText()" />
> > >     </s:form>
> > > On Mon, Dec 28, 2009 at 2:12 AM, Saeed Iqbal <saeedcs@(protected)>
> wrote:
> > >
> > > > If you have not submitted the form and you want this functionality
> > > > then you are talking about ajax file upload
> > > >
> > > > struts doesnt provide ajax file upload but you can do that in struts
> > > > using other libraries
> > > >
> > > > On Monday, December 28, 2009, Mageshwaran <mageshwaran@(protected)>
> > > wrote:
> > > > > I have not submitted the form.
> > > > > I just only selected the file using file dialog.
> > > > >
> > > > > It would be helpful if you give the code snippet to implement in
> Java
> > > > Script.
> > > > >
> > > > > Magesh.
> > > > >
> > > > >
> > > > > Saeed Iqbal wrote:
> > > > >
> > > > > It gets submitted after post
> > > > >
> > > > > if you want to clear maybe use javascript to clear
> > > > >
> > > > > On Monday, December 28, 2009, Mageshwaran <mageshwaran@(protected)
> >
> > > > wrote:
> > > > >
> > > > >
> > > > > Hi All,
> > > > >     In my jsp code i had used "<s:file name="uploadFile"
> > > label="File"
> > > > size="20" onkeypress = "killEvent(event)"/>" for file upload using
> > > IFrame.
> > > > >
> > > > > The issue is if i select a file using file dialog, there is no
> option
> > > to
> > > > clear the selected text. Can any one help me how to clear the
> uploaded
> > > file
> > > > path text?
> > > > >
> > > > > Thanks in Advance,
> > > > > Magesh.
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > > --
> > > > Saeed Iqbal
> > > > Independant Consultant
> > > > J2EE - Application Architect / Developer
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > > > For additional commands, e-mail: user-help@(protected)
> > > >
> > > >
> > >
> > >
> > > --
> > > Rafael Taboada
> > > Software Engineer
> > >
> > > Cell : +511-992741026
> > >
> > > "No creo en el destino pues no me gusta tener la idea de controlar mi
> > vida"
> > >
> >
>
>
>
> --
> Rafael Taboada
> Software Engineer
>
> Cell : +511-992741026
>
> "No creo en el destino pues no me gusta tener la idea de controlar mi vida"
>



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

Attachment: user_204427.ezm (zipped)
I'm having some trouble finding things due to some arcane code. Was
wondering if anyone could provide me with an example of dumping the
valuestack to the jsp so that I can take a look?


Jim C.

P.S. I've probably asked this before but I can't seem to find it via
searching. Reminder anyone?


Attachment: user_204428.ezm (zipped)
You can include the <s:debug> tag on your jsp page.

On Mon, Dec 28, 2009 at 7:38 AM, Jim Collings <jlistnews@(protected):
> I'm having some trouble finding things due to some arcane code.  Was
> wondering if anyone could provide me with an example of dumping the
> valuestack to the jsp so that I can take a look?
>
>
> Jim C.
>
> P.S. I've probably asked this before but I can't seem to find it via
> searching. Reminder anyone?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>


Attachment: user_204431.ezm (zipped)

On Mon, 28 Dec 2009 07:38:38 -0500, Jim Collings <jlistnews@(protected)>
wrote:

> I'm having some trouble finding things due to some arcane code. Was
> wondering if anyone could provide me with an example of dumping the
> valuestack to the jsp so that I can take a look?
>
>
> Jim C.
>
> P.S. I've probably asked this before but I can't seem to find it via
> searching. Reminder anyone?

Jim,

Adding debug=xml to the URL will show the value stack as XML. I think you
need to have struts.devMode=true set in the struts config as well.

Steve


--
Stephen Turner
Senior Programmer/Analyst - SAIS
MIT IS&T


Attachment: user_204432.ezm (zipped)
if you add a debug=browse param and have the dojo plugin in the app,
you can browse the stack content.

On Mon, Dec 28, 2009 at 9:55 AM, Stephen Turner <sturner@(protected):
>
> On Mon, 28 Dec 2009 07:38:38 -0500, Jim Collings <jlistnews@(protected)>
> wrote:
>
>> I'm having some trouble finding things due to some arcane code.  Was
>> wondering if anyone could provide me with an example of dumping the
>> valuestack to the jsp so that I can take a look?
>>
>>
>> Jim C.
>>
>> P.S. I've probably asked this before but I can't seem to find it via
>> searching. Reminder anyone?
>
> Jim,
>
> Adding debug=xml to the URL will show the value stack as XML. I think you
> need to have struts.devMode=true set in the struts config as well.
>
> Steve
>
>
> --
> Stephen Turner
> Senior Programmer/Analyst - SAIS
> MIT IS&T
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>


Attachment: user_204433.ezm (zipped)
Hi,
I have a question about dependency injection in Struts 2 actions.
Dependency injection (JSR 330) is integrated in Java EE 6 which has become final a couple of weeks ago.

Struts actions are not managed objects but is there a way with some available dependency injection implementation to inject
a stateful session bean in a Struts action ?
If not, what would be needed to make it possible ?

Thanks.


   

Attachment: user_204434.ezm (zipped)

I have tried all combinations of values in the focusElement tag for
s:form yet I cannot get the textfield called username to be focused when
the JSP is rendered with my login web page. I have tried it both with
just the name of the textfield (userName) along with using the ID of the
element (login_userName) and neither have worked.

Is there anything special I could be missing here to get FF to focus on
the field when the page is rendered?




Attachment: user_204435.ezm (zipped)
CRANFORD, CHRIS wrote:
> Is there anything special I could be missing here to get FF to focus on
> the field when the page is rendered?

There's no magic. The only way for this to happen is by executing a
snippet of javascript in the browser. Therefore this will not work in a
browser that has javascript turned off, or on a page that has javascript
errors. I'd recommend using the "FireBug" plugin for FF and looking at
the console to see what's happening.

-Dale


Attachment: user_204436.ezm (zipped)

I have removed all javascript from the JSP page and installed Firebug.
No errors show up and Javascript is enabled. I get the same result in
IE as well where my form isn't focusing on my userName field.

Wonder what else it could be.

-----Original Message-----
From: Dale Newfield [mailto:dale@(protected)]
Sent: Monday, December 28, 2009 4:10 PM
To: Struts Users Mailing List
Subject: Re: focusElement in s:form

CRANFORD, CHRIS wrote:
> Is there anything special I could be missing here to get FF to focus
on
> the field when the page is rendered?

There's no magic. The only way for this to happen is by executing a
snippet of javascript in the browser. Therefore this will not work in a

browser that has javascript turned off, or on a page that has javascript

errors. I'd recommend using the "FireBug" plugin for FF and looking at
the console to see what's happening.

-Dale

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





Attachment: user_204437.ezm (zipped)
CRANFORD, CHRIS wrote:
> I have removed all javascript from the JSP page and installed Firebug.
> No errors show up and Javascript is enabled. I get the same result in
> IE as well where my form isn't focusing on my userName field.

So put a breakpoint on the javascript line that is making the focus()
call, and make sure it's getting executed and doing what it should.

-Dale


Attachment: user_204438.ezm (zipped)

I don't see any Javascript code in the Source file in the browser at
all. That's what is not making any sense to me for the form tag. It is
as if the focusElement doesn't cause the <s:form> tag to do anything at
all.

I would expect to see some <script> .... </script> stuff in the source
file that is rendered, correct?


-----Original Message-----
From: Dale Newfield [mailto:dale@(protected)]
Sent: Monday, December 28, 2009 4:38 PM
To: Struts Users Mailing List
Subject: Re: focusElement in s:form

CRANFORD, CHRIS wrote:
> I have removed all javascript from the JSP page and installed Firebug.
> No errors show up and Javascript is enabled. I get the same result in
> IE as well where my form isn't focusing on my userName field.

So put a breakpoint on the javascript line that is making the focus()
call, and make sure it's getting executed and doing what it should.

-Dale

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





Attachment: user_204439.ezm (zipped)
CRANFORD, CHRIS wrote:
> I don't see any Javascript code in the Source file in the browser at
> all. That's what is not making any sense to me for the form tag. It is
> as if the focusElement doesn't cause the <s:form> tag to do anything at
> all.
>
> I would expect to see some <script> .... </script> stuff in the source
> file that is rendered, correct?

Yes. Are you using a specific theme for your s: tags?

-Dale


Attachment: user_204442.ezm (zipped)
I do have in my struts.xml file the following defined:

<constant name="struts.ui.theme" value="simple"/>

Does this affect this?

-----Original Message-----
From: Dale Newfield [mailto:dale@(protected)]
Sent: Monday, December 28, 2009 4:56 PM
To: Struts Users Mailing List
Subject: Re: focusElement in s:form

CRANFORD, CHRIS wrote:
> I don't see any Javascript code in the Source file in the browser at
> all. That's what is not making any sense to me for the form tag. It
is
> as if the focusElement doesn't cause the <s:form> tag to do anything
at
> all.
>
> I would expect to see some <script> .... </script> stuff in the source
> file that is rendered, correct?

Yes. Are you using a specific theme for your s: tags?

-Dale

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





Attachment: user_204443.ezm (zipped)
It appears if I removed this line and additionally made sure that the
<s:head/> tag was inside my HTML <head>...</head> block that the
appropriate logic works and the StrutsUtil class is available and
focuses on my elements.

Now is there a way to avoid this extra <td class='tdLabel'></td> from
being decorated on my input fields? I suppose this is part of the
standard theme and sometimes the labels for my fields have to be
positioned in certain ways, not sure I want to use this particular
theme, ugh.



-----Original Message-----
From: CRANFORD, CHRIS [mailto:Chris.Cranford@(protected)]
Sent: Tuesday, December 29, 2009 8:15 AM
To: Struts Users Mailing List
Subject: RE: focusElement in s:form

I do have in my struts.xml file the following defined:

<constant name="struts.ui.theme" value="simple"/>

Does this affect this?

-----Original Message-----
From: Dale Newfield [mailto:dale@(protected)]
Sent: Monday, December 28, 2009 4:56 PM
To: Struts Users Mailing List
Subject: Re: focusElement in s:form

CRANFORD, CHRIS wrote:
> I don't see any Javascript code in the Source file in the browser at
> all. That's what is not making any sense to me for the form tag. It
is
> as if the focusElement doesn't cause the <s:form> tag to do anything
at
> all.
>
> I would expect to see some <script> .... </script> stuff in the source
> file that is rendered, correct?

Yes. Are you using a specific theme for your s: tags?

-Dale

---------------------------------------------------------------------
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_204445.ezm (zipped)
You have a few choices, you could write your own theme, but that would
be overkill for what you are trying to do... Although, I have found
that when people are using the simple theme, there is a good chance
that they are hand-rolling a theme outside of struts, which is okay,
but creating a theme is pretty easy and think of the work you'll save
later!

Other than themes, the easiest way to get to where you want would be
to simply write the Javascript yourself. Setting focus is a one-liner,
and what s:head spits out isn't particularly complex... So, just take
a look at the generated HTML and copy paste the pieces that you want.

-Wes

On Tue, Dec 29, 2009 at 9:34 AM, CRANFORD, CHRIS
<Chris.Cranford@(protected):
> It appears if I removed this line and additionally made sure that the
> <s:head/> tag was inside my HTML <head>...</head> block that the
> appropriate logic works and the StrutsUtil class is available and
> focuses on my elements.
>
> Now is there a way to avoid this extra <td class='tdLabel'></td> from
> being decorated on my input fields?  I suppose this is part of the
> standard theme and sometimes the labels for my fields have to be
> positioned in certain ways, not sure I want to use this particular
> theme, ugh.
>
>
>
> -----Original Message-----
> From: CRANFORD, CHRIS [mailto:Chris.Cranford@(protected)]
> Sent: Tuesday, December 29, 2009 8:15 AM
> To: Struts Users Mailing List
> Subject: RE: focusElement in s:form
>
> I do have in my struts.xml file the following defined:
>
>  <constant name="struts.ui.theme" value="simple"/>
>
> Does this affect this?
>
> -----Original Message-----
> From: Dale Newfield [mailto:dale@(protected)]
> Sent: Monday, December 28, 2009 4:56 PM
> To: Struts Users Mailing List
> Subject: Re: focusElement in s:form
>
> CRANFORD, CHRIS wrote:
>> I don't see any Javascript code in the Source file in the browser at
>> all.  That's what is not making any sense to me for the form tag.  It
> is
>> as if the focusElement doesn't cause the <s:form> tag to do anything
> at
>> all.
>>
>> I would expect to see some <script> .... </script> stuff in the source
>> file that is rendered, correct?
>
> Yes.  Are you using a specific theme for your s: tags?
>
> -Dale
>
> ---------------------------------------------------------------------
> 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)
>
>



--
Wes Wannemacher

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


Attachment: user_204441.ezm (zipped)
Good Day Folks,

I hope it would be OK to announce that I have released a new version of my
StartSoft application 0.9 http://code.google.com/p/startsoft/ Open Source.
Its Struts and Hibernate, but controlled by Spring.

Thanks,
-saeed

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

Attachment: user_204444.ezm (zipped)
any idea to make the controller is not controlled by Spring

like @Services and @Transaction more open to another tech outside Spring

F

On Tue, Dec 29, 2009 at 6:52 PM, Saeed Iqbal <saeedcs@(protected):

> Good Day Folks,
>
> I hope it would be OK to announce that I have released a new version of my
> StartSoft application 0.9 http://code.google.com/p/startsoft/ Open Source.
> Its Struts and Hibernate, but controlled by Spring.
>
> Thanks,
> -saeed
>
> --
> Saeed Iqbal
> Independant Consultant
> J2EE - Application Architect / Developer
>

Attachment: user_204446.ezm (zipped)
I’m doing a redirect with annotations: @Result(name = “success”,
type=”redirect”, location=”home.action”), however, the resulting
ActionInvocation is a ServletDispatcherResult instead of
ServletRedirectResult. This is an issue because I'm attempting to use the
RedirectMessageInterceptor which expects a ServletRedirectResult. Why would
@Result type "redirect" result in a ServletDispatcherResult ?

Steve Mitchell
http://www.ByteworksInc.com

Attachment: user_204447.ezm (zipped)
Do you have a wildcard configuration in the XML that might be
overriding your @Result? I can't remember the exact order of
evaluation, but I think Conventions (assuming you're using
Conventions, but we'll need version numbers and plugins to know
better) is sort of the last-guy-on-the-totem-pole.

You might try to take a look at the config-browser plugin so that you
can see your effective configuration on the action in question.

-Wes

On Tue, Dec 29, 2009 at 10:10 AM, Steve Mitchell
<smitchell@(protected):
> I’m doing a redirect with annotations: @Result(name = “success”,
> type=”redirect”, location=”home.action”), however, the resulting
> ActionInvocation is a ServletDispatcherResult instead of
> ServletRedirectResult. This is an issue because I'm attempting to use the
> RedirectMessageInterceptor  which expects a ServletRedirectResult. Why would
> @Result type "redirect" result in a ServletDispatcherResult ?
>
> Steve Mitchell
> http://www.ByteworksInc.com
>



--
Wes Wannemacher

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


Attachment: user_204449.ezm (zipped)
After a little more debugging I see that I am not hitting
the RedirectMessageInterceptor from that action. I'm messing around with
@Namespace and @InterceptorRefs to see if I can achieve the desired
behavior. I must have been seeing a ServletDispatcherResult that was
further downstream.

On Tue, Dec 29, 2009 at 9:17 AM, Wes Wannemacher <wesw@(protected):

> Do you have a wildcard configuration in the XML that might be
> overriding your @Result? I can't remember the exact order of
> evaluation, but I think Conventions (assuming you're using
> Conventions, but we'll need version numbers and plugins to know
> better) is sort of the last-guy-on-the-totem-pole.
>
> You might try to take a look at the config-browser plugin so that you
> can see your effective configuration on the action in question.
>
> -Wes
>
> On Tue, Dec 29, 2009 at 10:10 AM, Steve Mitchell
> <smitchell@(protected):
> > I’m doing a redirect with annotations: @Result(name = “success”,
> > type=”redirect”, location=”home.action”), however, the resulting
> > ActionInvocation is a ServletDispatcherResult instead of
> > ServletRedirectResult. This is an issue because I'm attempting to use the
> > RedirectMessageInterceptor which expects a ServletRedirectResult. Why
> would
> > @Result type "redirect" result in a ServletDispatcherResult ?
> >
> > Steve Mitchell
> > http://www.ByteworksInc.com
> >
>
>
>
> --
> 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_204448.ezm (zipped)
I think this did not reflect in the group. Hence sending again.

On Sun, Dec 27, 2009 at 9:19 AM, Sanjay Patel <skpatel20@(protected):

> Hi,
>
> In an application, we are storing the timeZone of the users and wish to
> display the dates according to their timeZone. As I saw, that there is on
> timeZone support in <s:Date> tag.
>
> Any suggestion would help.
>
> --
> Thanks,
> Sanjay
> www.sanjaypatel.name
>



--
Thanks,
Sanjay
www.sanjaypatel.name
©2008 gg3721.com - Jax Systems, LLC, U.S.A.