RE: Struts2 - JSF Plugin - Richfaces

2010-07-19 Thread Stefano Corallo
Hi Martin,

thanks for you reply: the jsf plugin is here:
http://struts.apache.org/2.x/docs/jsf-plugin.html

is one of the bundled plugin.


Il giorno dom, 18/07/2010 alle 11.30 -0400, Martin Gainty ha scritto:
 2 different architectures
 JSF does NOT have a FE controller..struts does
 JSF does not support Interceptors ..struts does
 JSF does not support JS component libraries such as Dojo and
 JQuery ...struts does 
 
  
 
 out of curiosity where did you view this jsf-plugin ?
 Martin Gainty 


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



Re: Any way to load resources in java.util.ResourceBundle

2010-07-19 Thread J_e_f_f

D'oh! Yeah, that was a typo. Should say struts.xml.

Could you post some relevant code snippets? Also, do you see anything in the
logs when the application starts up?  

Jeff


Greg Akins-2 wrote:
 
 On Fri, Jul 16, 2010 at 9:24 PM, J_e_f_f jam0...@gmail.com wrote:

 If you're specifying your DbResourceBundle class in the web.xml like:
 


 constant name=struts.custom.i18n.resources
 value=com.insomnia.common.bundles.DbResourceBundle /

 
 Was that a typo?  Did you mean struts.xml?  I have it in struts.xml,
 but it doesn't seem to be getting called.  Maybe it should be in
 web.xml .. in that case as an init-param on the Dispatcher filter.
 Right?
 
 -- 
 Greg Akins
 
 http://insomnia-consulting.org
 http://www.pghcodingdojo.org
 http://pittjug.dev.java.net
 http://twitter.com/akinsgre
 http://www.linkedin.com/in/akinsgre
 
 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org
 
 
 

-- 
View this message in context: 
http://old.nabble.com/Re%3A-Any-way-to-load-resources-in-java.util.ResourceBundle-tp29182865p29203668.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



RE: Help Dojo TagLibs

2010-07-19 Thread Martin Gainty

last time i checked templateDir was in struts.properties which would configure 
templateDir for the entire webapp
you can also override templateDir attribute in the component definition

sx:datetimepicker templateDir=NewDirectoryForTemplate

/

 

musachy would also know where these values are stored

 

