Re: Migration from Struts 2.0.14 to Struts 2.2.3 - tabbed panel not working

2011-06-22 Thread Andrzej Adamczyk
Thank you Martin for suggestions.

Tab library should be visible as I use other widgets (autocompleter) and
they work as expected. I have moved templates from the plug-in jar into
template\ajax directory but that did not solve the problem. I suspect either
tabbedpanel or div tags work contrary to what is described in tag reference
or the problem exists in a way I am loading content. Reference says that
that div tag executeScripts attribute is set to true by default. However I
have determined that the scripts that are loaded within content of the div
are not being executed. I am also loading content through java script
function that gets the reference to div widget and then calls refresh() on
it. This should parse the content and evaluate java script, at least this is
how it worked with DoJo 0.4.0 distribiuted with Struts 2.0.14. Could it be
that that method of ContentPane widget in DoJo 0.4.3 has been modified and
it does not evaluate scripts in loaded content anymore?

Regards,
Andrzej

On Wed, Jun 22, 2011 at 6:19 AM, Martin Gainty  wrote:

>  makes sure struts-dojo-tags.tld is placed in classes/META-INF folder and
> is declared as taglib in jsp
> <%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
>
> now you can execute the org.apache.struts2.dojo.views.jsp.ui.TabbedPanelTag
> Class from the tld via sx namespace identifier in jsp e.g.
> 
> 
> This is the first pane
> 
> 
> 
> 
> 
> 
>
>
> if the struts-dojo-tags.tld is not discovered you *may* have to place
> jsp-config taglib taglib-uri and taglib-location directives in web.xml
> 
> 
> /struts-dojo-tags
>
> /META-INF/struts-dojo-tags.tld
> 
>
>
> also ensure template\ajax\tabbedpanel.ftl
> also ensure template\ajax\tabbedpanel-close.ftl
> ftls are located in ajax folder off the templates folder as seen above
>
> can anyone confirm struts-dojo-tags.tld are missing from 2.2.x distros?
> Martin Gainty
> __
> Jogi és Bizalmassági kinyilatkoztatás
>
> Ez az üzenet bizalmas.  Ha nem ön az akinek szánva volt, akkor kérjük, hogy
> jelentse azt nekünk vissza. Semmiféle továbbítása vagy másolatának készítése
> nem megengedett.  Ez az üzenet csak ismeret cserét szolgál és semmiféle jogi
> alkalmazhatósága sincs.  Mivel az electronikus üzenetek könnyen
> megváltoztathatóak, ezért minket semmi felelöség nem terhelhet ezen üzenet
> tartalma miatt.
>
>
>
>
>  > Date: Tue, 21 Jun 2011 16:53:15 -0500
> > Subject: Re: Migration from Struts 2.0.14 to Struts 2.2.3 - tabbed panel
> not working
> > From: vaterm...@gmail.com
> > To: user@struts.apache.org
>
> >
> > It seems that this problem is caused by scripts not being executed when
> the
> > content of the tab is loaded. Here is the example.
> >
> > Main tab has 3 other sub tabs A1, A2, A3. Each sub tab (lets say A1) has
> its
> > own tabbed panel with additional tabs (A11, A12, A13). Main tabbed panel
> > element is defined as follows:
> >
> > 
> >  > executeScripts="true">
> > 
> >
> > When A1 is selected event is sent to X-selectChild topic. That event is
> > handled by a function that executes following:
> >
> > dojo.widget.byId(A1).href = ;
> > dojo.widget.byId(A1).cacheContent = false;
> > dojo.widget.byId(A1).refresh()
> >
> > The content of the A1 is provided by jsp which defines script element
> > similar to the following:
> >
> > dojo.addOnLoad(subscribeToNavigationEvents)
> >
> > subscribeToNavigationEvents() function is responsible for subscribing
> onto
> > the -selectChild topic and providing handler that does
> some
> > processing when any of the A11, A12 and A13 are selected.
> >
> > Turns out the dojo.addOnLoad(subscribeToNavigationEvents) is never
> executed
> > when the content of the tab A1 is loaded and the event handler is not
> > registered. It works fine in Struts 2.0.14 however. I would appreciate
> any
> > help.
> >
> > Regards,
> > Andrzej
> >
> >
> >
> > On Tue, Jun 21, 2011 at 2:34 PM, Andrzej Adamczyk  >wrote:
> >
> > > Hello
> > >
> > > I am working on POC migrating application from Struts 2.0.14 to Struts
> > > 2.2.3 with DOJO 2.2.3 plugin. On the way DOJO framework will be updated
> from
> > > version 0.4.0 to 0.4.3.
> > >
> > > Application has main tabbed panel with few t

Re: Migration from Struts 2.0.14 to Struts 2.2.3 - tabbed panel not working

2011-06-21 Thread Andrzej Adamczyk
It seems that this problem is caused by scripts not being executed when the
content of the tab is loaded. Here is the example.

Main tab has 3 other sub tabs A1, A2, A3. Each sub tab (lets say A1) has its
own tabbed panel with additional tabs (A11, A12, A13). Main tabbed panel
element is defined as follows:


 


When A1 is selected event is sent to X-selectChild topic. That event is
handled by a function that executes following:

dojo.widget.byId(A1).href = ;
dojo.widget.byId(A1).cacheContent = false;
dojo.widget.byId(A1).refresh()

The content of the A1 is provided by jsp which defines script element
similar to the following:

dojo.addOnLoad(subscribeToNavigationEvents)

