Re: [OT] Need suggestion about designing web application

2007-09-27 Thread Antonio Petrelli
2007/9/27, Ashish Kulkarni [EMAIL PROTECTED]: Hi We a to develop a web application which we want to be able to deploy on any J2EE compatiable application server. We would create a war file for deployment, but there is a issue with database connection, We do not know the JNDI name, So we

Re: [OT] Need suggestion about designing web application

2007-09-27 Thread Nils-Helge Garli
As Antonio said, _you_ as the application developer/assembler decide the local JNDI name of the data source. Then it's the task of the deployer to link this local defined JNDI name to an actual JNDI resource in the container. Nils-H On 9/27/07, Antonio Petrelli [EMAIL PROTECTED] wrote:

Struts2 defaults to struts.url.includeParams=get why??...

2007-09-27 Thread Giovanni Azua
Hi all, I don't understand why the parameter struts.url.includeParams would default to get rather than none. Its default value already gave me quite some headaches see: http://code.google.com/p/tabletags/issues/detail?id=11 http://code.google.com/p/tabletags/issues/detail?id=12 regards,

[s2]struts-2-spring-2-jpa-ajax tutorial

2007-09-27 Thread Eugen Stoianovici
I've started learning struts based on this tutorial which (from my limited experience) is a good starting point. There's on problem for me though. It gets frustrating implementing all my persistence related calls in a service class. Is there a way to instantiate my action classes with an

If Tag: testing for an enumerated value

