Re: problems nesting TileResults....

2008-05-11 Thread Antonio Petrelli
Version of Struts and Tiles?

Antonio

2008/5/9 Darren James <[EMAIL PROTECTED]>:
> Hello All,
>
> I have a flow that is basically a toplevel struts2 action having a result of
> type TilesResult.  That tile
> result has as one if it's attributes another struts2 action that also has a
> result of type TilesResult.
> So my tiles.xml looks like this (I've changed names and attributes to try to
> simplify the example
> as much as possible)
>
>   
>/>
>   
>   
>
>
>   
>    stuff
>
>
> ---
>
> So i have an action, call it showPage.action that forwards to pageLevelTile,
> then
> within pageLevelTile the "body" attribute invokes the action
> findTileBody.action
> that eventually forwards to the moduleLevelTile.
>
> The issue with this is the browser only renders the moduleLevelTile (all the
> surrounding page-level stuff gets wiped out for some reason), and I'm seeing
> this
> exception:
>
> -
> SEVERE: Servlet.service() for servlet default threw exception
> java.io.IOException: Error including path
> '/WEB-INF/tiles/templates/yuiDocTemplate.jsp'.
> java.lang.IllegalStateException: Exception occurred when flushing data
>   at
> org.apache.tiles.servlet.context.ServletTilesRequestContext.forward(ServletTilesRequestContext.java:201)
>   at
> org.apache.tiles.servlet.context.ServletTilesRequestContext.dispatch(ServletTilesRequestContext.java:185)
>   at
> org.apache.tiles.context.TilesRequestContextWrapper.dispatch(TilesRequestContextWrapper.java:72)
>   at
> org.apache.struts2.tiles.StrutsTilesRequestContext.dispatch(StrutsTilesRequestContext.java:86)
>   at
> org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:417)
>   at
> org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:368)
>   at
> org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:104)
>   at
> org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:178)
>   at
> com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:348)
>   at
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:253)
>   at
> org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:170)
>   at
> com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
> -
>
> Any ideas?
>
> thanks much,
>
> - darren.
>
>
>
>
>
> -
> 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]



Re: Struts2 cancel button with ajax theme does not execute method (bug?)

2008-05-11 Thread Jeromy Evans

Yayo wrote:

Hi,

i'd like to discuss with you for in case you've found it before.

I've got a div ... that I fill with my ajax results
so I present a list inside of the result div, then user clicks on an element
and the response goes inside for editing.

Then in the edition details I've added two buttons, a submit and a cancel
like this:




And I've found that the one I've marked with cancel button never executes
the cancel method in my action unless I delete the theme="ajax" attribute...

¿May this be a bug?

  


If your ajax result itself includes javascript (such an an ajax submit), 
then you need to use the separateSripts and executeScripts attributes of 
the div/submit that loads it.
Dojo is responsible for parsing your ajax result, looking for scripts, 
inserting the html into the dom and then executing those scripts.


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



Re: TabbedPanel in Struts2

2008-05-11 Thread Jeromy Evans

Jay Bose wrote:

I was using tabbedPanel, with the Ajax theme in WebWork-2; no problem.