subscribeToNavigationEvents() function is responsible for subscribing onto
the -selectChild topic and providing handler that does some
processing when any of the A11, A12 and A13 are selected.

Turns out the dojo.addOnLoad(subscribeToNavigationEvents) is never executed
when the content of the tab A1 is loaded and the event handler is not
registered. It works fine in Struts 2.0.14 however. I would appreciate any
help.

Regards,
Andrzej



On Tue, Jun 21, 2011 at 2:34 PM, Andrzej Adamczyk wrote:

> Hello
>
> I am working on POC migrating application from Struts 2.0.14 to Struts
> 2.2.3 with DOJO 2.2.3 plugin. On the way DOJO framework will be updated from
> version 0.4.0 to 0.4.3.
>
> Application has main tabbed panel with few tabs, each containing another
> tabbed panel with few sub tabs. Upon hitting main tabs or any sub tabs a
> function is executed that sets some form elements etc. This function is
> fired by events passed to -selectChild topic upon selecting
> any tab within main or sub tabbed panel. The problem is that after moving to
> struts 2.2.3 the event is generated for main tabbed panel but it seems it is
> not generated for tabbed panel that exist within tab of the main tabbed
> panel. I tried to specify afterSelectTabNotifyTopic attribute on tabbed
> panel but it did not work either. Did anyone encounter such problem or has
> any tips on what could be the culprit? I would appreciate any help.
>
> Regards,
> Andrzej


Migration from Struts 2.0.14 to Struts 2.2.3 - tabbed panel not working

2011-06-21 Thread Andrzej Adamczyk
Hello

I am working on POC migrating application from Struts 2.0.14 to Struts 2.2.3
with DOJO 2.2.3 plugin. On the way DOJO framework will be updated from
version 0.4.0 to 0.4.3.

Application has main tabbed panel with few tabs, each containing another
tabbed panel with few sub tabs. Upon hitting main tabs or any sub tabs a
function is executed that sets some form elements etc. This function is
fired by events passed to -selectChild topic upon selecting
any tab within main or sub tabbed panel. The problem is that after moving to
struts 2.2.3 the event is generated for main tabbed panel but it seems it is
not generated for tabbed panel that exist within tab of the main tabbed
panel. I tried to specify afterSelectTabNotifyTopic attribute on tabbed
panel but it did not work either. Did anyone encounter such problem or has
any tips on what could be the culprit? I would appreciate any help.

Regards,
Andrzej


Struts 2.0.14 - Could not reload resource bundles exception

2011-01-14 Thread Andrzej Adamczyk
Hello

After moving to our SIT environment we have noticed below exception beeing
logged. For some reason or another we have moved resource bundle file
outside of the application into dedicated directory that should be on the
application classpath. We use Geronimo 2.1.7 and we configured SharedLib
gbean in our deployment plan by setting classesDir attribute to the
directory that contains respource bundle and other property files. Could the
removal of the resource bundle to directory outside of the application cause
that issue? At the same time we also noticed "Too much open files"
exception. At this point I am not sure if those two exceptions are related
or if the latter one is caused by the mechanism described in issue WW-2474 (
http://www.mail-archive.com/issues@struts.apache.org/msg08920.html). Any
help would be welcome.

log.GeronimoLog.error(?)||ERROR||Could not reload resource bundles
java.lang.NoSuchFieldException: cacheList
 at java.lang.Class.getDeclaredFieldImpl(Native Method)
 at java.lang.Class.getDeclaredField(Class.java:517)
 at
com.opensymphony.xwork2.util.LocalizedTextUtil.clearMap(LocalizedTextUtil.java:737)
 at
com.opensymphony.xwork2.util.LocalizedTextUtil.reloadBundles(LocalizedTextUtil.java:701)
 at
com.opensymphony.xwork2.util.LocalizedTextUtil.findDefaultText(LocalizedTextUtil.java:178)
 at
com.opensymphony.xwork2.util.LocalizedTextUtil.getDefaultMessage(LocalizedTextUtil.java:581)
 at
com.opensymphony.xwork2.util.LocalizedTextUtil.findText(LocalizedTextUtil.java:463)
 at
com.opensymphony.xwork2.TextProviderSupport.getText(TextProviderSupport.java:224)
 at com.opensymphony.xwork2.ActionSupport.getText(ActionSupport.java:99)
 at org.apache.struts2.components.Text.end(Text.java:158)
 at
org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSupport.java:43)
 at
org.apache.jsp.tms.task.task_005fpanel_jsp._jspx_meth_s_005ftext_005f5(task_005fpanel_jsp.java:960)
 at
org.apache.jsp.tms.task.task_005fpanel_jsp._jspx_meth_s_005fiterator_005f0(task_005fpanel_jsp.java:445)
 at
org.apache.jsp.tms.task.task_005fpanel_jsp._jspService(task_005fpanel_jsp.java:129)
 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
 at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:372)
 at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
 at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
 at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
 at
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
 at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
 at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
 at
org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:139)
 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
com.walmart.storeops.tms.arch.SourceInterceptor.intercept(SourceInterceptor.java:66)
 at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
 at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
 at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
 at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:215)
 at
com.walmart.storeops.tms.arch.conversation.ConversationInterceptor.intercept(ConversationInterceptor.java:70)
 at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
 at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
 at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
 at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:215)
 at
com.walmart.storeops.tms.arch.LoginInterceptor.intercept(LoginInterceptor.java:152)
 at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
 at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
 at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
 at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:215)
 at
com.opensymphony.xwork2.interceptor.Defau