Re: Use of ExtJS

2008-03-26 Thread Alvaro Sanchez-Mariscal
  Can we use ExtJS with Struts 2 Tags?

Nope. However, you can use ExtJS (or any other) directly without S2 ajax tags.

Alvaro.


-- 
Alvaro Sanchez-Mariscal Arnaiz
Java EE Architect  Instructor
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



struts.serve.static=false not working?

2008-02-27 Thread Alvaro Sanchez-Mariscal
Hi,

I have been following these instructions:

http://cwiki.apache.org/confluence/display/S2WIKI/Creating+a+custom+Dojo+profile+for+Struts+2.0.x

- I have extracted static and template to /struts (/src/main/webapp/struts).
- I have modified struts.properties to set struts.serve.static=false.
- I have cleared browser's cache.
- I have modified head.ftl of the simple theme (as specified in
struts.properties).

If I request http://localhost:8080/webapp/struts/simple/head.ftl, I
can see my changes.
However, in a JSP with s:head, I can't.

I am using version 2.0.8.

What am I doing wrong?

-- 
Alvaro Sanchez-Mariscal Arnaiz
Java EE Architect  Instructor
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Struts2+MyEclipse

2008-01-25 Thread Alvaro Sanchez-Mariscal
 even the latest version of
 eclipse support only Struts 1.3.

Yes, that is.

Alvaro.

-- 
Alvaro Sanchez-Mariscal Arnaiz
Java EE Architect  Instructor
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Struts2+MyEclipse

2008-01-25 Thread Alvaro Sanchez-Mariscal
 My question is if i want to use MyEclipse as an ID how can i develop Struts2
 applcations.

 is there any way to do this that is the point of my confusion

The same way as you would do with raw Eclipse: by hand.

There is no S2 plugin for neither Eclipse nor MyEclipse.

Alvaro.
-- 
Alvaro Sanchez-Mariscal Arnaiz
Java EE Architect  Instructor
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Struts2+MyEclipse

2008-01-25 Thread Alvaro Sanchez-Mariscal
Ted,

Those steps are the same as the ones required for Eclipse.

Simply, there's no specific support for S2, like the support of S1,
Hibernate, Spring...

You will have autocompletion of struts.xml if you have the namespace
declared (like any other XML file) and autocompletion of jsp tags
(like any other tags), but nothing specifically of S2 (like suggestion
of action names in JSP tags based on struts.xml).

Cheers,
Alvaro.