obrigado
Martin  
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.

Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.



 

 From: fabio.eb...@dnasolution.com.br
 To: user@struts.apache.org
 Subject: Re: Help Dojo TagLibs
 Date: Mon, 19 Jul 2010 09:10:15 -0300
 
 How i do this?
 - Original Message - 
 From: Martin Gainty mgai...@hotmail.com
 To: Struts Users Mailing List user@struts.apache.org
 Sent: Sunday, July 18, 2010 1:01 PM
 Subject: RE: Help Dojo TagLibs
 
 
 
 did you touch your templateDir or templateCssPath??
 
 
 you can override either attribute in your components declaration
 
 
 Martin Gainty
 __
 Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
 Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene 
 Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte 
 Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht 
 dient lediglich dem Austausch von Informationen und entfaltet keine 
 rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von 
 E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
 
 Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
 destinataire prévu, nous te demandons avec bonté que pour satisfaire 
 informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie 
 de ceci est interdite. Ce message sert à l'information seulement et n'aura 
 pas n'importe quel effet légalement obligatoire. Étant donné que les email 
 peuvent facilement être sujets à la manipulation, nous ne pouvons accepter 
 aucune responsabilité pour le contenu fourni.
 
 
 
 
 
  From: fabio.eb...@dnasolution.com.br
  To: user@struts.apache.org
  Subject: Help Dojo TagLibs
  Date: Thu, 15 Jul 2010 09:23:37 -0300
 
  Hi, i trying to use the datetimepicker in my app, but when i change in my 
  Web.xml the struts2 url-pattern to /jsp/* all my tags stop to work, no 
  longer appears the visual :(
 
  follow my jsp:
 
  %@ page language=java contentType=text/html; charset=ISO-8859-1
  pageEncoding=ISO-8859-1%
  %@ taglib prefix=s uri=/struts-tags%
  %@ taglib prefix=sx uri=/struts-dojo-tags%
  !DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN 
  http://www.w3.org/TR/html4/loose.dtd;
  html
  head
  sx:head debug=false/
  SCRIPT type=text/javascript
  dojo.event.topic.subscribe(/beforeSelect, function(event, tab, 
  tabContainer){
  // event.cancel = true;
  alert(boaaa);
  });
  /SCRIPT
  meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1
  titleInsert title here/title
  /head
  body
  a href=jsp/usuario/loginUsuario.jspUsuario/a
  a href=jsp/cliente/loginCliente.jspCliente/ap /
 
 
  sx:datetimepicker name=picker /p /
 
 
  /body
  /html
 
 
  tks
 
 _
 The New Busy is not the too busy. Combine all your e-mail accounts with 
 Hotmail.
 http://www.windowslive.com/campaign/thenewbusy?tile=multiaccountocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_4
 
 
 
 
 
 
 No virus found in this incoming message.
 Checked by AVG - www.avg.com
 Version: 9.0.839 / Virus Database: 271.1.1/3009 - Release Date: 07/16/10 
 03:35:00
 
 
 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org
 
  
_
Hotmail is redefining busy with tools for the New Busy. Get more from your 
inbox.

Re: Repopulating rich controls

2010-07-19 Thread Greg Lindholm
What you are describing as odd behavior is actually normal and
expected. With Struts the URL shown in the browser will always be the
action name it will never be the jsp. You may wish to read up a
little on how Servlets and forwarding works (just google servlet
forward).

Just replying I did what you said and it didn't work (this list get
messages like this every day) doesn't provide any additional
information that would allow someone to help you.

Did you implement the Preparable interface?  Did you run your app in
the debugger and break in your prepare() method?  What does you
prepare method look like?

The best way to get help is to provide a detailed description of what
you actually did including code and configuration samples.

The best way to help yourself (and learn) is to run your app in the
debugger and find out what it is actually doing.

On Mon, Jul 19, 2010 at 1:51 AM, Guy Thomas guy.tho...@vlaamsbrabant.be wrote:
 Hello Greg,

 I had tried to apply the instructions on the web page you sent me, but as 
 explained in my mail, it did not work. I must have done something wrong.

 One of the symptoms of an odd behavior is that I'm taken back to the jsp 
 page with the form (index.jsp) when I forget to fill in something in the 
 search text field, but that the url still shows the target action of the form 
 and ... the rich controls are not repopulated.

 Guy

 -Oorspronkelijk bericht-
 Van: Greg Lindholm [mailto:greg.lindh...@gmail.com]
 Verzonden: vrijdag 16 juli 2010 19:38
 Aan: Struts Users Mailing List
 Onderwerp: Re: Repopulating rich controls

 From the Struts 2 FAQ

 http://struts.apache.org/2.1.8.1/docs/how-do-we-repopulate-controls-when-validation-fails.html


 On Fri, Jul 16, 2010 at 4:40 AM, Guy Thomas guy.tho...@vlaamsbrabant.be 
 wrote:
 In a form I use the struts2 action tag to populate a drop down list:

 s:actionerror /

 s:form action=bookactiondispatcher namespace=/ theme=simple
      table
            tr
                  tdSelect an action:/td
                  tds:action name=bookactions namespace=/
 executeResult=true //td
            /tr

            tr
                  tdSpecify search terms:/td
                  tds:textfield name=searchString size=44
 required=true //td
            /tr

            tr
                  tds:submit type=input value=Voer actie uit
 //td
            /tr
      /table
 /s:form


 The bookactions action refers to the following jsp (bookactions.jsp):

 %@ taglib prefix=s uri=/struts-tags% s:radio list=bookActions
 value=defaultBookAction name=bookAction
 onclick=setTextFieldVisibility (this.value) theme=simple /

 As long as I select the select action (there is also an index action) and 
 enter search terms, there is no problem; the user is taken to the search 
 result page.

 However, the code for the bookactiondispatcher action contains a validate 
 method:

   @Override
   public void validate ()
   {
      logger.debug (Validating an action dispatch ...);

      if (bookAction.equals (SEARCH)  (searchString == null ||
 searchString.equals ()))
         addActionError (getText
 (bookindexer.error.search.nosearchstring));
   }

 When the user selects the search action and forgets to specify search terms, 
 he/she is taken back to the page with the form:

 action name=bookactiondispatcher
 class=be.vlaamsbrabant.bookindexer.actions.BookActionDispatcher
         ...
         result name=input/index.jsp/result
         ...

 However:
 - On the input result page the rich control for the possible book actions 
 is no longer filled up.
 - I see the contents of index.jsp (with the form), but the URL is
 http://.../bookindexer/bookactiondispatcher.action (the url for the
 form action.)

 I had exactly the same problem in another application. There I removed the 
 validate method and used a specific error result to redirect the user to an 
 error page.

 How I can still use struts2  validation and have my rich controls 
 (re-)populated when being redirected through an input result?



 -
 Aan dit bericht kunnen geen rechten worden ontleend. Alle berichten naar dit 
 professioneel e-mailadres kunnen door de werkgever gelezen worden.
 Ondernemingsnummer: 0253.973.219



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




 -
 Aan dit bericht kunnen geen rechten worden ontleend. Alle berichten naar dit 
 professioneel e-mailadres kunnen door de werkgever gelezen worden.
 Ondernemingsnummer: 0253.973.219


 -
 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: 

RE: Repopulating rich controls

2010-07-19 Thread Guy Thomas
Hello Greg,

What I did, is explained and illustrated with code in my first mail (see below).

To recap:

1. I used an action tag, not the prepare interface.

   So in index.jsp I used in the form:

   s:action name=bookactions namespace=/ executeResult=true /

   The bookactions action refers to the following jsp.

   %@ taglib prefix=s uri=/struts-tags%
   s:radio list=bookActions value=defaultBookAction name=bookAction
onclick=setTextFieldVisibility (this.value) theme=simple /

2. The form target action is bookactiondispatcher.

3. This is the validate method in the bookactiondispatcher Action class:

   @Override
   public void validate ()
   {
  logger.debug (Validating an action dispatch ...);

  if (bookAction.equals (SEARCH)  (searchString == null || 
searchString.equals ()))
 addActionError (getText (bookindexer.error.search.nosearchstring));
   }

So I did everything as explained on the referred web page, but it didn't work. 
Only then did I dare submit my question on the forum.

Best regards,

Guy Thomas
   

-Oorspronkelijk bericht-
Van: Greg Lindholm [mailto:greg.lindh...@gmail.com] 
Verzonden: maandag 19 juli 2010 15:39
Aan: Struts Users Mailing List
Onderwerp: Re: Repopulating rich controls

What you are describing as odd behavior is actually normal and expected. With 
Struts the URL shown in the browser will always be the action name it will 
never be the jsp. You may wish to read up a little on how Servlets and 
forwarding works (just google servlet forward).

Just replying I did what you said and it didn't work (this list get messages 
like this every day) doesn't provide any additional information that would 
allow someone to help you.

Did you implement the Preparable interface?  Did you run your app in the 
debugger and break in your prepare() method?  What does you prepare method look 
like?

The best way to get help is to provide a detailed description of what you 
actually did including code and configuration samples.

The best way to help yourself (and learn) is to run your app in the debugger 
and find out what it is actually doing.

On Mon, Jul 19, 2010 at 1:51 AM, Guy Thomas guy.tho...@vlaamsbrabant.be wrote:
 Hello Greg,

 I had tried to apply the instructions on the web page you sent me, but as 
 explained in my mail, it did not work. I must have done something wrong.

 One of the symptoms of an odd behavior is that I'm taken back to the jsp 
 page with the form (index.jsp) when I forget to fill in something in the 
 search text field, but that the url still shows the target action of the form 
 and ... the rich controls are not repopulated.

 Guy

 -Oorspronkelijk bericht-
 Van: Greg Lindholm [mailto:greg.lindh...@gmail.com]
 Verzonden: vrijdag 16 juli 2010 19:38
 Aan: Struts Users Mailing List
 Onderwerp: Re: Repopulating rich controls

 From the Struts 2 FAQ

 http://struts.apache.org/2.1.8.1/docs/how-do-we-repopulate-controls-wh
 en-validation-fails.html


 On Fri, Jul 16, 2010 at 4:40 AM, Guy Thomas guy.tho...@vlaamsbrabant.be 
 wrote:
 In a form I use the struts2 action tag to populate a drop down list:

 s:actionerror /

 s:form action=bookactiondispatcher namespace=/ theme=simple
      table
            tr
                  tdSelect an action:/td
                  tds:action name=bookactions namespace=/
 executeResult=true //td
            /tr

            tr
                  tdSpecify search terms:/td
                  tds:textfield name=searchString size=44
 required=true //td
            /tr

            tr
                  tds:submit type=input value=Voer actie uit
 //td
            /tr
      /table
 /s:form


 The bookactions action refers to the following jsp (bookactions.jsp):

 %@ taglib prefix=s uri=/struts-tags% s:radio list=bookActions
 value=defaultBookAction name=bookAction
 onclick=setTextFieldVisibility (this.value) theme=simple /

 As long as I select the select action (there is also an index action) and 
 enter search terms, there is no problem; the user is taken to the search 
 result page.

 However, the code for the bookactiondispatcher action contains a validate 
 method:

   @Override
   public void validate ()
   {
      logger.debug (Validating an action dispatch ...);

      if (bookAction.equals (SEARCH)  (searchString == null || 
 searchString.equals ()))
         addActionError (getText
 (bookindexer.error.search.nosearchstring));
   }

 When the user selects the search action and forgets to specify search terms, 
 he/she is taken back to the page with the form:

 action name=bookactiondispatcher
 class=be.vlaamsbrabant.bookindexer.actions.BookActionDispatcher
         ...
         result name=input/index.jsp/result
         ...

 However:
 - On the input result page the rich control for the possible book actions 
 is no longer filled up.
 - I see the contents of index.jsp (with the form), but the URL is 
 http://.../bookindexer/bookactiondispatcher.action (the url for the 
 form action.)

 I had 

Re: struts2+hibernate+spring - lazyInitaializationException

2010-07-19 Thread Lukasz Lenart
Hi,

I really don't see how Struts2 can messed it up. Would you try to
write a unit test to check that?


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
Kapituła Javarsovia 2010 http://javarsovia.pl

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



Re: struts2+hibernate+spring - lazyInitaializationException

2010-07-19 Thread Brian Thompson
Looks to me like the session is being closed in the scope of
hibernateTemplate.get().

I don't see a transactionManager mentioned in the XML ... you could
try adding something like this in the XML configuration file:

bean id=transactionManager

class=org.springframework.orm.hibernate.HibernateTransactionManager
property name=sessionFactory ref=sessionFactory /
/bean

tx:annotation-driven transaction-manager=transactionManager /

n.b. I haven't tested the above config, so it probably won't work
as-is.  Hopefully it helps, though.

-Brian

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



JPA + Hibernate, necessary jars?

2010-07-19 Thread JP Cafaro
I'm following a tutorial on struts 2 with JPA and hibernate and spring 
and they gave me list of jars that I needed but most of them are 
outdated.  Some are included in other jars, have different names, etc.  
Is there one package that just has all of the up to date jars I need? 


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



RE: Help Dojo TagLibs

2010-07-19 Thread Martin Gainty

//here is my struts.properties

### Standard UI theme
### Change this to reflect which path should be used for JSP control tag 
templates by default
struts.ui.theme=xhtml
struts.ui.templateDir=template
#sets the default template type. Either ftl, vm, or jsp
struts.ui.templateSuffix=ftl


//so struts will look for all my ftls in  WEB-INF/classes/templateDir/theme 
specifically

webappName/WEB-INF/classes/template/xhtml


Martin Gainty 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.

Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.



 

 From: fabio.eb...@dnasolution.com.br
 To: user@struts.apache.org
 Subject: Re: Help Dojo TagLibs
 Date: Mon, 19 Jul 2010 09:44:51 -0300
 
 what would this templateDir?? 
 
 - Original Message - 
 From: Martin Gainty mgai...@hotmail.com
 To: Struts Users Mailing List user@struts.apache.org
 Sent: Monday, July 19, 2010 9:31 AM
 Subject: RE: Help Dojo TagLibs
 
 
 
 last time i checked templateDir was in struts.properties which would 
 configure templateDir for the entire webapp
 you can also override templateDir attribute in the component definition
 
 sx:datetimepicker templateDir=NewDirectoryForTemplate
 
 /
 
 
 
 musachy would also know where these values are stored
 
 
 
 obrigado
 Martin 
 __ 
 Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
 Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
 sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
 oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich 
 dem Austausch von Informationen und entfaltet keine rechtliche 
 Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen 
 wir keine Haftung fuer den Inhalt uebernehmen.
 
 Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
 destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
 l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci 
 est interdite. Ce message sert à l'information seulement et n'aura pas 
 n'importe quel effet légalement obligatoire. Étant donné que les email 
 peuvent facilement être sujets à la manipulation, nous ne pouvons accepter 
 aucune responsabilité pour le contenu fourni.
 
 
 
 
 
  From: fabio.eb...@dnasolution.com.br
  To: user@struts.apache.org
  Subject: Re: Help Dojo TagLibs
  Date: Mon, 19 Jul 2010 09:10:15 -0300
  
  How i do this?
  - Original Message - 
  From: Martin Gainty mgai...@hotmail.com
  To: Struts Users Mailing List user@struts.apache.org
  Sent: Sunday, July 18, 2010 1:01 PM
  Subject: RE: Help Dojo TagLibs
  
  
  
  did you touch your templateDir or templateCssPath??
  
  
  you can override either attribute in your components declaration
  
  
  Martin Gainty
  __
  Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
  
  Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene 
  Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte 
  Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht 
  dient lediglich dem Austausch von Informationen und entfaltet keine 
  rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von 
  E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
  
  Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
  destinataire prévu, nous te demandons avec bonté que pour satisfaire 
  informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie 
  de ceci est interdite. Ce message sert à l'information seulement et n'aura 
  pas n'importe quel effet légalement obligatoire. Étant donné que les email 
  peuvent facilement être sujets à la manipulation, nous ne pouvons accepter 
  aucune responsabilité pour le contenu fourni.
  
  
  
  
  
   From: fabio.eb...@dnasolution.com.br
   To: user@struts.apache.org
   Subject: Help Dojo TagLibs
   Date: Thu, 

Re: struts2+hibernate+spring - lazyInitaializationException

2010-07-19 Thread Greg Stasica
hi,

thanks for your replies

lukasz
i'm not sure where the problem exactly is but after my additional test i
don't think it's s2 related... i'll try to check hibernate

brian
i've done tests with your changes but to no avail... still the same problem
even when my dao implementation class has a transaction annotation i.e.

@Repository(bookBean)
@Transactional
class BookDaoImpl {.
.



On Mon, Jul 19, 2010 at 6:22 PM, Brian Thompson elephant...@gmail.comwrote:

 Looks to me like the session is being closed in the scope of
 hibernateTemplate.get().

 I don't see a transactionManager mentioned in the XML ... you could
 try adding something like this in the XML configuration file:

bean id=transactionManager

  class=org.springframework.orm.hibernate.HibernateTransactionManager
property name=sessionFactory ref=sessionFactory /
/bean

tx:annotation-driven transaction-manager=transactionManager /

 n.b. I haven't tested the above config, so it probably won't work
 as-is.  Hopefully it helps, though.

 -Brian

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




-- 
Greg Stasica


Re: struts2+hibernate+spring - lazyInitaializationException

2010-07-19 Thread Robert Taylor

Hi Greg,

I believe Brian is correct.

You need to wrap BookDao.find(...) within a transaction or use 
OpenSessionInView.
Either one of these should keep the session open when you are navigating the 
object graph
in your DAO. If you use OSIV (OpenSessionInView) filter, then you can 
navigate the

object graph in your web tier as well.

We are using both OpenSessionInView filter and a service layer which acts as 
a facade to the data layer (DAOs). The services are annotated with 
@Transactional (although for readOnly transactions this is really 
unnecessary within the OSIV scope; but they are there for consistency).


/robert
- Original Message - 
From: Brian Thompson elephant...@gmail.com
To: Struts Users Mailing List user@struts.apache.org; 
lukasz.len...@gmail.com

Sent: Monday, July 19, 2010 1:22 PM
Subject: Re: struts2+hibernate+spring - lazyInitaializationException



Looks to me like the session is being closed in the scope of
hibernateTemplate.get().

I don't see a transactionManager mentioned in the XML ... you could
try adding something like this in the XML configuration file:

bean id=transactionManager
class=org.springframework.orm.hibernate.HibernateTransactionManager
property name=sessionFactory ref=sessionFactory /
/bean

tx:annotation-driven transaction-manager=transactionManager /

n.b. I haven't tested the above config, so it probably won't work
as-is.  Hopefully it helps, though.

-Brian

-
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: Readonly Datetimepicker.

2010-07-19 Thread Chris Miles
How easy could I patch the code myself to do this? Can struts tags be built 
publically through maven or anything?


Thanks

Chris

- Original Message - 
From: Chris Miles ch...@chrismiles.org

To: Struts Users Mailing List user@struts.apache.org
Sent: Saturday, July 17, 2010 6:34 PM
Subject: Readonly Datetimepicker.


Is there a reason the datetimepicker does not allow you to make the 
textfield readonly? Is there any work arounds?


Thanks

Chris 



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



Re: struts2+hibernate+spring - lazyInitaializationException

2010-07-19 Thread Greg Stasica
hi,

thanks for all your help... as it turned out the problem was in my
configuration :).. basically one of my service wasn't annotated with
@Transaction tag and as a consequence my template was closing the session ..

On Mon, Jul 19, 2010 at 8:44 PM, Robert Taylor rtay...@dtgresults.comwrote:

 Hi Greg,

 I believe Brian is correct.

 You need to wrap BookDao.find(...) within a transaction or use
 OpenSessionInView.
 Either one of these should keep the session open when you are navigating
 the object graph
 in your DAO. If you use OSIV (OpenSessionInView) filter, then you can
 navigate the
 object graph in your web tier as well.

 We are using both OpenSessionInView filter and a service layer which acts
 as a facade to the data layer (DAOs). The services are annotated with
 @Transactional (although for readOnly transactions this is really
 unnecessary within the OSIV scope; but they are there for consistency).

 /robert
 - Original Message - From: Brian Thompson elephant...@gmail.com
 
 To: Struts Users Mailing List user@struts.apache.org; 
 lukasz.len...@gmail.com
 Sent: Monday, July 19, 2010 1:22 PM
 Subject: Re: struts2+hibernate+spring - lazyInitaializationException



  Looks to me like the session is being closed in the scope of
 hibernateTemplate.get().

 I don't see a transactionManager mentioned in the XML ... you could
 try adding something like this in the XML configuration file:

 bean id=transactionManager
 class=org.springframework.orm.hibernate.HibernateTransactionManager
 property name=sessionFactory ref=sessionFactory /
 /bean

 tx:annotation-driven transaction-manager=transactionManager /

 n.b. I haven't tested the above config, so it probably won't work
 as-is.  Hopefully it helps, though.

 -Brian

 -
 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




-- 
Greg Stasica