Re: How to render an action URL

2015-07-15 Thread Mats Nyberg
Thanks for your reply Lukasz,

I will look into @Injecting an UrlRenderer into my DispatchListener,
but I believe this requires an UI Component.

Since I only need simple URLs (no parameters) I might build them 
myself. Only issue with that miht be the ”web context”; if the app
resides under an app name. Mine doesn’t so I think I take the XP 
route and do this QnD.

Thanks for your reply though.
Great work with the Struts!

Cheers


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: How to render an action URL

2015-07-13 Thread Lukasz Lenart
You can try to use Struts' @Inject to inject what is needed

2015-07-12 18:51 GMT+02:00 Mats Nyberg i...@jollobajano.com:
 I must appologise for my last mail. I must have been exhausted or worse 
 writing it.

 What I have done so far, not mentioned previously is:

  - An @ActionMenu(”path/to/menuitem”)

  - A DispatcherListener, added in an ServletContextListener

 After the DispatcherListener have run through all declared actions of the app 
 I
 have collected a data structure that holds both

  - tree structure of ActionMenuItems and their parents

  - a collected list of [namespace, actionname, menupath] for annotated actions
this could be used by an Interceptor to set actice/selected states in the 
 Session
object, for instance.

 Now, I have tried to get hold of a Struts object to help me render action 
 urls for the list
 of annotated action tuples. A pointer to the way to do this in Struts would 
 be honestly
 appreciated.

 And my honest appologices for the last mail as well.

 Cheers
 Mats




 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: How to render an action URL

2015-07-12 Thread Mats Nyberg
I must appologise for my last mail. I must have been exhausted or worse writing 
it.

What I have done so far, not mentioned previously is:

 - An @ActionMenu(”path/to/menuitem”)

 - A DispatcherListener, added in an ServletContextListener

After the DispatcherListener have run through all declared actions of the app I 
have collected a data structure that holds both

 - tree structure of ActionMenuItems and their parents

 - a collected list of [namespace, actionname, menupath] for annotated actions
   this could be used by an Interceptor to set actice/selected states in the 
Session
   object, for instance.

Now, I have tried to get hold of a Struts object to help me render action urls 
for the list
of annotated action tuples. A pointer to the way to do this in Struts would be 
honestly
appreciated.

And my honest appologices for the last mail as well.

Cheers
Mats




-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org