Re: how to set default focus field in ?

2010-05-12 Thread Denis Cabasson
I recommend attaching the focus to the relevant form element purely using Javascript, ie, including in you JSP : window.onload = function() { document.getElementById('yourInpudId').focus(); } That way you have a pure javascript implementation, and you can push that code to the relevant J

strange type converter problem

2010-05-12 Thread yunaki
I have a hashMap>codeMap in action to receive a group of textfields values. Each map's value mapping with a struts textfield. my convertFromString fuction work well, all textfield could be converted to a Set. but when i want to convert the map back to textfield in result.jsp the con

Re: how to set default focus field in ?

2010-05-12 Thread Emi Lu
By using tiles, is in global_layout.jsp page, for decedent pages, I will not be able to set body onload. Admittedly I don't know tiles, but Sitemesh will copy the body onLoad and unload functions to the decorating page and I would be suprised if Tiles didn't support this as well. For the g

Re: how to set default focus field in ?

2010-05-12 Thread Roger
> > By using tiles, is in global_layout.jsp page, for decedent pages, > I will not be able to set body onload. > Admittedly I don't know tiles, but Sitemesh will copy the body onLoad and unload functions to the decorating page and I would be suprised if Tiles didn't support this as well. Re

If theme info could be added to http://struts.apache.org/2.1.8.1/docs/datetimepicker.html

2010-05-12 Thread Emi Lu
Hello, Can someone have the permission update this document http://struts.apache.org/2.1.8.1/docs/datetimepicker.html By adding: Also need to be set up theme Otherwise, the datatimepicker will not work; it will be more clear. Thanks, -- Lu Ying ---

Re: tag questions

2010-05-12 Thread RogerV
RogerV wrote: > > > The first is a minor niggle. The default behaviour when the jsp is > displayed for the first time is for the first accordionItem to be open. > I'd like the initial state to be all closed. > OK - setting seems to take care of this one. RogerV wrote: > > The second is m

Re: Some Spring/Struts questions

2010-05-12 Thread Wes Wannemacher
On Wed, May 12, 2010 at 10:42 AM, Dale Newfield wrote: > > That all sounds reasonable, except the part about putting it in the session > instead of the request.  If there's no compelling reason to store something > in the session, I think that it should be avoided.  If you're using an > intercepto

Re: Some Spring/Struts questions

2010-05-12 Thread Dale Newfield
On 5/12/10 9:32 AM, Wes Wannemacher wrote: I've seen a few responses, but I think the best way would be to write an interceptor that places the bean into the session. Give it a known name in the session, then you can use OGNL to access it... That all sounds reasonable, except the part about put

RE: Some Spring/Struts questions

2010-05-12 Thread James Cook
Cool, cheers Wes -Original Message- From: Wes Wannemacher [mailto:w...@wantii.com] Sent: 12 May 2010 15:29 To: Struts Users Mailing List Subject: Re: Some Spring/Struts questions Yep... Here's a quick example struts.xml - http://struts.apache.org/dtds/struts-2.1.7.dtd";>

Re: Some Spring/Struts questions

2010-05-12 Thread Wes Wannemacher
Yep... Here's a quick example struts.xml - http://struts.apache.org/dtds/struts-2.1.7.dtd";> dojo\..*

Re: Re: Catch all method for actions?

2010-05-12 Thread Charles Parker
I use something similar for account activation using wildcards to match random validation codes appended to an action name. My URLs look like: https://server.com/verify_5RXQY-J9GHS struts.xml: class="org.apache.struts2.views.tiles.TilesResult" default="true"/>

Re: Struts : Maintaining state of the Form

2010-05-12 Thread Brian Thompson
I wouldn't recommend that approach. When the user hits the back button, they'll jump out of the wizard entirely rather than going back to the previous page (which is what a web user will expect). Cue the reports of "the wizard is broken!" ;) -Brian On Wed, May 12, 2010 at 5:25 AM, Rahul Mo

RE: Some Spring/Struts questions

2010-05-12 Thread James Cook
Ah, awesome. Thank you for clearing that one up and your package is defined in the struts.xml in the root of the source? -Original Message- From: Wes Wannemacher [mailto:w...@wantii.com] Sent: 12 May 2010 14:51 To: Struts Users Mailing List Subject: Re: Some Spring/Struts questions Jame

Re: how to set default focus field in ?

2010-05-12 Thread Emi Lu
Struts1, I use does not work. I just use e.g; Username "/> I would prefer that s:form supports focus. By using tiles, is in global_layout.jsp page, for decedent pages, I will not be able to set body onload. Why does not support focus? This is strange :-(

Re: Some Spring/Struts questions

2010-05-12 Thread Wes Wannemacher
James, What I normally do is create a "package" and set the defaults that I want stuff to use (interceptors / interceptor stack / etc.). Then, I just tell the convention plugin to use the package I configured The list of properties that the plugin uses is here - http://struts.apache.org/2.x/d