2007-09-27 Thread setecastronomy
Somewhere I have the following enumeration public enum Interval { GENERIC, MONTH, YEAR; } The action has the following method: public Interval getInterval() {return iInterval;} I supposed I could test the enumerated value inside my jsp in the following way: s:if test=%{interval ==

RE: [S2] Iterator Tag and Status Count

2007-09-27 Thread Hoying, Ken
Thank you for clearing this up. I had checked the JavaDoc before making the post, as well, and as you report it is a bit thin. Never occurred to me that it was a 1 based index. I have never seen that before. I guess someone thought it useful rather than just doing the math if needed. Thanks

listen/notify Topics doubt

2007-09-27 Thread Pablo Vázquez Blázquez
Hi all! I have a simple question: When a div tag contains the listenTopics attribute, the associated href is executed *Before and After* the action associated to the tag which invokes the notifyTopics?? s:div id=treeAndSelector theme=ajax href=${refreshTreeUrl}

RE: If Tag: testing for an enumerated value

2007-09-27 Thread Wesley Wannemacher
Try - s:if test=%{interval == @[EMAIL PROTECTED] anno s:date name=dataInizio format= / /s:if -Original Message- From: setecastronomy [mailto:[EMAIL PROTECTED] Sent: Thursday, September 27, 2007 7:35 AM To: user@struts.apache.org Subject: If Tag: testing for

RE: [S2] Iterator Tag and Status Count

2007-09-27 Thread Dave Newton
--- Hoying, Ken [EMAIL PROTECTED] wrote: Never occurred to me that it was a 1 based index. It's not, although the difference is semantic. index is the index. count is the number of iteration you're currently on; you'll never be in the zeroth iteration because the iteration starts immediately

RE: listen/notify Topics doubt

2007-09-27 Thread Manu Mahajan
Hi If you want to handle the before and after topics separately you can do something like this. Note I am publishing a separate topic for the form (submitForm) and then handling it using some javascript code s:div id=treeAndSelector theme=ajax href=${refreshTreeUrl}

Re: [OT] Need suggestion about designing web application

2007-09-27 Thread Ashish Kulkarni
Hi But suppose i have to install the same war file on same application server, one installtion pointing towards database1, and other installation pointing towards database 2. And this is quite possible to happen, if database 1 is prodution database for site1 and database 2 is production database

Struts - open windows without javascript

2007-09-27 Thread massimo . tagliaferri
how to open a new browser windows in Struts without to use javascript code in jsp page? thanks Massimo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: [s2]struts-2-spring-2-jpa-ajax tutorial

2007-09-27 Thread Musachy Barroso
You can just inject your entity manager in your actions and do all the persistence stuff in there. JPA/Hibernate are not related or tied to struts in anyway. Just be advised that doing that will make your actions harder to test/maintain/extend and your code won't be reusable. regards musachy On

RE: Struts - open windows without javascript

2007-09-27 Thread Slattery, Tim - BLS
how to open a new browser windows in Struts without to use javascript code in jsp page? Opening a new page is a client-side function. Since Struts is a server-side system, there's no way to do this. You could use the target attribute of the form... tag, which instructs the browser to open a

Re: Struts - open windows without javascript

2007-09-27 Thread Van Riper
On 9/27/07, Slattery, Tim - BLS [EMAIL PROTECTED] wrote: how to open a new browser windows in Struts without to use javascript code in jsp page? Opening a new page is a client-side function. Since Struts is a server-side system, there's no way to do this. You could use the target

[ot] help on generics...

2007-09-27 Thread nicolas de loof
Hello, my question is fully off topic, but Struts2 is the only java5 project I know. I'd like a method to return an instance of a class passed as parameter : public Object getInstance( Class clazz ) I'd like to use generics to make the return type in sync with the class type. Is this possible

Re: [ot] help on generics...

2007-09-27 Thread Giovanni Azua
how about: public static T T getInstance(ClassT aClass) { // TODO: } regards, Giovanni nicolas de loof wrote: Hello, my question is fully off topic, but Struts2 is the only java5 project I know. I'd like a method to return an instance of a class passed as parameter : public Object

validating a url

2007-09-27 Thread Joe Yuen
What is the right way to validated a url? In my validator.xml file, I have the following entry: field property=insWeb depends =url var var-nameallowallschemes/var-name var-valuetrue/var-value /var var var-nameallow2slashes /var-name var-valuetrue/var-value /var /field If I enter

[S2] highlighting active link

2007-09-27 Thread TuomoS
Is there a better way of highlighting active link in struts 2 li class=${param['active'] == 'home' ? 'active' : ''} s:url id=homeId action=home s:param name=active value=%{'home'} / /s:url s:a

[S2]Actions with onLoad() and onSubmit() instead of execute()

2007-09-27 Thread Victor Neo
I wish to implement my S2 Action classes implementing ModelDriven with onLoad() and onSubmit() methods that replaces the default execute() method. When the user first views a page, onLoad() is called. If the user submits the form, onSubmit() is called. My idea is to create an Interface with

Re: Struts2+Spring2 Beans+Hibernate

2007-09-27 Thread Tom Holmes Jr.
You know ... we already have a Struts2+Spring2 beans+Hibernate project at work with maven2 for building ... I could have asked for their framework and probably been a lot farther ahead ... but learning Struts2 the way I did was a learning experience. Thanks for the information ... I will

RE: Struts - open windows without javascript

2007-09-27 Thread Slattery, Tim - BLS
You could use the target attribute of the form... tag, which instructs the browser to open a new window for the result of the form. That's as close as you're going to get. Same goes for the link a ... tag. The attribute you add to make your form/link requests open a new browser

RE: [ot] help on generics...

2007-09-27 Thread Engelking, Nicholas
Specifically, you could use public T T getInstance(ClassT clazz) throws InstantiationException, IllegalAccessException{ return clazz.newInstance(); } The ClassT object has a method newInstance() that creates an instance of a class with

Re: Which values are passed to the action with a s:submit button?

2007-09-27 Thread wild_oscar
Putting it in another way...how can I send a value from the Action to the jsp and use that value in another action in the next request? Specifically, what struts2 tag should be used in the jsp? wild_oscar wrote: I'm having doubts on a really basic question: which values are passed to the

Re: Which values are passed to the action with a s:submit button?

2007-09-27 Thread Dave Newton
--- wild_oscar [EMAIL PROTECTED] wrote: Which tags are sent as parameters on a form? All form tags, unless you have an interceptor configured to specifically exclude specific parameters. Putting it in another way...how can I send a value from the Action to the jsp and use that value in

Re: [OT] Need suggestion about designing web application

2007-09-27 Thread Nils-Helge Garli
The idea of the local JNDI reference (which exists for the application instance only) is to decouple it from the actual, physical JNDI name of the resource. The mapping of the datasource name is (usually) done when the application is deployed. I am not familiar with how WebLogic handle this, but

Re: Sharing resource bundles across web-apps

2007-09-27 Thread Sairam01
It appears that the way it finds the resource bundle ( looks for the bundle to be available in current thread's class loader), we cannot locate the bundle which is not visible to the current class loader. Am I right ? Sairam01 wrote: I have multiple web-apps in an ear file and want to share

RE: Which values are passed to the action with a s:submit button?

2007-09-27 Thread Slattery, Tim - BLS
Putting it in another way...how can I send a value from the Action to the jsp and use that value in another action in the next request? Put in into a hidden... field in the form Specifically, what struts2 tag should be used in the jsp? s:hidden -- Tim Slattery [EMAIL PROTECTED]

RE: [S2]Actions with onLoad() and onSubmit() instead of execute()

2007-09-27 Thread Wesley Wannemacher
Check here - http://struts.apache.org/2.0.9/docs/action-configuration.html#ActionConf iguration-WildcardMethod -Wes -Original Message- From: Victor Neo [mailto:[EMAIL PROTECTED] Sent: Thursday, September 27, 2007 12:15 PM To: user@struts.apache.org Subject: [S2]Actions with

Re: Struts - open windows without javascript

2007-09-27 Thread Van Riper
On 9/27/07, Slattery, Tim - BLS [EMAIL PROTECTED] wrote: You could use the target attribute of the form... tag, which instructs the browser to open a new window for the result of the form. That's as close as you're going to get. Same goes for the link a ... tag. The attribute you add

Re: [S2] TabbedPanel Events

2007-09-27 Thread Musachy Barroso
Try to listen to a topic with the name: widgetId + -selectChild (hardcoded in dojo's code), let's say that your tab pannel is something like: s:tabbedPanel id=myTab ... Add this to your page dojo.event.topic.subscribe(myTab-selectChild, function(tab) { do something }); regards musachy On

Re: [OT] Need suggestion about designing web application

2007-09-27 Thread Ashish Kulkarni
Hi This sounds intresting I am also working on an application which is suppose to get data from more then one database and then merge and create one xml file and send it back. So in this case, i will have to work with more then one JNDI, Has anyone experience with working this kind of

[S2] TabbedPanel Events

2007-09-27 Thread Hoying, Ken
It looks like version 2.1 will contain the ability to capture events in the TabbedPanel. We are currently using v2.0.6 and need to be able to capture a change in tab. Has anyone come across a solution for this? Thank you! - ***Note:The information

Re: Which values are passed to the action with a s:submit button?

2007-09-27 Thread wild_oscar
There is a page in between: 1) Page A - submit form 2) Action sets parameter1 and sends to Page A 3) Page A shows parameter1 4) Page A has a submit for another action that needs parameter1 Curiously, I tried assigning it to a s:label. It showed parameter1 ok ( 3) ), but the parameter was null

Re: Which values are passed to the action with a s:submit button?

2007-09-27 Thread Dave Newton
--- wild_oscar [EMAIL PROTECTED] wrote: Curiously, I tried assigning it to a s:label. My fault; I assumed some familiarity with HTML forms. All form *input* elements (including things like select... etc.) newton.dave wrote: --- wild_oscar [EMAIL PROTECTED] wrote: Which tags are sent as

RE: [S2] TabbedPanel Events

2007-09-27 Thread Hoying, Ken
Thank you! That was exactly what I was looking for! -Original Message- From: Musachy Barroso [mailto:[EMAIL PROTECTED] Sent: Thursday, September 27, 2007 2:58 PM To: Struts Users Mailing List Subject: Re: [S2] TabbedPanel Events Try to listen to a topic with the name: widgetId +

Re: Which values are passed to the action with a s:submit button?

2007-09-27 Thread wild_oscar
In the case you want to just display (and give no choice of editing) and at the same time send in the next request, the best option is then to use a label and repeat it in a hidden field? newton.dave wrote: --- wild_oscar [EMAIL PROTECTED] wrote: Curiously, I tried assigning it to a

Re: Which values are passed to the action with a s:submit button?

2007-09-27 Thread Dave Newton
--- wild_oscar [EMAIL PROTECTED] wrote: In the case you want to just display (and give no choice of editing) and at the same time send in the next request, the best option is then to use a label and repeat it in a hidden field? Well, personally I wouldn't use a label if it isn't a label for

Re: [OT] Need suggestion about designing web application

2007-09-27 Thread Larry Meadors
With iBATIS, you can supply configuration properties at runtime - look at the API for the constructors of the sqlmapclient - one of them allows you to pass a properties object into it - those can be used to configure the data source. Larry On 9/27/07, Ashish Kulkarni [EMAIL PROTECTED] wrote:

OT, ajax form submission

2007-09-27 Thread Henry Park
I could not get the packaged struts2 ajax implementation to work, so I am trying to go at it with plain javascript. A problem that I am having is that whenever I submit the form, all of my form fields keep getting appended over and over. If I click submit enough, it causes an overflow error.

Validation and freemarker result ....

2007-09-27 Thread Mufaddal Khumri
Hello, === My web.xml: === !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app display-nameGlop/display-name filter filter-namestruts2/filter-name

RE: OT, ajax form submission

2007-09-27 Thread Henry Park
By appended over and over, I mean in the querystring... so the request would look like this:

Re: OT, ajax form submission

2007-09-27 Thread Dave Newton
The first thing I noticed was that your onclick handler attribute doesn't return false; after executing your Ajax method; perhaps it's doing both the Ajax submit and a regular one (easily verifiable)? It might be less traumatic to just figure out what's wrong with the built-in Ajax, though :/

Re: Validation and freemarker result ....

2007-09-27 Thread Dave Newton
--- Mufaddal Khumri [EMAIL PROTECTED] wrote: action name=workOnOrder class=com.experiment.MyOrderAction result name=error type=freemarker /support/error.ftl /result /action On the other hand, http://mydomain/glop/workOnOrder.action Throws an error, but struts does not take

Slow Web Page, Speed Up?

2007-09-27 Thread Brian Trzupek
We have a JSP that is the main navigation menu and it has a notion of RBAC so that the logged in user needs to be in a given role to see the different navigation items (the actions behind them respect the same roles as well, so we are not just hiding links). The page loads extremely

Struts 2 / codebehind / SiteMesh : how do I auto-wire static resources?

2007-09-27 Thread james_carbon5
I'm working on a project that is using struts 2, codebehind, and SiteMesh. We're using Spring for injection. We've got it wired up so that each action has a template that is magically discovered, such that if I request an action ../foo!bar.action the template foo-bar.ftl is used to render the

Re: Breadcrumbs

2007-09-27 Thread Brian Trzupek
Try this one out, we are using it very successfully. Trail Taglin http://www.osjava.org/trail-taglib/index.html brian- On Sep 25, 2007, at 5:53 AM, [EMAIL PROTECTED] wrote: Can you tell me if Struts 2 has a facility for breadcrumbs? On 9/25/07, Antonio Petrelli [EMAIL PROTECTED] wrote:

RE: specifying the location of struts.xml

2007-09-27 Thread Manu Mahajan
As far as I know the struts.xml has to be in the root of your classpath and there is no way of changing this. The maximum you can do is add it to the root of a jar in the WEB-INF/lib folder but not directly in the WEB-INF folder. Manu -Original Message- From: Pavel Sapozhnikov