struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hernán <heam...@gmail.com>
Subject Re: Inquiry
Date Mon, 09 Sep 2013 20:09:58 GMT
Thank you very much for your help, the problem was in the class hierarchy
indeed, but the problem was I have left some beans inheriting from
GenericPresentation, and they where not declared in
GenericPresentation.hbm.xml because after redesigning some requirements
those beans weren't necessary any more. It was a problem very restricted to
my local scenario, I apologize for my inquiry and really appreciate the
time you took to help me. Have a nice day!


On Sun, Sep 8, 2013 at 7:25 PM, Ken McWilliams <ken.mcwilliams@gmail.com>wrote:

> It's a good idea to put your action classes into packages.
>
> Not on the topic of the question exactly but the long inheritance chain on
> your action is suspicious. Consider struts2 Interceptors and since you are
> using Spring inject what you need where you need it.
>
>
>
> >         <action name="GenericPresentationAction"
> > class="GenericPresentationAction" method="listAll">
> >             <result name="list">
> >                 ${destination}
> >             </result>
> >         </action>
> >
>
> JL already asked where is destination defined? In the execute method of the
> GenericPresentationAction class output to the console the value contained
> in destination.
>
> Does it contain what you expect? Also how is the value of destination
> determined? Is it passed in from the client?
>
>
>
> >
> >         <action name="GenericPresentationAction_*"
> > class="GenericPresentationAction" method="{1}">
> >             <result name="input" type="dispatcher">
> >                 <param
> > name="location">/WEB-INF/jsp/setup/genericPresentationForm.jsp</param>
> >             </result>
> >             <result name="success" type="dispatcher">
> >                 <param
> > name="location">/WEB-INF/jsp/setup/genericPresentationForm.jsp</param>
> >             </result>
> >             <result name="list" type="dispatcher">
> >                 <param
> > name="location">/WEB-INF/jsp/setup/genericPresentationList.jsp</param>
> >             </result>
> >         </action>
> >
> >
>
> It would be helpful if we could see how tiles was tied into the above there
> is no tile result type in clear use.
> Also 'type="dispatcher"' is the default, so long as you extended
> struts-default.
>
>
>
> > In tiles.xml:
> >
> >     <definition name="AdministratorBase"
> > template="/WEB-INF/jsp/setup/layout.jsp" >
> >         <put-attribute name="header"
> value="/WEB-INF/jsp/setup/header.jsp"
> > />
> >         <put-attribute name="menu" value="/WEB-INF/jsp/setup/menu.jsp"
>  />
> >         <put-attribute name="footer"
> > value="/WEB-INF/jsp/setup/footer.jsp"  />
> >     </definition>
> >     <definition name="GenericPresentationAction"
> > extends="AdministratorBase">
> >         <put-attribute name="title" value="Presentación" />
> >         <put-attribute name="description" value="Administrar Contenido"
> />
> >         <put-attribute name="content"
> > value="/WEB-INF/jsp/setup/genericPresentation.jsp" />
> >     </definition>
> >
> >
> What version of tiles are you using?
>
>
> > In spring-data.xml:
> >
> >     <bean id="genericHibernateDAO"
> > class="ro.dao.hibernate.GenericHibernateDAO" abstract="true"
> > autowire="byName">
> >         <property name="sessionFactory" ref="sessionFactory" />
> >     </bean>
> >
> > In spring-servlet.xml:
> >
> >     <bean id="genericPresentationDAO"
> > class="com.tipuana.rf.dao.hibernate.GenericPresentationDAOHibernate"
> > parent="genericHibernateDAO" autowire="byName" />
> >
> >
> > In spring-servlet-setup.xml:
> >
> >     <bean id="GenericPresentationAction"
> > class="com.tipuana.rf.action.setup.GenericPresentationAction"
> > scope="prototype">
> >         <property name="genericPresentationDAO"
> > ref="genericPresentationDAO" />
> >     </bean>
> >
> >
> >
> >
> > On Thu, Sep 5, 2013 at 9:05 PM, <jlmagc@gmail.com> wrote:
> >
> >> You need to provide some code if you want some answers. Where is
> >> destination defined? What's your action definition? Your tiles.xml? The
> >> stacktrace?
> >>
> >> JL
> >> Sent via BlackBerry from T-Mobile
> >>
> >> -----Original Message-----
> >> From: Hernán <heamaya@gmail.com>
> >> Date: Thu, 5 Sep 2013 19:32:14
> >> To: Struts Users Mailing List<user@struts.apache.org>
> >> Reply-To: "Struts Users Mailing List" <user@struts.apache.org>
> >> Subject: Inquiry
> >>
> >> Hi you all developers! I'm currently developing a web application, I
> have
> >> added a new CRUD action which extend several abstract classes whereas
> the
> >> first one extend action support. The web app uses tiles and when trying
> to
> >> find a Tile Definition to render ${destination} it can't find it. It
> says,
> >> cannot find ' ' definition. Other instance variables which are declared
> in
> >> the upper most class of the class hierarchy (I mean after action
> support)
> >> aren't able to be seen. I wonder what might be wrong since all other
> >> actions work properly. My CRUD system is based in the one that exists in
> >> struts2 in action book it is a version I improved. This action
> implements
> >> ModelDriven interface, whilst the majority doesn't. Thank you. I hope
> you
> >> can help me! Have a nice day!
> >>
> >> --
> >> Hernán
> >>
> >>
> >
> >
> > --
> > Hernán
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
>



-- 
Hernán

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message