After my upgrade to Struts-2.0.11, I no longer get decorated tabs. The ajax 
recipes were
not as helpful as I would have liked
(http://struts.apache.org/2.x/docs/ajax-and-javascript-recipes.html#AjaxandJavaScriptRecipes-TabbedPanel).
 


Has anyone been able to use the ajax tabbedPanel in Struts-2.0.6+ (pre-2.1.x)?

  


Yes, I had no problems with it in 2.0.x.  Are you seeing any errors in 
FireBug (such as 404s)?



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



TabbedPanel in Struts2

2008-05-11 Thread Jay Bose
I was using tabbedPanel, with the Ajax theme in WebWork-2; no problem.

After my upgrade to Struts-2.0.11, I no longer get decorated tabs. The ajax 
recipes were
not as helpful as I would have liked
(http://struts.apache.org/2.x/docs/ajax-and-javascript-recipes.html#AjaxandJavaScriptRecipes-TabbedPanel).
 

Has anyone been able to use the ajax tabbedPanel in Struts-2.0.6+ (pre-2.1.x)?


  

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

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



Re: redirect after logging in

2008-05-11 Thread Jim Kiley
I wouldn't implement it with interceptors so much as I'd look into something
like Acegi Security (now Spring Security if I remember right).  I'm having a
decent level of success on an Acegi / Sitemesh / Struts 2 / Spring /
Hibernate project right now.

jk

On Fri, May 9, 2008 at 6:01 PM, Jaarthy <[EMAIL PROTECTED]> wrote:

>
> Hi,
>
> I'm trying to implement a scenario in which if the user who has not logged
> in clicks on a page "for logged in users only"  should be
> redirected to "login page", and then after logging in he should be
> redirected to the page he originally requested for.
>
> I need to implement this in struts2.Can I achieve this using
> Interceptors?Kindly help.
>
> Thanks,
> Aarthy
>
> --
> View this message in context:
> http://www.nabble.com/redirect-after-logging-in-tp17157183p17157183.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Jim Kiley
Technical Consultant | Summa
[p] 412.258.3346 [m] 412.445.1729
http://www.summa-tech.com


Re: [Struts2] Exception starting filter (Connection Timed Out)

2008-05-11 Thread Pierre Thibaudeau
Thanks for the suggestion, but I use Spring very heavily!  ;)
(Everything's bean-ified, and dependency injected...)

2008/5/5 KonTiki <[EMAIL PROTECTED]>:

>
> The Spring context listener is needed only if you do use Spring.
> If you do not, then this might be causing the error as Tomcat was unable
> to
> find the Spring classes.
>
> Try removing this:
> 
>
>
> org.springframework.web.context.ContextLoaderListener
>
>
>
>
> org.springframework.web.context.request.RequestContextListener
>
>


Struts2 cancel button with ajax theme does not execute method (bug?)

2008-05-11 Thread Yayo
Hi,

i'd like to discuss with you for in case you've found it before.

I've got a div ... that I fill with my ajax results
so I present a list inside of the result div, then user clicks on an element
and the response goes inside for editing.

Then in the edition details I've added two buttons, a submit and a cancel
like this:




And I've found that the one I've marked with cancel button never executes
the cancel method in my action unless I delete the theme="ajax" attribute...

¿May this be a bug?


-- 
"Sit tibi terra levis"

http://yayocaturas.blogspot.com/


Re: Struts 3 will be there?

2008-05-11 Thread Frans Thamura
On Sun, May 11, 2008 at 10:48 PM, KonTiki <[EMAIL PROTECTED]> wrote:

>
> Are you asking about Struts 2.0, which is already here and well, or Struts
> 3.0, which no-one has seen yet?
>

sorry wrong typo, 3.0

F


Re: default interceptor stack

2008-05-11 Thread KonTiki

(This is really "theorizing with insufficient data" but) have you checked
what your packages extend from, via the "extends" property...


Gabriel Belingueres-2 wrote:
> 
> 2008/5/9, David Harland <[EMAIL PROTECTED]>:
>> Is it possible to set a different default interceptor stack per package
>> using   default-interceptor-ref?
> 
> Yes.
> 
> I have split my struts configuration into mutiple files each with a
> different package name. I have set the default in the first file and
> the default for the second in the second file but the second default
> seems to be being used in the first package.
>>
> 
> Show us your packages.
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/default-interceptor-stack-tp17152691p17170592.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: Struts 3 will be there?

2008-05-11 Thread KonTiki

Are you asking about Struts 2.0, which is already here and well, or Struts
3.0, which no-one has seen yet?


Frans Thamura-2 wrote:
> 
> hi there
> 
> JSFgoes to 2.0
> 
> will Struts goes to 2.0?
> 
> F
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Struts-3-will-be-there--tp17169502p17170584.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: UnknownHandler

2008-05-11 Thread Jeromy Evans

Hi Kal,

The UnknownHandler needs to be defined in struts.xml or 
struts-plugin.xml as a bean.
See the struts-plugin.xml file included in the CodeBehind plugin for an 
example.


Declaring the bean in struts.xml registers the implementation with the 
Struts 2 Container (an XWork Container). It is then injected into other 
beans created by the framework when needed.


You may have noticed in the DefaultActionProxy that the UnknownHandler's 
setter carries the @Inject annotation and an required=false flag. The 
framework wires this setter to the UnknownHandler implementation you 
register with the container.


regards,
Jeromy Evans

kal stevens wrote:

I have been trying to implement an UnknownHandler, and I can not seem to
find any documentation on how to integrate it into the framework.

I am using spring for DependencyInjection, so I thought that I could just
add a bean named unknownHandler, but that did not work.

I could not find an example of how to set the unknownHandler field in
DefaultActionProxy.

Looking at the source code it looks like I have to apply the
StrutsSpringObjectFactory injector to the DefaultActionProxy but I am not
sure why that us happening.

The map Class -> injectors contains an injector for Spring but it has no
classes.


I am not exactly sure where to look on how to do this.

Thanks


Kal

  



No virus found in this incoming message.
Checked by AVG. 
Version: 7.5.524 / Virus Database: 269.23.10/1421 - Release Date: 7/05/2008 5:23 PM
  



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



Re: How to create a new Struts2 project with maven2?

2008-05-11 Thread Makrand

To fix this error , here is the attached JAR file which you can upload using
mvn install file..

Thai Dang Vu-4 wrote:
> 
> I tried what you suggested, but still got error:
> 
>  mvn -e archetype:create -DgroupId=home.struts2
> -DartifactId=struts2-example -DarchetypeGroupId=org.apache.struts
> -DarchetypeArtifactId=struts2-archetype-starter -DarchetypeVersion=2.0.11
> -DremoteRepositories=http://people.apache.org/builds/struts/m2-staging-repository
> + Error stacktraces are turned on.
> [INFO] Scanning for projects...
> [INFO] Searching repository for plugin with prefix: 'archetype'.
> [INFO]
> 
> [INFO] Building Maven Default Project
> [INFO]task-segment: [archetype:create] (aggregator-style)
> [INFO]
> 
> [INFO] Setting property: classpath.resource.loader.class =>
> 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
> [INFO] Setting property: velocimacro.messages.on => 'false'.
> [INFO] Setting property: resource.loader => 'classpath'.
> [INFO] Setting property: resource.manager.logwhenfound => 'false'.
> [INFO] ** 
> [INFO] Starting Jakarta Velocity v1.4
> [INFO] RuntimeInstance initializing.
> [INFO] Default Properties File:
> org/apache/velocity/runtime/defaults/velocity.properties
> [INFO] Default ResourceManager initializing. (class
> org.apache.velocity.runtime.resource.ResourceManagerImpl)
> [INFO] Resource Loader Instantiated:
> org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader
> [INFO] ClasspathResourceLoader : initialization starting.
> [INFO] ClasspathResourceLoader : initialization complete.
> [INFO] ResourceCache : initialized. (class
> org.apache.velocity.runtime.resource.ResourceCacheImpl)
> [INFO] Default ResourceManager initialization complete.
> [INFO] Loaded System Directive:
> org.apache.velocity.runtime.directive.Literal
> [INFO] Loaded System Directive:
> org.apache.velocity.runtime.directive.Macro
> [INFO] Loaded System Directive:
> org.apache.velocity.runtime.directive.Parse
> [INFO] Loaded System Directive:
> org.apache.velocity.runtime.directive.Include
> [INFO] Loaded System Directive:
> org.apache.velocity.runtime.directive.Foreach
> [INFO] Created: 20 parsers.
> [INFO] Velocimacro : initialization starting.
> [INFO] Velocimacro : adding VMs from VM library template :
> VM_global_library.vm
> [ERROR] ResourceManager : unable to find resource 'VM_global_library.vm'
> in any resource loader.
> [INFO] Velocimacro : error using  VM library template VM_global_library.vm
> : org.apache.velocity.exception.ResourceNotFoundException: Unable to find
> resource 'VM_global_library.vm'
> [INFO] Velocimacro :  VM library template macro registration complete.
> [INFO] Velocimacro : allowInline = true : VMs can be defined inline in
> templates
> [INFO] Velocimacro : allowInlineToOverride = false : VMs defined inline
> may NOT replace previous VM definitions
> [INFO] Velocimacro : allowInlineLocal = false : VMs defined inline will be 
> global in scope if allowed.
> [INFO] Velocimacro : initialization complete.
> [INFO] Velocity successfully started.
> [INFO] [archetype:create]
> [INFO] Defaulting package to group ID: home.struts2
> [INFO] We are using command line specified remote repositories:
> http://people.apache.org/builds/struts/m2-staging-repository
> Downloading:
> http://people.apache.org/builds/struts/m2-staging-repository/org/apache/struts/struts2-archetype-starter/2.0.11/struts2-archetype-starter-2.0.11.jar
> [INFO]
> 
> [ERROR] BUILD ERROR
> [INFO]
> 
> [INFO] Error creating from archetype
> 
> Embedded error: Archetype does not exist.
> Unable to download the artifact from any repository
> [INFO]
> 
> [INFO] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: Error creating
> from archetype
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:564)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:493)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:463)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:224)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:333)
> at org.apache.maven.DefaultMaven.execute(Defaul