RE: Some Spring/Struts questions

2010-05-12 Thread James Cook
That would be my favoured route. Wes, side question. Using the convention plugin can you modify the stack in the xml file so you don't have to annotate the action itself? Or do you still have to add the annotation with the interceptor put in? James -Original Message- From: Wes Wannemache

Re: Some Spring/Struts questions

2010-05-12 Thread Wes Wannemacher
I've seen a few responses, but I think the best way would be to write an interceptor that places the bean into the session. Give it a known name in the session, then you can use OGNL to access it... Here is a quick example of the interceptor - public class CustomInterceptor extends AbstractInterce

Re: Some Spring/Struts questions

2010-05-12 Thread Andy Law
dcabasson wrote: > > That's actually possible. We are doing that type of things by using the > @Autowired annotation, which means that spring needs to find a suitable > bean to inject there. If you put that annotation on your base class, the > instance will get injected in all sub-classes. B

RE: Some Spring/Struts questions

2010-05-12 Thread Andy Law
Martin, mgainty wrote: > > > jsp:useBean for quite some time > class="enterprise.criteriaQuery.ejb.StatelessSessionBean" /> > > in your jsp if you have a method called getCriteria the jsp could call the > bean method directly via > > <%=query.getCriteria()%> > > OK. This looks like it

RE: Some Spring/Struts questions

2010-05-12 Thread Martin Gainty
jsp:useBean for quite some time in your jsp if you have a method called getCriteria the jsp could call the bean method directly via <%=query.getCriteria()%> HTH Martin Gainty __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de con

Re: Some Spring/Struts questions

2010-05-12 Thread Denis Cabasson
A new requirement means that we need to have available across pretty much every action a separate, independent bean that carries information that may (or may not) need to be displayed on the resulting web-pages. I am wondering what the best way is to make this bean available to each JSP. We

Re: access map's value in object stack

2010-05-12 Thread stanlick
Maps expose an Entry element containing properties key and value. // that work well // this would call getColor() on the value object associated with key Peace, Scott On Wed, May 12, 2010 at 3:55 AM, yunaki wrote: > > i have a Map in object stack, struts can use tag to access

RE: Some Spring/Struts questions

2010-05-12 Thread Andy Law
James Cook-13 wrote: > > In the past I have done this for accessing beans in a servlet. > > class="org.springframework.web.context.support.ServletContextAttributeEx > porter"> > > > value-ref="myOrganisationServiceBeanRef"/> > > > >

tag questions

2010-05-12 Thread RogerV
Hi I'm trying to use the accordion tag for the first time, and it's all pretty much working. However I have a couple of niggling problems and I'm hoping that someone can point me in the right direction. The first is a minor niggle. The default behaviour when the jsp is displayed for the first ti

Re: Struts : Maintaining state of the Form

2010-05-12 Thread Rahul Mohan
Hi, I would recommend the first option. Session memory usage has a much bigger impact than multiple hits to the server as the memory usage grows linearly with the number of users. For retaining the previous view state, the best solution I have seen is to use a single page application, where ea

RE: Some Spring/Struts questions

2010-05-12 Thread James Cook
In the past I have done this for accessing beans in a servlet. OrganisationService organisationService = (OrganisationService) getServletContext().getAttribute("organisationService"); -Original Message- From: Andy Law [m

RE: Some Spring/Struts questions

2010-05-12 Thread Andy Law
James Cook-13 wrote: > > You could, add the bean to the servlet context, and access it via a > scriptlet in the jsp. Thus bypassing your actions all together. > What does the Spring configuration look like for that course of action? James Cook-13 wrote: > > Or.. Create filter/Inteceptor and

RE: Some Spring/Struts questions

2010-05-12 Thread James Cook
You could, add the bean to the servlet context, and access it via a scriptlet in the jsp. Thus bypassing your actions all together. Or.. Create filter/Inteceptor and inject into them? -Original Message- From: Andy Law [mailto:andy@roslin.ed.ac.uk] Sent: 12 May 2010 09:58 To: user@str

Some Spring/Struts questions

2010-05-12 Thread Andy Law
All, Apologies if this would be better asked in a Spring forum. If so, I would appreciate guidance as to which one/where. I have a Struts2 application with around 30 actions. Most inherit from a common base class. We have configured the system to start to use Spring to inject certain things into

access map's value in object stack

2010-05-12 Thread yunaki
i have a Map in object stack, struts can use tag to access each member, but how can I access map's value to set it to a tag's value. // that work well //set map's value to textfield Many thank -- View this message in context: http://old.nabble.com/access-map%27s-value-in-ob

Struts : Maintaining state of the Form

2010-05-12 Thread Asha K
Hi All, I am using struts 1.3 in my application . I have a requirement to develop multiple JSP pages linked to each other( like a WIZARD) . The flow is as below. level1.jsp->level2.jsp->level3.jsp->level4.jsp In each page a list of records are displayed with few editable fields. On click