On Jan 25, 2008 1:51 PM, Ted Husted [EMAIL PROTECTED] wrote:

 On Jan 24, 2008 11:15 PM, aum strut [EMAIL PROTECTED] wrote:
  Hi All,
 
  Please tell me is it possible to develop Struts2 applications using latest
  version of MyEclipse as i came to know that even the latest version of
  eclipse support only Struts 1.3.
 
   Any Guidance in this regard is much appriciated.

 Yes, in fact I use MyEclipse in my Struts 2 training course!

 MyEclipse 6 is a great platform. Everything you need to develop
 enterprise-grade applications is in a single download, including a web
 container, (Tomcat), DBMS (Derby), Data Access Library (Hibernate),
 Dependency Injection System (Spring), and your choice of web
 application frameworks, such as Struts 1 and Tapestry. Even the Java
 runtime is included in the same download. And, since it's Eclipse, we
 can run it all in place, without tweaking any system registries or
 such. For my course, I can squeeze a complete, runnable system, with
 training materials, onto a 1GB USB drive

 MyEclipse may be an all-one-download, but we can still install any
 other Eclipse plugins that we might want to use. And, we can also
 install other frameworks, like Struts 2.

 The simplest approach is to create a web application project in the
 usual way. Then, drag and drop the necessary Struts 2 dependencies
 into the WEB-INF folder that MyEclipse will create. The needed JARs
 are

  * struts2-core
  * xwork2
  * freemarker
  * ognl
  * commons-logging

 The commons-logging JAR is optional, but it helps. The versions will
 vary depending on which version of Struts 2 is being used. Just use
 whatever is provided in the Struts 2 lib distribution. (But not
 everything that is in the distribution!)

 The one other step is to configure the web.xml to load the Struts
 filter. MyEclipse will create a starter web.xml. Just change it to
 look like this:

 ---

 ?xml version=1.0 encoding=UTF-8?
 web-app version=2.5
 xmlns=http://java.sun.com/xml/ns/javaee;
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 xsi:schemaLocation=http://java.sun.com/xml/ns/javaee
 http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd;

 filter
 filter-name
 struts2
 /filter-name
 filter-class
 org.apache.struts2.dispatcher.FilterDispatcher
 /filter-class
 /filter
 filter-mapping
 filter-name
 struts2
 /filter-name
 url-pattern
 /*
 /url-pattern
 /filter-mapping
 welcome-file-list
 welcome-fileindex.html/welcome-file
 /welcome-file-list
 /web-app

 ---

 And that's it! Welcome to Struts 2 and MyEclipse 6!

 HTH, Ted.
 http://www.StrutsMentor.com/


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-- 
Alvaro Sanchez-Mariscal Arnaiz
Java EE Architect  Instructor
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: New Struts2 Book : Feedback Requested

2008-01-21 Thread Alvaro Sanchez-Mariscal
 http://www.struts2.org/free-struts2-book/

Will it be free?

Alvaro.


-- 
Alvaro Sanchez-Mariscal Arnaiz
Java EE Architect  Instructor
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Struts 2 + Spring 2 + JPA + AJAX tutorial

2008-01-05 Thread Alvaro Sanchez-Mariscal
Quoting:

1. Create a folder named META-INF under the src folder.
2. Create a file named persistence.xml under the META-INF folder
and set its content to...

Content within src should be compiled into WEB-INF/classes.

Doing the maven way, this file should be in src/main/resources

Alvaro.


On Jan 5, 2008 4:03 AM, Pascal SEREMES-DAMAL [EMAIL PROTECTED] wrote:
 All the code is there :
 http://struts.apache.org/2.0.11/docs/struts-2-spring-2-jpa-ajax.html

 But I had a problem to deploy the application on my tomcat server.

 Musachy and Laurie suggested to move the file persistence.xml from
 /META-INF (where indicated in the tutorial) to
 /WEB-INF/classes/META-INF.

 Enjoy.


 Pascal


 2008/1/4, Frans Thamura [EMAIL PROTECTED]:
  can we have the code also?
 
  F
 


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-- 
Alvaro Sanchez-Mariscal Arnaiz
Java EE Architect  Instructor
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to use dojo 1.0?

2007-12-19 Thread Alvaro Sanchez-Mariscal
 Yeah, that right.  It would be convenient if tags existed for 1.0
 already but there's none.  It'll takes someone with a lot of familiarity
 with Dojo 1.0 to be able to build useful reusable tags like the current
 dojo plugin so I expect it'll take a while. However, if you use raw
 Dojo instead and find you start re-using a lot of similar JS code, then
 that code's an excellent starting point for a new sx:tag and you'll
 probably be the best person to contribue it to struts2!

Ok, I will give this way a try.

Thank you very much.

Alvaro.

-- 
Alvaro Sanchez-Mariscal Arnaiz
Java EE Architect  Instructor
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to use dojo 1.0?

2007-12-18 Thread Alvaro Sanchez-Mariscal
Hi,

Which are the options to use Dojo 1.0 with S2? Using 2.1.x will be enough?

Alvaro.

-- 
Alvaro Sanchez-Mariscal Arnaiz
Java EE Architect  Instructor
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to use dojo 1.0?

2007-12-18 Thread Alvaro Sanchez-Mariscal
Ok, so provided there is not an official way to use Dojo 1.0...
Dave, are you willing to contribute your code?

Alvaro.

On Dec 19, 2007 12:46 AM, Dave Newton [EMAIL PROTECTED] wrote:
 --- Pedro Herrera [EMAIL PROTECTED] wrote:
   Struts 2.1 uses dojo 0.4.3 :( ...

 Hmm, that appears to be correct; I thought it had been updated. My mistake.

  Why don´t you support for struts 2.1 ??

 The only thing my plugin does is takes the S2.1 Dojo plugin and makes it
 usable under S2.0, as such it uses whatever Dojo version the S2.1 plugin
 uses.


 d.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-- 
Alvaro Sanchez-Mariscal Arnaiz
Java EE Architect  Instructor
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to use dojo 1.0?

2007-12-18 Thread Alvaro Sanchez-Mariscal
Surely I can use Dojo 1.0 with theme=simple. But in that case, I
will not leverage Dojo Struts Tags in the server side.

What I would like is to use the s:* (or sx:*) tags rendered with Dojo
1.0. And in the cases where there is not a suitable tag, I will have
the chance to use raw Dojo.

Alvaro.

On Dec 19, 2007 3:23 AM, Jeromy Evans [EMAIL PROTECTED] wrote:
 Alvaro Sanchez-Mariscal wrote:
  Ok, so provided there is not an official way to use Dojo 1.0...
  Dave, are you willing to contribute your code?
 
  Alvaro.
 I just thought I'd make the obvious point there's no reason why you
 can't use Dojo 1.0 with Struts2 already.

 You can't use the current struts2-dojo-plugin to pre-generate default
 javascript and some struts2-specific widgets, but in my opinion you'll
 be better off using Dojo 1.0 as-intended anyway.  That is, Dojo is a
 client-side library, so write client-side code using Dojo and Dijit
 properly and use Struts2 as your backend.  A sophisticated application
 will need to interact with the widgets directly anyway so you'll be
 thankful for learning Dojo and being able to speak the same language as
 Dojo developers.  Custom JSP tags don't save you a lot of effort except
 for trivial applications and they don't do Dojo any justice at all.

 Take a look at their hello world:
 http://dojotoolkit.org/book/dojo-book-0-9/hello-world-tutorial

 You can call a struts action directly via XHR and process HTML and/or
 JSON results from actions (via the JSON plugin) with little effort right
 now.

 cheers,
  Jeromy Evans



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-- 
Alvaro Sanchez-Mariscal Arnaiz
Java EE Architect  Instructor
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [S2.0.11] TabbedPanel remote div loads twice on notifyTopic

2007-11-13 Thread Alvaro Sanchez-Mariscal
I fired a bug about this some weeks ago, and the response was we will
solve it in Struts 2.1.

Alvaro.

On Nov 13, 2007 8:43 PM, Crocker, Patrick [EMAIL PROTECTED] wrote:
 Struts 2.0.11

 I have a tabbed panel with 2 div's, one static, one remote.  Tab one
 (static) has a form with a submit button that publishes a notify topic
 of /refresh.  Tab two (remote) has a listen topic of /refresh.

 The problem is that when the form is submitted, Tab two (remote) is
 loaded twice:

 Firebug Console Output:
 GET
 http://localhost:8080/emckpi/test/tab2.htm?dojo.preventCache=11949822065
 98
 POST http://localhost:8080/emckpi/test/tab1.htm
 GET
 http://localhost:8080/emckpi/test/tab2.htm?dojo.preventCache=11949822066
 30

 As you can see, the topic is notified, then the form posts, then the
 topic is notified again.  According to the documentation, the s:submit
 notifyTopics is Topics that will published when the remote call
 completes.

 So, why is the topic being notified *before* the remote call has even
 been performed?

 JSP:
 --
 %@ taglib uri=/struts-tags prefix=s %
 html
   head
 s:head theme=ajax /
   /head
   body
 s:tabbedPanel id=tabs

   s:div id=tabOne theme=ajax label=Tab One

 s:form namespace=/test action=tab1 method=post
 theme=ajax
   s:submit notifyTopics=/refresh /
 /s:form

   /s:div

   s:url id=tabTwoUrl namespace=/test action=tab2 /
   s:div id=tabTwo href=%{#tabTwoUrl} theme=ajax label=Tab
 Two listenTopics=/refresh /

 /s:tabbedPanel
   /body
 /html

 Thank you,
 Patrick Crocker



 ***
 Bear Stearns is not responsible for any recommendation, solicitation,
 offer or agreement or any information about any transaction, customer
 account or account activity contained in this communication.
 ***

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-- 
Alvaro Sanchez-Mariscal Arnaiz
Java EE Architect  Instructor
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [S2.0.11] TabbedPanel remote div loads twice on notifyTopic

2007-11-13 Thread Alvaro Sanchez-Mariscal
https://issues.apache.org/struts/browse/WW-2123

On Nov 13, 2007 9:06 PM, Alvaro Sanchez-Mariscal
[EMAIL PROTECTED] wrote:
 I fired a bug about this some weeks ago, and the response was we will
 solve it in Struts 2.1.

 Alvaro.


 On Nov 13, 2007 8:43 PM, Crocker, Patrick [EMAIL PROTECTED] wrote:
  Struts 2.0.11
 
  I have a tabbed panel with 2 div's, one static, one remote.  Tab one
  (static) has a form with a submit button that publishes a notify topic
  of /refresh.  Tab two (remote) has a listen topic of /refresh.
 
  The problem is that when the form is submitted, Tab two (remote) is
  loaded twice:
 
  Firebug Console Output:
  GET
  http://localhost:8080/emckpi/test/tab2.htm?dojo.preventCache=11949822065
  98
  POST http://localhost:8080/emckpi/test/tab1.htm
  GET
  http://localhost:8080/emckpi/test/tab2.htm?dojo.preventCache=11949822066
  30
 
  As you can see, the topic is notified, then the form posts, then the
  topic is notified again.  According to the documentation, the s:submit
  notifyTopics is Topics that will published when the remote call
  completes.
 
  So, why is the topic being notified *before* the remote call has even
  been performed?
 
  JSP:
  --
  %@ taglib uri=/struts-tags prefix=s %
  html
head
  s:head theme=ajax /
/head
body
  s:tabbedPanel id=tabs
 
s:div id=tabOne theme=ajax label=Tab One
 
  s:form namespace=/test action=tab1 method=post
  theme=ajax
s:submit notifyTopics=/refresh /
  /s:form
 
/s:div
 
s:url id=tabTwoUrl namespace=/test action=tab2 /
s:div id=tabTwo href=%{#tabTwoUrl} theme=ajax label=Tab
  Two listenTopics=/refresh /
 
  /s:tabbedPanel
/body
  /html
 
  Thank you,
  Patrick Crocker
 
 
 
  ***
  Bear Stearns is not responsible for any recommendation, solicitation,
  offer or agreement or any information about any transaction, customer
  account or account activity contained in this communication.
  ***
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 



 --
 Alvaro Sanchez-Mariscal Arnaiz
 Java EE Architect  Instructor
 [EMAIL PROTECTED]




-- 
Alvaro Sanchez-Mariscal Arnaiz
Java EE Architect  Instructor
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: dojo version in struts 2.0.11?

2007-11-10 Thread Alvaro Sanchez-Mariscal
We currently use 2.0.8, but we are willing to move to 2.0.11 if we can
use Dojo 1.0.

On Nov 10, 2007 11:05 AM, Sami Dalouche [EMAIL PROTECTED] wrote:
 Hi,

 it would be awesome to build a production-quality version on top of what
 I started.

 as Antonio suggested, I created a JIRA feature request for that :
 https://issues.apache.org/struts/browse/WW-2311 and attached the theme
 here.

 The code is currently built against struts 2.0.11, which is the version
 I currently use.
 Alvaro- Which version are you targetting ?

 Regards,
 Sami Dalouche

 Le vendredi 09 novembre 2007 à 12:25 +0100, Alvaro Sanchez-Mariscal a
 écrit :

  Hi Sami,
 
  My company (Salenda) is willing to contribute to get a
  production-quality version.
 
  Perhaps sharing source code in a cvs/subversion may be a good starting 
  point.
 
  Anybody else interested?
 
  Alvaro.
 
  On Nov 9, 2007 12:09 PM, Sami Dalouche [EMAIL PROTECTED] wrote:
   If anyone is interested, I have created my own dojo 1.0.0 theme for
   standard Struts 2 tags. (works on Dojo 2.0.11).
  
   It's far from being *clean*, far from being complete, uses undocumented
   attributes, but is a good starting guide to create progressive
   JavaScript enhancement (falls back to pure HTML widgets if JS is not
   enabled).
  
   So, do not hesitate to drop me an email if you want to look at the code,
   or plan to cleanly repackage it for Struts, it's available under
   whatever open source license you prefer.
  
   Regards,
   Sami Dalouche
  
  
  
   On Fri, 2007-11-09 at 21:25 +1100, Jeromy Evans wrote:
Does anyone know -exactly- which revision of dojo is bundled in Struts
2.0.11?
   
A diff of the src dirs reveals it's not the tagged 0.4.2 release or
tagged 0.4.3 release.  I believe it's near 0.4.2 but can't find a match.
   
The dojo plugin in Struts 2.1.x definitely uses the 0.4.3 tagged 
release.
   
Max Pimm wrote
  Which is the dojo version that was used in the build of
struts2-core-0.011.jar?
   
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 
 


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-- 
Alvaro Sanchez-Mariscal Arnaiz
Java EE Architect  Instructor
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: dojo version in struts 2.0.11?

2007-11-09 Thread Alvaro Sanchez-Mariscal
Hi Sami,

My company (Salenda) is willing to contribute to get a
production-quality version.

Perhaps sharing source code in a cvs/subversion may be a good starting point.

Anybody else interested?

Alvaro.

On Nov 9, 2007 12:09 PM, Sami Dalouche [EMAIL PROTECTED] wrote:
 If anyone is interested, I have created my own dojo 1.0.0 theme for
 standard Struts 2 tags. (works on Dojo 2.0.11).

 It's far from being *clean*, far from being complete, uses undocumented
 attributes, but is a good starting guide to create progressive
 JavaScript enhancement (falls back to pure HTML widgets if JS is not
 enabled).

 So, do not hesitate to drop me an email if you want to look at the code,
 or plan to cleanly repackage it for Struts, it's available under
 whatever open source license you prefer.

 Regards,
 Sami Dalouche



 On Fri, 2007-11-09 at 21:25 +1100, Jeromy Evans wrote:
  Does anyone know -exactly- which revision of dojo is bundled in Struts
  2.0.11?
 
  A diff of the src dirs reveals it's not the tagged 0.4.2 release or
  tagged 0.4.3 release.  I believe it's near 0.4.2 but can't find a match.
 
  The dojo plugin in Struts 2.1.x definitely uses the 0.4.3 tagged release.
 
  Max Pimm wrote
Which is the dojo version that was used in the build of
  struts2-core-0.011.jar?
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-- 
Alvaro Sanchez-Mariscal Arnaiz
Java EE Architect  Instructor
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: help with struts 2 + jfreechart plugin example

2007-10-31 Thread Alvaro Sanchez-Mariscal
.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)

 org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)

 org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)

 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
 java.lang.Thread.run(Thread.java:595)



 --
 View this message in context: 
 http://www.nabble.com/help-with-struts-2-%2B-jfreechart-plugin-example-tf4726334.html#a13513669
 Sent from the Struts - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-- 
Alvaro Sanchez-Mariscal Arnaiz
Java EE Architect  Instructor
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Callback after AJAX call

2007-10-18 Thread Alvaro Sanchez-Mariscal
You can include your javasript call in a piece of code in the jsp
which is the result of the action.

Make sure to include executeScripts=true in your link/button.

Alvaro.

On 10/18/07, Eduardo Yáñez Parareda [EMAIL PROTECTED] wrote:
 Hello, I'm new to Struts 2.
 In a project we're using version 2.0.9, and have some questions about AJAX
 calls.
 How could I call a javascript function after making an AJAX call?

 I know that in future 2.1 version there is a afterNotifyTopics parameter
 that I could use
 to do that, but how could I do it on 2.0.9?

 We tried notifyTopics, but this one executes the javascript code before and
 after calling.

 --
 Eduardo Yáñez Parareda



-- 
Alvaro Sanchez-Mariscal Arnaiz
Java EE Architect  Instructor
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: question on autocompleter UI tag ...

2007-09-24 Thread Alvaro Sanchez-Mariscal
On 9/23/07, Musachy Barroso [EMAIL PROTECTED] wrote:
 Both will get submitted when the form is posted.

... only if the value is manually selected. If the autocompleter is
preloaded with an option selected, it's key will not be submitted.

https://issues.apache.org/struts/browse/WW-2126

Alvaro

-- 
Alvaro Sanchez-Mariscal Arnaiz
Java EE Architect  Instructor
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Struts 2 + Dojo nightmare

2007-09-20 Thread Alvaro Sanchez-Mariscal
Why not using dojo api to clone the node?
div id=source
  s:a theme=ajax href=${pruebaUrl} indicator=indicator
   loadingText=  targets=workspaceAjaxContent
   Try
  /s:a
/div

...

script type=text/javascript
function aver() {
   var sourceNode = dojo.byId('source');
   var targetNode = dojo.byId('workspaceAjaxContent');

   dojo.dom.copyChildren(sourceNode, targetNode);
}
/script

If copyChildren does not fit to your requirements, take a look at the
dojo.dom api:

http://dojo.inpdx.net/dojobox/trunk/api/#dojo.dom

Un saludo,

-- 
Alvaro Sanchez-Mariscal Arnaiz
Java EE Architect  Instructor
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [FRIDAY] JPA War Stories?

2007-09-15 Thread Alvaro Sanchez-Mariscal
We're also using Toplink JPA in Tomcat. Appart from the problems we
had configuring class weaving, it's quite simple for us.

On 9/14/07, Ted Husted [EMAIL PROTECTED] wrote:
 Since we've had the Struts2 Spring-JPA tutorial up for a while, I was
 wondering if many Struts developers were using a Java Persistence API
 implementation nowadays, whether the experience has been positive, and
 which implementation folks are using (Hibernate, TopLink, OpenJPA).

 So, any JPA war stories to tell?

 -Ted.

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
Alvaro Sanchez-Mariscal Arnaiz
Java EE Architect  Instructor
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to invalidate a session in struts 2.0

2007-09-12 Thread Alvaro Sanchez-Mariscal
I keep on saying that you can perform exactly the same with
LogoutAction, but keeping away code from JSP.

However, I agree that in very small apps is ok to do a little scripting.

Alvaro.

On 9/12/07, Gabriel Belingueres [EMAIL PROTECTED] wrote:
 I'm not a purist myself, so it may break the MVC model somewhere, but
 (at lest in the apps I coded) I didn't find any use case that forced
 my to invalidate the session into a Logout action class.

 In addition, I like to present messages like Thank you Your Name
 here and this information is usually in session scope, so
 invalidating the session in the action class would force me to
 transfer this information into request scope just for showing in the
 logout page.

 2007/9/11, Ray Clough [EMAIL PROTECTED]:
  The only thing wrong with it is that now you are putting application 
  control logic in a jsp page, which is 'OK' for small apps, and is probably 
  'OK' in this particular instance if there are no complicating factors.  
  However, for purists, it IS putting control logic in a jsp page, which 
  purists do not view as 'OK' (speaking as a purist myself, while 
  acknowledging this as a possible character flaw.).
  - Ray Clough
 
 
   - Original Message -
   From: Gabriel Belingueres [EMAIL PROTECTED]
   To: Struts Users Mailing List user@struts.apache.org
   Subject: Re: How to invalidate a session in struts 2.0
   Date: Tue, 11 Sep 2007 16:16:41 -0300
  
  
   Personally, I use the good old
  
   % session.invalidate(); %
  
   as the last instruction of my logout.jsp page.
  
   AFAIK, to invalidate the session inside an action, you must downcast
   the session Map (from the SessionAware interface) to a SessionMap
   class, which seems little awkward to me.
  
   Besides, using session.invalidate() doesn't seems to me like an
   anti-pattern or something wrong.
  
   Gabriel
  
   2007/9/11, illusion [EMAIL PROTECTED]:
   
Hey,
   
How to invalidate a Http Sesssion in struts 2.0?  There is a SessionMap
class which asks for a httpservletrequest as a parameter, and has an
invalidate method for the http session, not sure how this works.
   
thanks in advance for your assistance
--
View this message in context:
http://www.nabble.com/How-to-invalidate-a-session-in-struts-2.0-tf4424331.html#a12620475
Sent from the Struts - User mailing list archive at Nabble.com.
   
   
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   
   
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
 
  
 
 
 
  - Ray Clough
  [EMAIL PROTECTED]
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
Alvaro Sanchez-Mariscal Arnaiz
Java EE Architect  Instructor
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to invalidate a session in struts 2.0

2007-09-12 Thread Alvaro Sanchez-Mariscal
There is one extra reason in favour of doing in the action: it's
really simple. Sure.

You can implement ServletRequestAware, an call
request.getSession().invalidate();

Alvaro.

On 9/13/07, Chris Pratt [EMAIL PROTECTED] wrote:
 On 9/12/07, Gabriel Belingueres [EMAIL PROTECTED] wrote:
  I agree too that (generally speaking) we must introduce the least
  possible quantity of scripting into JSP pages as we can, so we honor
  the MVC architecture, however, in this particular case (invalidating
  the session), I don't understand why would be better to do it in the
  action class rather than in the JSP page for non-small apps.

 In my view, it's a maintainability issue.  If you keep all of your
 code in the .java files, except for one or two lines that are in
 scriplets, it becomes a nightmare for anyone else to maintain the
 code.  They would never think to look in the .jsp files for Java code,
 because that's not where the logic lives and it slows down the whole
 process of maintaining the site, or bringing people up to speed to
 maintain the site, so you can go off and do the fun things.

 On a related note, I think SessionAware should be updated to return a
 SessionMap (which is a subclass of Map, so shouldn't require any
 recoding of existing apps) so that type-casting isn't required to
 invalidate the session.
   (*Chris*)

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
Alvaro Sanchez-Mariscal Arnaiz
Java EE Architect  Instructor
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Refresh div with s:submit?

2007-09-11 Thread Alvaro Sanchez-Mariscal
Yes, you're right. The submit will execute an action whose result will
apear in the div you specified in the target attribute.

Be sure your submit has theme=ajax.

Alvaro.

On 9/11/07, Maria Lujan Salvadori [EMAIL PROTECTED] wrote:
 Hi, I'm starting with ajax and I want to reload a div after pressing a
 button. I use the s:submit and in the targets set the id of the div to be
 refresh. I would like just to refresh the content of this div, is necessary
 to draw the content of the div in a separate jsp and the result of the
 submit sent to this jsp? Is there any other way to do that?
 Thanks in advance
 ML



-- 
Alvaro Sanchez-Mariscal Arnaiz
Java EE Architect  Instructor
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Default tab in tabbedPanel loaded twice

2007-09-11 Thread Alvaro Sanchez-Mariscal
I'm using 2.0.8. I will try 2.0.9 right now.

Alvaro.

On 9/11/07, Marco Carnevale [EMAIL PROTECTED] wrote:
 Back to your original issue.  The loading of the default tab twice seems to
 have been resolved in 2.0.8 and/or 2.0.9.  I used to have the same problem
 using 2.0.6 until I upgraded.

 Marco


 On 9/10/07, Alvaro Sanchez-Mariscal [EMAIL PROTECTED]
 wrote:
 
  Any help on this?
 
  In a page with 6 tabs, 6 requests are made, and browser get freezed.
 
  autoStart=false doesn'w work. Is there another way to prevent tab
  preloading?
 
  https://issues.apache.org/struts/browse/WW-2166
 
  Alvaro.
 
  On 8/19/07, Alvaro Sanchez-Mariscal [EMAIL PROTECTED]
  wrote:
   Here is a screenshot of firebug:
  
   http://www.upload-images.net/imagen/7915ac25eb.gif
  
   On 8/19/07, Alvaro Sanchez-Mariscal [EMAIL PROTECTED]
  wrote:
Hi,
   
I have the following tabbed panel:
   
s:tabbedPanel id=panel
c:choose
c:when test=${sessionScope.user.departmentMember}
s:div id=myTab label=Mis acogidas autoStart=false
theme=ajax href=%{my} cssStyle=margin: 10px 10px 10px 10px;
listenTopics=/refresh executeScripts=true refreshOnShow=true/
s:div id=newTab label=Nueva acogida theme=ajax
href=%{new} cssStyle=margin: 10px 10px 10px 10px;
refreshOnShow=true/
/c:when
c:otherwise
s:div id=currentTab label=Acogidas en curso
  theme=ajax
href=%{current}  cssStyle=margin: 10px 10px 10px 10px;
executeScripts=true/
s:div id=searchTab label=Consultas autoStart=false
theme=ajax href=%{search} cssStyle=margin: 10px 10px 10px 10px;
refreshOnShow=true/
c:if test=${sessionScope.user.admin}
s:div id=adminTab label=Administracioacute;n
autoStart=false theme=ajax href=%{admin} cssStyle=margin: 10px
10px 10px 10px;/
/c:if
/c:otherwise
/c:choose
/s:tabbedPanel
   
(s:url's for href attributes omitted).
   
When the page first load, all tabs are requested in background, and
the default one (the first, myTab or currentTab in my case) is
requested another time.
   
I have tried with autoStart=false, but it doesn't work.
   
What's wrong?
   
Alvaro.
   
--
Alvaro Sanchez-Mariscal Arnaiz
Java EE Architect  Instructor
[EMAIL PROTECTED]
   
  
  
   --
   Alvaro Sanchez-Mariscal Arnaiz
   Java EE Architect  Instructor
   [EMAIL PROTECTED]
  
 
 
  --
  Alvaro Sanchez-Mariscal Arnaiz
  Java EE Architect  Instructor
  [EMAIL PROTECTED]
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 



-- 
Alvaro Sanchez-Mariscal Arnaiz
Java EE Architect  Instructor
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to invalidate a session in struts 2.0

2007-09-11 Thread Alvaro Sanchez-Mariscal
It is enough to develop a LogoutAction implementing
ServletRequestAware, and calling request.getSession().invalidate() in
its execute().

Alvaro.

On 9/11/07, Gabriel Belingueres [EMAIL PROTECTED] wrote:
 Personally, I use the good old

 % session.invalidate(); %

 as the last instruction of my logout.jsp page.

 AFAIK, to invalidate the session inside an action, you must downcast
 the session Map (from the SessionAware interface) to a SessionMap
 class, which seems little awkward to me.

 Besides, using session.invalidate() doesn't seems to me like an
 anti-pattern or something wrong.

 Gabriel

 2007/9/11, illusion [EMAIL PROTECTED]:
 
  Hey,
 
  How to invalidate a Http Sesssion in struts 2.0?  There is a SessionMap
  class which asks for a httpservletrequest as a parameter, and has an
  invalidate method for the http session, not sure how this works.
 
  thanks in advance for your assistance
  --
  View this message in context: 
  http://www.nabble.com/How-to-invalidate-a-session-in-struts-2.0-tf4424331.html#a12620475
  Sent from the Struts - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
Alvaro Sanchez-Mariscal Arnaiz
Java EE Architect  Instructor
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Default tab in tabbedPanel loaded twice

2007-09-10 Thread Alvaro Sanchez-Mariscal
Any help on this?

In a page with 6 tabs, 6 requests are made, and browser get freezed.

autoStart=false doesn'w work. Is there another way to prevent tab preloading?

https://issues.apache.org/struts/browse/WW-2166

Alvaro.

On 8/19/07, Alvaro Sanchez-Mariscal [EMAIL PROTECTED] wrote:
 Here is a screenshot of firebug:

 http://www.upload-images.net/imagen/7915ac25eb.gif

 On 8/19/07, Alvaro Sanchez-Mariscal [EMAIL PROTECTED] wrote:
  Hi,
 
  I have the following tabbed panel:
 
  s:tabbedPanel id=panel
  c:choose
  c:when test=${sessionScope.user.departmentMember}
  s:div id=myTab label=Mis acogidas autoStart=false
  theme=ajax href=%{my} cssStyle=margin: 10px 10px 10px 10px;
  listenTopics=/refresh executeScripts=true refreshOnShow=true/
  s:div id=newTab label=Nueva acogida theme=ajax
  href=%{new} cssStyle=margin: 10px 10px 10px 10px;
  refreshOnShow=true/
  /c:when
  c:otherwise
  s:div id=currentTab label=Acogidas en curso theme=ajax
  href=%{current}  cssStyle=margin: 10px 10px 10px 10px;
  executeScripts=true/
  s:div id=searchTab label=Consultas autoStart=false
  theme=ajax href=%{search} cssStyle=margin: 10px 10px 10px 10px;
  refreshOnShow=true/
  c:if test=${sessionScope.user.admin}
  s:div id=adminTab label=Administracioacute;n
  autoStart=false theme=ajax href=%{admin} cssStyle=margin: 10px
  10px 10px 10px;/
  /c:if
  /c:otherwise
  /c:choose
  /s:tabbedPanel
 
  (s:url's for href attributes omitted).
 
  When the page first load, all tabs are requested in background, and
  the default one (the first, myTab or currentTab in my case) is
  requested another time.
 
  I have tried with autoStart=false, but it doesn't work.
 
  What's wrong?
 
  Alvaro.
 
  --
  Alvaro Sanchez-Mariscal Arnaiz
  Java EE Architect  Instructor
  [EMAIL PROTECTED]
 


 --
 Alvaro Sanchez-Mariscal Arnaiz
 Java EE Architect  Instructor
 [EMAIL PROTECTED]



-- 
Alvaro Sanchez-Mariscal Arnaiz
Java EE Architect  Instructor
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Default tab in tabbedPanel loaded twice

2007-09-10 Thread Alvaro Sanchez-Mariscal
Is that attribute available in any 2.0.x version?

On 9/10/07, Musachy Barroso [EMAIL PROTECTED] wrote:
 Use the preload attribute.

 musachy

 On 9/10/07, Alvaro Sanchez-Mariscal [EMAIL PROTECTED] wrote:
  Any help on this?
 
  In a page with 6 tabs, 6 requests are made, and browser get freezed.
 
  autoStart=false doesn'w work. Is there another way to prevent tab 
  preloading?
 
  https://issues.apache.org/struts/browse/WW-2166
 
  Alvaro.
 
  On 8/19/07, Alvaro Sanchez-Mariscal [EMAIL PROTECTED] wrote:
   Here is a screenshot of firebug:
  
   http://www.upload-images.net/imagen/7915ac25eb.gif
  
   On 8/19/07, Alvaro Sanchez-Mariscal [EMAIL PROTECTED] wrote:
Hi,
   
I have the following tabbed panel:
   
s:tabbedPanel id=panel
c:choose
c:when test=${sessionScope.user.departmentMember}
s:div id=myTab label=Mis acogidas autoStart=false
theme=ajax href=%{my} cssStyle=margin: 10px 10px 10px 10px;
listenTopics=/refresh executeScripts=true refreshOnShow=true/
s:div id=newTab label=Nueva acogida theme=ajax
href=%{new} cssStyle=margin: 10px 10px 10px 10px;
refreshOnShow=true/
/c:when
c:otherwise
s:div id=currentTab label=Acogidas en curso 
theme=ajax
href=%{current}  cssStyle=margin: 10px 10px 10px 10px;
executeScripts=true/
s:div id=searchTab label=Consultas autoStart=false
theme=ajax href=%{search} cssStyle=margin: 10px 10px 10px 10px;
refreshOnShow=true/
c:if test=${sessionScope.user.admin}
s:div id=adminTab label=Administracioacute;n
autoStart=false theme=ajax href=%{admin} cssStyle=margin: 10px
10px 10px 10px;/
/c:if
/c:otherwise
/c:choose
/s:tabbedPanel
   
(s:url's for href attributes omitted).
   
When the page first load, all tabs are requested in background, and
the default one (the first, myTab or currentTab in my case) is
requested another time.
   
I have tried with autoStart=false, but it doesn't work.
   
What's wrong?
   
Alvaro.
   
--
Alvaro Sanchez-Mariscal Arnaiz
Java EE Architect  Instructor
[EMAIL PROTECTED]
   
  
  
   --
   Alvaro Sanchez-Mariscal Arnaiz
   Java EE Architect  Instructor
   [EMAIL PROTECTED]
  
 
 
  --
  Alvaro Sanchez-Mariscal Arnaiz
  Java EE Architect  Instructor
  [EMAIL PROTECTED]
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 --
 Hey you! Would you help me to carry the stone? Pink Floyd

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
Alvaro Sanchez-Mariscal Arnaiz
Java EE Architect  Instructor
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: ServletRequestAware

2007-09-02 Thread Alvaro Sanchez-Mariscal
As far as I know, the only way is asking HttpServletRequest, and thus,
implementing ServletRequestAware.

If you want to keep HttpServletRequest code out of your actions,
consider implementing an interceptor, or even a raw servlet filter.

Alvaro.

On 9/3/07, stanlick [EMAIL PROTECTED] wrote:

 I have an action that determines the requester IP address.  The action
 implements ServletRequestAware, but I don't like it being all tangled up in
 the Servlet API.  Is there a way to get the IP address another way.  The
 RequestAware interface seems to map to only request attributes.

 Thanks,
 S
 --
 View this message in context: 
 http://www.nabble.com/ServletRequestAware-tf4369669.html#a12454602
 Sent from the Struts - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
Alvaro Sanchez-Mariscal Arnaiz
Java EE Architect  Instructor
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to access request session objects in jsp using struts2 tags

2007-08-30 Thread Alvaro Sanchez-Mariscal
Use JSTL: ${requestContext.currentSection}.

The same applies for session: ${sessionContext. ...}

Alvaro.

On 8/30/07, Chris Pratt [EMAIL PROTECTED] wrote:
 If you just need access to the Request Attributes, try implementing
 RequestAware in your action.  If you need access to other, more
 Servlet specific, parts of the Request, you'll have tto implement
 ServletRequestAware.  Similarly for Sessions, if you just need the
 attributes, implement SessionAware, if you need full access implement
 ServletRequestAware and call request.getSession().
   (*Chris*)

 On 8/30/07, afp [EMAIL PROTECTED] wrote:
 
  Hi,
 
 I am trying to identify whether a button has been clicked or not in my
  jsp.
  The way I do this or is trying to do this is to access the request object
  and then check in that for the button name. The code is as shown below
 
  The button which was clicked is coded as shown below
  s:submit value=Continue action=InitAction_stub type=image
  title=Continue /
 
  The piece of code where I am trying to check for the button in the jsp
  s:if test=#request['action:InitAction_stub.x'] != null
  HI
  s:set name=abc.currentDisplaySection value=%{'All'} /
  % request.setAttribute(currentSection,All); %
  /s:if
  s:else
  % request.setAttribute(currentSection,no); %
  /s:else
 
  Now I know that the parameter action:InitAction_stub.x is present in the
  request Map as I can see that in the Action class which later forwards to
  the jsp. But I am unable to access it in the jsp.
 
  Is the way I am trying to access the request parameter wrong?
  If so how do I get a request parameter in the jsp - I saw the following
  usage in one of the struts2 pages
 
  s:property value=#request['action:InitAction_stub.x']/ this shud ideally
  print out the value of the button or any other request parameter. But
  nothing gets printed. So where am I going wrong and what do I need to do?
 
  Also along with this is there any way I can do the below without using
  scriptlets
  % request.setAttribute(currentSection,All); %
 
  Also say I have an object in my action class will I be able to rewrite the
  value of that object by using the set statement i.e. will s:set
  name=abc.currentDisplaySection value=%{'All'} / where abc is an object
  which is specified in the action class and has getters and setters. My doubt
  is whether the above statement will update the currentDisplaySection
  variable under abc object?? so that if I say print out the value later using
  a s:property value=abc.currentDisplaySection/ it shud print out 'All.
  Will this work??
 
 
  TIA,
  Arup
  --
  View this message in context: 
  http://www.nabble.com/How-to-access-request---session-objects-in-jsp-using-struts2-tags-tf4354438.html#a12407850
  Sent from the Struts - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
Alvaro Sanchez-Mariscal Arnaiz
Java EE Architect  Instructor
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Actions with same name but different packages namespaces

2007-08-27 Thread Alvaro Sanchez-Mariscal
You're right. I assumed that default namespace was package name.

Thank you!.

On 8/25/07, Laurie Harper [EMAIL PROTECTED] wrote:
 Alvaro Sanchez-Mariscal wrote:
  Hi,
 
  Is it possible to have actions with the same name but different
  packages  namespaces?
 
  package name=dashboard extends=hidra3-default
 action name=main
result/WEB-INF/jsp/dashboard/main.jsp/result
 /action
  /package
 
  package name=search extends=hidra3-default
 action name=main
result/WEB-INF/jsp/search/main.jsp/result
 /action
  /package
 
  Always, the first JSP declared in the XML file is returned. If we
  change action name to be uniques, everything works.
 
  What's wrong?

 What's wrong is that you don't have different packages  namespaces; you
 only have different packages. A package is not the same thing as a
 namespace.

 http://struts.apache.org/2.x/docs/package-configuration.html
 http://struts.apache.org/2.x/docs/namespace-configuration.html

 L.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
Alvaro Sanchez-Mariscal Arnaiz
Java EE Architect  Instructor
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [S2] Refresh JSP in Tomcat 5.5

2007-08-27 Thread Alvaro Sanchez-Mariscal
If you use Eclipse and WTP (ie, Servers view), a redeploy is not
required when changing JSP files.

Anothed option is to use jetty, if you use maven.

Alvaro.

On 8/27/07, hezjing [EMAIL PROTECTED] wrote:
 Hi

 I have a index.html that will redirect to WelcomeAction,

 = index.html =
 html
 head
 META HTTP-EQUIV=Refresh CONTENT=0;URL=welcome.action
 /head
 body
 pLoading .../p
 /body
 /html


 WelcomeAction does nothing but simply returns success from execute().

 = WelcomeAction.java =
 public class WelcomeAction extends ActionSupport {
 public String execute() throws Exception {
 return SUCCESS;
 }
 }


 Struts will then forward the result to index.jsp,

 = struts.xml =
 struts
   constant name=struts.objectFactory value=spring /
   constant name=struts.devMode value=true /
   package name=example extends=struts-default
 action name=welcome class=welcomeAction method=execute
   resultindex.jsp/result
 /action
   /package
 /struts

 = index.jsp =
 html
 head
 titleTITLE/title
 /head
 body
 /body
 /html


 All of this is working fine, I entered
 http://localhost:8080/myapp/index.html and the IE6 displayed the
 index.jsp.

 However, it will not display the latest JSP after I modified the
 content (e.g. the title) of the index.jsp until I restart Tomcat
 service.

 Do you know how to reload the JSP without restarting the Tomcat?


 Note: this seems to be not a Tomcat problem because it was able to
 display the latest JSP when I took out all the Struts 2's action and
 configuration.


 --

 Hez

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
Alvaro Sanchez-Mariscal Arnaiz
Java EE Architect  Instructor
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to set focus to a textbox?

2007-08-27 Thread Alvaro Sanchez-Mariscal
body onload=document,getElementById('userId').focus()
...

INPUT type=text name=userId id=userId/


Alvaro.



On 8/27/07, Cenk [EMAIL PROTECTED] wrote:
 Hi,

 i want to set focus to an input field on my index.jsp. But i could not
 manage...

 Here is the code segment below:
 ...
 body
 form action=/Login method=post
   table border=0
  tr
 tdLogin:/td
 tdINPUT type=text name=userId //td
   /tr
   tr
 ...


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
Alvaro Sanchez-Mariscal Arnaiz
Java EE Architect  Instructor
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Actions with same name but different packages namespaces

2007-08-24 Thread Alvaro Sanchez-Mariscal
Hi,

Is it possible to have actions with the same name but different
packages  namespaces?

package name=dashboard extends=hidra3-default
   action name=main
  result/WEB-INF/jsp/dashboard/main.jsp/result
   /action
/package

package name=search extends=hidra3-default
   action name=main
  result/WEB-INF/jsp/search/main.jsp/result
   /action
/package

Always, the first JSP declared in the XML file is returned. If we
change action name to be uniques, everything works.

What's wrong?

-- 
Alvaro Sanchez-Mariscal Arnaiz
Java EE Architect  Instructor
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Authentication and Authorization in S2

2007-08-23 Thread Alvaro Sanchez-Mariscal
What do you mean with 100% Struts 2 security? As far I know, S2 does
not have anything out-of-the-box regarding security.

In my case, I had to manually develop a login action and an
authentication interceptor.

Alvaro.

On 8/23/07, Arnaud Cogoluegnes [EMAIL PROTECTED] wrote:
 I'm using 100% Struts 2 security:
   - centralized store (simple Java class/XML config file) which maps roles
 and actions
   - interceptor if some user directly types the URL (based on the store)
   - custom tag for showing/hiding links (based on the store)

 This protects only *actions* and not data (i.e. which roles can see which
 rows in the database).


 -Message d'origine-
 De: wild_oscar [mailto:[EMAIL PROTECTED]
 Envoyé: jeudi 23 août 2007 16:15
 À: user@struts.apache.org
 Objet: Re: Authentication and Authorization in S2


 How about AA with Struts2 only?

 I'm trying to understand Authorization with JAAS, but I'm not being very
 successeful. Authentication is taken care of, I use JAAS and a PostgreSQL
 database to store users, passwords and roles.

 In the end of authentication, I store the subject in the HttpSession:

 HttpSession session = httprequest.getSession();
 session.setAttribute(subject_key, lc.getSubject());

 Bare in mind I first tried this in Struts; this week I switched to Struts2.
 Can anyone shed some light on the authorization part of the process with
 Struts2? Namely:

 a) Does one ever need to configure web.xml with security details and roles,
 for declarative security based on wildcards?

 or
 b) Is security only achieved at the action level?

 c) How does one build JSP pages that have parts protected (say, a
 form/button only available to certain roles)?

 Thank you for your help!

 Miguel, lost in Authorization



 Alvaro Sanchez-Mariscal wrote:
 
  I agree. You should first try Acegi.
 
  If your auth needs are very specific, you can always develop a custom
  interceptor.
 
  Alvaro.
 
  On 8/20/07, Zarar Siddiqi [EMAIL PROTECTED] wrote:
  If you're using Spring, it's probably a great idea to use Acegi
  Security to handle authentication/authorization.  I can't think of
  anything it can't do.
 
  http://www.acegisecurity.org/
 
  There's also Berkano which doesn't do nearly as much as Acegi but can
  handle most general AA problems:
 
  http://berkano.codehaus.org/
 
  Zarar
 
 
  On 8/20/07, Roberto Nunnari [EMAIL PROTECTED] wrote:
   Hi all.
  
   I need to implement Authentication and Authorization in
   a S2 web application, and before reinventing the wheel, I'd
   like to ask the list for hints and advice.
  
   1) Is there built-in support in Struts2 for Authentication and
   Authorization?
  
   2) What are the best practices for AA in S2?
  
   3) Is JAAS be a practical way in S2?
  
   More details:
   - The application lets the users dynamically register as members
   - In the application, the members can be part of one of two or three
   groups (roles)
   - unauthenticated users can only view some global data
   - authenticated users can change some of their own data
   - authenticated users can view some of other members data
   - the authenticated users can add global content
   - authenticated users in more privileged roles can change some global
  data
   - authenticated users in the admin role, can do anything
  
   Thank you.
  
   --
   Robi
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
  --
  Alvaro Sanchez-Mariscal Arnaiz
  Java EE Architect  Instructor
  [EMAIL PROTECTED]
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

 --
 View this message in context:
 http://www.nabble.com/Authentication-and-Authorization-in-S2-tf4300234.html#
 a12294512
 Sent from the Struts - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
Alvaro Sanchez-Mariscal Arnaiz
Java EE Architect  Instructor
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Mail undeliverable errors

2007-08-23 Thread Alvaro Sanchez-Mariscal
It seems that somebody is subscribed with a non-existent email address.

I added a filter in Gmail to automatically delete them.

Alvaro.

On 8/23/07, Pavel Sapozhnikov [EMAIL PROTECTED] wrote:
 Hi could anyone tell me is why is that why when every time I send email to
 this mailing list I get Mail undeliverable error but the actual email gets
 sent. I wasn't sure if I did something wrong?

 --
 Pavel Sapozhnikov
 xFact, Inc
 [EMAIL PROTECTED]



-- 
Alvaro Sanchez-Mariscal Arnaiz
Java EE Architect  Instructor
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Mail undeliverable errors

2007-08-23 Thread Alvaro Sanchez-Mariscal
Matches: from:(mclink.it)
Do this: Skip Inbox, Delete it

On 8/23/07, Pavel Sapozhnikov [EMAIL PROTECTED] wrote:
 Filter on what exactly? What do you filter?

 On 8/23/07, Alvaro Sanchez-Mariscal [EMAIL PROTECTED]
 wrote:
 
  It seems that somebody is subscribed with a non-existent email address.
 
  I added a filter in Gmail to automatically delete them.
 
  Alvaro.
 
  On 8/23/07, Pavel Sapozhnikov [EMAIL PROTECTED] wrote:
   Hi could anyone tell me is why is that why when every time I send email
  to
   this mailing list I get Mail undeliverable error but the actual email
  gets
   sent. I wasn't sure if I did something wrong?
  
   --
   Pavel Sapozhnikov
   xFact, Inc
   [EMAIL PROTECTED]
  
 
 
  --
  Alvaro Sanchez-Mariscal Arnaiz
  Java EE Architect  Instructor
  [EMAIL PROTECTED]
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 --
 Pavel Sapozhnikov
 xFact, Inc
 [EMAIL PROTECTED]



-- 
Alvaro Sanchez-Mariscal Arnaiz
Java EE Architect  Instructor
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Dojo 0.9 final. Time to migrate in S2?

2007-08-21 Thread Alvaro Sanchez-Mariscal
Hi Musachy,

Is the issue with tabbedpanel (default tab requested twice) resolved
in the latest version?

Also, where can I find a roadmap for version 2.1?

Thanks in advance.

Alvaro.

On 8/21/07, Musachy Barroso [EMAIL PROTECTED] wrote:
 The ajax tags are just becoming stable using Dojo 0.4.2, which will be
 included in Struts 2.1, I don't think Dojo 0.9 is going to make it
 into that version.

 musachy

 On 8/20/07, Alvaro Sanchez-Mariscal [EMAIL PROTECTED] wrote:
  Hi,
 
  Dojo 0.9 have just been released. Struts 2.0.X includes Dojo 0.4. When
  will be included Dojo 0.9?.
 
  Alvaro.
 
  --
  Alvaro Sanchez-Mariscal Arnaiz
  Java EE Architect  Instructor
  [EMAIL PROTECTED]
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 --
 Hey you! Would you help me to carry the stone? Pink Floyd

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
Alvaro Sanchez-Mariscal Arnaiz
Java EE Architect  Instructor
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



s:autocompleter theme=simple

2007-08-21 Thread Alvaro Sanchez-Mariscal
I'm using an autocompleter w/o ajax:

s:autocompleter name=stay.teacher.countryName theme=simple
list={'España','Portugal','Francia','Alemania','Holanda','Estados
Unidos'}
dropdownHeight=200 value=%{stay.teacher.countryName} /

The HTML generated is:

select dojoType=struts:ComboBox
id=teacherUpdateForm_stay_teacher_countryName dropdownHeight=200
name=stay.teacher.countryName keyName=stay.teacher.countryNameKey
initialValue=Francia
option value=EspañaEspaña/option
option value=PortugalPortugal/option
option value=Francia selected=selectedFrancia/option
option value=AlemaniaAlemania/option
option value=HolandaHolanda/option
option value=Estados UnidosEstados Unidos/option
/select

If I submit the form containing the autocompleter, the fields posted values are:

stay.teacher.countryName:   Francia
stay.teacher.countryNameKey: (empty)

However, if I select in the autocompleter the same item ('Francia' in my case):

a) A Javascript error is fired:

Permiso para obtener la propiedad HTMLDivElement.parentNode denegado
[Break on this error] throw _13||Error(_12);

(translation: permission denied to access HTMLDivElement.parentNode property)

b) The following is posted:

stay.teacher.countryName:  Francia
stay.teacher.countryNameKey:Francia

I'm using Struts 2.0.8 and Firefox 2.

Alvaro. 

-- 
Alvaro Sanchez-Mariscal Arnaiz
Java EE Architect  Instructor
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Session timeouts and Ajax

2007-08-21 Thread Alvaro Sanchez-Mariscal
Hi,

I'm facing the same problems as:

http://www.nabble.com/Refreshing-div-after-a-session-timeout-tf3918532.html#a1127
http://www.nabble.com/-S2inner-div%2C-session-timeout-and-login-page-tf2930534.html#a8193302
http://www.nabble.com/Handling-redirect-to-Login-page-on-session-timeout-for-ajax-requests-tf3652422.html#a10203012

Unfortunately, nobody has replied to those emails.

I have learned the following: if the request is being made manually
(dojo.io.bind), we are able to check the http status code (eg, 302,
redirected to login) and force a full window reload.

But if the request is being made via S2 ajax tags (ie, s:submit or
s:a), we do not have access to dojo.io.bind response.

How do you usually solve this?

Thank in advance.

Alvaro.

-- 
Alvaro Sanchez-Mariscal Arnaiz
Java EE Architect  Instructor
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Struts2: should we use Tiles or Sitemesh?

2007-08-20 Thread Alvaro Sanchez-Mariscal
My recommendation is sitemesh. Absolutly.

Sitemesh uses servlet filters to decorate pages (faster), while tiles
uses jsp includes (slower).

Alvaro.

On 8/20/07, sol myr [EMAIL PROTECTED] wrote:
 Hi,

   We're just migrating to Struts2, and we're trying to decide between Tiles 
 and Sitemesh.
   We've noticed that struts distribution (2.0.9) includes jars for both 
 frameworks.

   Could anyone please tell if one of them is recommended over the other, or 
 serves as standard de-facto for Struts2 ?

   Does one of them have better functionality, better design, better fit to 
 the Struts2 architecture, etc?
   And would you happen to know if they're both still in active development?

   Thanks a lot.



 -
 Sick sense of humor? Visit Yahoo! TV's Comedy with an Edge to see what's on, 
 when.


-- 
Alvaro Sanchez-Mariscal Arnaiz
Java EE Architect  Instructor
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Authentication and Authorization in S2

2007-08-20 Thread Alvaro Sanchez-Mariscal
I agree. You should first try Acegi.

If your auth needs are very specific, you can always develop a custom
interceptor.

Alvaro.

On 8/20/07, Zarar Siddiqi [EMAIL PROTECTED] wrote:
 If you're using Spring, it's probably a great idea to use Acegi
 Security to handle authentication/authorization.  I can't think of
 anything it can't do.

 http://www.acegisecurity.org/

 There's also Berkano which doesn't do nearly as much as Acegi but can
 handle most general AA problems:

 http://berkano.codehaus.org/

 Zarar


 On 8/20/07, Roberto Nunnari [EMAIL PROTECTED] wrote:
  Hi all.
 
  I need to implement Authentication and Authorization in
  a S2 web application, and before reinventing the wheel, I'd
  like to ask the list for hints and advice.
 
  1) Is there built-in support in Struts2 for Authentication and
  Authorization?
 
  2) What are the best practices for AA in S2?
 
  3) Is JAAS be a practical way in S2?
 
  More details:
  - The application lets the users dynamically register as members
  - In the application, the members can be part of one of two or three
  groups (roles)
  - unauthenticated users can only view some global data
  - authenticated users can change some of their own data
  - authenticated users can view some of other members data
  - the authenticated users can add global content
  - authenticated users in more privileged roles can change some global data
  - authenticated users in the admin role, can do anything
 
  Thank you.
 
  --
  Robi
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
Alvaro Sanchez-Mariscal Arnaiz
Java EE Architect  Instructor
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Dojo 0.9 final. Time to migrate in S2?

2007-08-20 Thread Alvaro Sanchez-Mariscal
Hi,

Dojo 0.9 have just been released. Struts 2.0.X includes Dojo 0.4. When
will be included Dojo 0.9?.

Alvaro.

-- 
Alvaro Sanchez-Mariscal Arnaiz
Java EE Architect  Instructor
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [S2][Tabbed panel] posting data from one tab

2007-08-19 Thread Alvaro Sanchez-Mariscal
Try prepending an slash, ie, /addProduct. Without it, it also didn't
worked to me.

Also, what happens exactly? Javascript errors? Have you tried
inspecting it with firebug?

Alvaro.

On 8/19/07, Eugen Stoianovici [EMAIL PROTECTED] wrote:
 Alvaro Sanchez-Mariscal wrote:
  Hi,
 
  I've done the same using topics:
 
  1) Publish on a topic after the request is executed (eg,
  notifyTopics=/submit in the s:submit).
 
  2) Register to the same topic in the s:div corresponding to the tab
  (eg, listenTopics=/submit in the s:div).
 
  Alvaro.
 
 
 Can you give me an example? what i did was:

 the master file: (the one where i define the tabbedpanel)
 s:tabbedPanel id=tabbedpanel
 s:div id=vendor label=Vendor href=%{#vendor_tab}
 theme=ajax /
 s:div id=shipment label=Shipment href=%{#shipment_tab}
 theme=ajax  /
 s:div id=products label=Products href=%{#products_tab}
 theme=ajax listenTopics=addProduct /
 /s:tabbedPanel


 the add product form:

 s:form action=addproduct validate=true
 s:textfield id=description name=product.description
 label=Description /
 s:textfield id=quantity name=product.quantity label=Quantity /
 s:textfield id=taxrate name=product.taxRate label=Tax Rate /
 s:textfield id=unitprice name=product.unitPrice label=Unit
 Price /
 s:submit value=Add notifyTopics=addProduct /
 /s:form


 Now, is there anything else i need to do in my action class or in those
 two jsp's? Because it doesn't work like this :(

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
Alvaro Sanchez-Mariscal
Arquitecto de Software Java EE
Salenda - www.salenda.es
Avd. Rey Juan Carlos I, 92. 28916 - Leganés (Madrid).
T: 91 101 0607 ext. 301 / F: 91 101 0608
M: +34.647.94.44.30
E: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Default tab in tabbedPanel loaded twice

2007-08-19 Thread Alvaro Sanchez-Mariscal
Hi,

I have the following tabbed panel:

s:tabbedPanel id=panel
c:choose
c:when test=${sessionScope.user.departmentMember}
s:div id=myTab label=Mis acogidas autoStart=false
theme=ajax href=%{my} cssStyle=margin: 10px 10px 10px 10px;
listenTopics=/refresh executeScripts=true refreshOnShow=true/
s:div id=newTab label=Nueva acogida theme=ajax
href=%{new} cssStyle=margin: 10px 10px 10px 10px;
refreshOnShow=true/
/c:when
c:otherwise
s:div id=currentTab label=Acogidas en curso theme=ajax
href=%{current}  cssStyle=margin: 10px 10px 10px 10px;
executeScripts=true/
s:div id=searchTab label=Consultas autoStart=false
theme=ajax href=%{search} cssStyle=margin: 10px 10px 10px 10px;
refreshOnShow=true/
c:if test=${sessionScope.user.admin}
s:div id=adminTab label=Administracioacute;n
autoStart=false theme=ajax href=%{admin} cssStyle=margin: 10px
10px 10px 10px;/
/c:if
/c:otherwise  
/c:choose 
/s:tabbedPanel

(s:url's for href attributes omitted).

When the page first load, all tabs are requested in background, and
the default one (the first, myTab or currentTab in my case) is
requested another time.

I have tried with autoStart=false, but it doesn't work.

What's wrong?

Alvaro.

-- 
Alvaro Sanchez-Mariscal Arnaiz
Java EE Architect  Instructor
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Default tab in tabbedPanel loaded twice

2007-08-19 Thread Alvaro Sanchez-Mariscal
Here is a screenshot of firebug:

http://www.upload-images.net/imagen/7915ac25eb.gif

On 8/19/07, Alvaro Sanchez-Mariscal [EMAIL PROTECTED] wrote:
 Hi,

 I have the following tabbed panel:

 s:tabbedPanel id=panel
 c:choose
 c:when test=${sessionScope.user.departmentMember}
 s:div id=myTab label=Mis acogidas autoStart=false
 theme=ajax href=%{my} cssStyle=margin: 10px 10px 10px 10px;
 listenTopics=/refresh executeScripts=true refreshOnShow=true/
 s:div id=newTab label=Nueva acogida theme=ajax
 href=%{new} cssStyle=margin: 10px 10px 10px 10px;
 refreshOnShow=true/
 /c:when
 c:otherwise
 s:div id=currentTab label=Acogidas en curso theme=ajax
 href=%{current}  cssStyle=margin: 10px 10px 10px 10px;
 executeScripts=true/
 s:div id=searchTab label=Consultas autoStart=false
 theme=ajax href=%{search} cssStyle=margin: 10px 10px 10px 10px;
 refreshOnShow=true/
 c:if test=${sessionScope.user.admin}
 s:div id=adminTab label=Administracioacute;n
 autoStart=false theme=ajax href=%{admin} cssStyle=margin: 10px
 10px 10px 10px;/
 /c:if
 /c:otherwise
 /c:choose
 /s:tabbedPanel

 (s:url's for href attributes omitted).

 When the page first load, all tabs are requested in background, and
 the default one (the first, myTab or currentTab in my case) is
 requested another time.

 I have tried with autoStart=false, but it doesn't work.

 What's wrong?

 Alvaro.

 --
 Alvaro Sanchez-Mariscal Arnaiz
 Java EE Architect  Instructor
 [EMAIL PROTECTED]



-- 
Alvaro Sanchez-Mariscal Arnaiz
Java EE Architect  Instructor
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [S2][Tabbed panel] posting data from one tab

2007-08-19 Thread Alvaro Sanchez-Mariscal
If the URL changes, then a normal http post is being fired, instead of
an ajax request.

What's your struts.ui.theme in struts.properties? If it is not ajax,
try using theme=ajax in the s:form and in the s:submit tags.

Did you included the s:head tag (http://struts.apache.org/2.x/docs/head.html)?

On 8/19/07, Eugen Stoianovici [EMAIL PROTECTED] wrote:
 Alvaro Sanchez-Mariscal wrote:
  Try prepending an slash, ie, /addProduct. Without it, it also didn't
  worked to me.
 
  Also, what happens exactly? Javascript errors? Have you tried
  inspecting it with firebug?
 
  Alvaro.
 
  On 8/19/07, Eugen Stoianovici [EMAIL PROTECTED] wrote:
 
 I've tried it with /addProduct and i've also moved the products pane to
 to the addpo.jsp page (so now, it isn't a remote pane). There's nothing
 wrong happening, it just takes me to the first tab after i press the add
 button. I mean: the data gets posted, everything is in place...it's just
 that it displays the first tab instead of the 3th.
 The url changes from addpo.jsp to addproduct.action. Is this a problem?

 Here's the code:
 action mapping:
 action name=addproduct class=addPoAction method=addProduct
 result/popages/addpo.jsp/result
 result name=input/popages/addpo.jsp/result
 /action

 The jsp:

 !-- addpo.jsp--
 s:tabbedPanel id=tabbedpanel
 s:div id=vendor label=Vendor href=%{#vendor_tab} theme=ajax /
 s:div id=shipment label=Shipment href=%{#shipment_tab}
 theme=ajax /
 !-- the form--
 s:div id=products label=Products
 theme=ajax listenTopics=/addProduct
 div style=border-style: solid
 pAdd new product to list/p
 s:form action=addproduct validate=true
 s:textfield id=description name=product.description
 label=Description /
 s:textfield id=quantity name=product.quantity
 label=Quantity /
 s:textfield id=taxrate name=product.taxRate label=Tax
 Rate /
 s:textfield id=unitprice name=product.unitPrice
 label=Unit Price /
 s:submit value=Add notifyTopics=/addProduct /
 /s:form/div
 /s:div
 /s:tabbedPanel

 jsp warnings: (there are no errors):

 Warning: Unknown property '_zoom'.  Declaration dropped.
 Source File: http://localhost:8080/POPSWeb/addproduct.action
 Line: 7

 Warning: Unknown property '_margin-bottom'.  Declaration dropped.
 Source File: http://localhost:8080/POPSWeb/addproduct.action
 Line: 24

 Warning: Error in parsing value for property 'display'.  Declaration
 dropped.
 Source File: http://localhost:8080/POPSWeb/addproduct.action
 Line: 47

 Warning: Expected ':' but found 'none'.  Declaration dropped.
 Source File: http://localhost:8080/POPSWeb/addproduct.action
 Line: 0

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
Alvaro Sanchez-Mariscal Arnaiz
Java EE Architect  Instructor
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [S2][Tabbed panel] posting data from one tab

2007-08-17 Thread Alvaro Sanchez-Mariscal
Hi,

I've done the same using topics:

1) Publish on a topic after the request is executed (eg,
notifyTopics=/submit in the s:submit).

2) Register to the same topic in the s:div corresponding to the tab
(eg, listenTopics=/submit in the s:div).

Alvaro.

On 8/17/07, Clement, Steve [EMAIL PROTECTED] wrote:

 You should be able to set the listenTopic attribute on the div for that
 panel, and then notify the topic (I think this is on the s:submit tag,
 but I could be mistaken). See
 http://struts.apache.org/2.0.9/docs/tag-reference.html for more details.

 This works if your theme ajax.

 One thing I have found, however, is that if you use the rich text editor
 for a textarea, the content of that textarea does not submit for some
 reason. Other form controls submit fine.

 Steve Clement
 -Original Message-
 From: Eugen Stoianovici [mailto:[EMAIL PROTECTED]
 Sent: Friday, August 17, 2007 8:24 AM
 To: Struts Users Mailing List
 Subject: [S2][Tabbed panel] posting data from one tab

 i have a tabbedpanel which displays several tabs one of which contains a

 form. How do i turn back to that tab after i've pressed the submit
 button on that form?

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
Alvaro Sanchez-Mariscal
Arquitecto de Software Java EE
Salenda - www.salenda.es
Avd. Rey Juan Carlos I, 92. 28916 - Leganés (Madrid).
T: 91 101 0607 ext. 301 / F: 91 101 0608
M: +34.647.94.44.30
E: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]