struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Musachy Barroso" <musa...@gmail.com>
Subject Re: [S2] s:tabbedPanel with remote tabs and javascript on the remote tabs
Date Tue, 03 Apr 2007 19:20:19 GMT
https://issues.apache.org/struts/browse/WW-1869

I will fix it tonight

regards
musachy

On 4/3/07, Musachy Barroso <musachy@gmail.com> wrote:
>
> Ok I found the problem, it is in the function "splitAndFixPaths"(can hurt
> your eyes :) ) the one that is breaking the href, in Dojo's ContentPane, it
> appends the context to paths. So long for "fixPaths"
>
> musachy
>
> On 4/3/07, Musachy Barroso <musachy@gmail.com> wrote:
> >
> > Not that I doubted, but you are right :). Now, this is quite weird, if I
> > look at the returned html it is:
> >
> > <h3>I made it here!!!</h3>
> >
> > <script type="text/javascript">
> >
> >  alert("Plugh! from minimalFailureInclude.");
> >
> > </script>
> >
> > <div dojoType="struts:BindDiv"
> >
> >   	id="min2Div"  	href="/struts2-showcase/nodecorate/minimal2!execute.action?dojo.preventCache=1175626128136"
> >
> >     executeScripts="true"    showError="true">
> >
> >  Loading...
> >
> > </div>
> >
> > so the href is fine, but when i debug the javascript, the href for that
> > widget is:
> > /struts2-showcase/nodecorate/"/struts2-showcase/nodecorate/minimal2!execute.action?dojo.preventCache=1175626128136
> >
> >
> > <clueless />
> > musachy
> >
> > On 4/3/07, Dave Newton < newton.dave@yahoo.com> wrote:
> > >
> > > I have a minimum (AFAICT) failure scenario for the
> > > nested-divs-inside-tabbedPanel-divs; it's reasonably
> > > short so I just stuck it in here for now. The
> > > "failure" (which I still suspect is because I just
> > > can't do what I'm trying to do, but it's not clear to
> > > me why not yet) lies in minimalFailureInclude.jsp.
> > >
> > > I simplified it so there's no local actions, although
> > > I sanity-checked to make sure using my own actions
> > > resulted in the same failure (it does). If I put
> > > <s:head.../> in minimailFailureInclude.jsp too it
> > > blows up JavaScriptily.
> > >
> > > As soon as I set method="execute" I get the following
> > > error and the script in min2Include.jsp never
> > > executes:
> > >
> > > Error loading
> > > '/s2samples/forms/"/s2samples/forms/minimal2!execute.action"'
> > > (404
> > > /s2samples/forms/%22/s2samples/forms/minimal2!execute.action%22)
> > >
> > > If I remove the method="execute" it works correctly.
> > >
> > > d.
> > >
> > > === struts config chunk, nothing weird,
> > >     DynamicMethodInvocation=true,
> > >     minor formatting to look nice.
> > > ===
> > >
> > > <action name="minimalFailure">
> > >   <result>
> > >     /WEB-INF/jsp/forms/minimalFailure.jsp
> > >   </result>
> > > </action>
> > >
> > > <action name="minInc">
> > >   <result>
> > >     /WEB-INF/jsp/forms/minimalFailureInclude.jsp
> > >   </result>
> > > </action>
> > >
> > > <action name="minimal2">
> > >   <result>
> > >     /WEB-INF/jsp/forms/min2Include.jsp
> > >   </result>
> > > </action>
> > >
> > > === minimalFailure.jsp ===
> > >
> > > <%@ taglib prefix="s" uri="/struts-tags"%>
> > >
> > > <html>
> > >   <head>
> > >     <s:head theme="ajax" debug="true" />
> > >   </head>
> > >
> > >   <body>
> > >     <s:tabbedPanel id="tabWrapper"
> > >                    selectedTab="dynaTab"
> > >                    theme="simple">
> > >       <s:div label="Static Tab"
> > >              id="tab1"
> > >              theme="ajax">
> > >         <h2>Good grief...</h2>
> > >       </s:div>
> > >
> > >       <s:div label="DynaTab"
> > >              id="dynaTab"
> > >              theme="ajax">
> > >         <h2>Better get an alert()...</h2>
> > >
> > >         <s:url action="minInc" id="minIncUrl"/>
> > >         <s:div href="%{minIncUrl}"
> > >                executeScripts="true"
> > >                theme="ajax">
> > >           Loading...
> > >         </s:div>
> > >       </s:div>
> > >     </s:tabbedPanel>
> > >   </body>
> > > </html>
> > >
> > > === minimalFailureInclude.jsp ===
> > >
> > > <%@ taglib prefix="s" uri="/struts-tags"%>
> > >
> > > <h3>I made it here!!!</h3>
> > >
> > > <script type="text/javascript">
> > >   alert("Plugh! from minimalFailureInclude.");
> > > </script>
> > >
> > > <s:url action="minimal2"
> > >        id="min2Url"
> > >        method="execute"/>
> > > <s:div id="min2Div"
> > >        href="%{min2Url}"
> > >        theme="ajax"
> > >        executeScripts="true">
> > >   Loading...
> > > </s:div>
> > >
> > > === min2Include.jsp ===
> > >
> > > <h3>MIN 2 INCLUDE</h3>
> > > <script type="text/javascript">
> > >   alert("Plugh! from min2Include.");
> > > </script>
> > >
> > > ============
> > >
> > > --- Dave Newton <newton.dave@yahoo.com> wrote:
> > >
> > > > --- Musachy Barroso <musachy@gmail.com > wrote:
> > > > > I already exceeded the "Works for me quota" this
> > > > > week, so I won't say it :),
> > > > > modifying /remotediv/example1.jsp in showcase to:
> > > > >
> > > > > <s:url id="ajaxTest0" action="AjaxTest"
> > > > > method="execute" />
> > > > > <s:div
> > > > >         theme="ajax"
> > > > >         href="%{ajaxTest0}" />
> > > > >
> > > > > <s:url id="ajaxTest1" action="AjaxTest!execute"/>
> > > > > <s:div
> > > > >         theme="ajax"
> > > > >         href="%{ajaxTest1}" />
> > > > >
> > > > > They both work. What is different in your case?
> > > >
> > > > Mine doesn't :D
> > > >
> > > > So far the only thing I can think of is that it's
> > > > basically:
> > > >
> > > > <s:tabbedPanel...>
> > > >   <s:div href="%{...}">
> > > >     <%-- From the remote! --%>
> > > >     <s:div href="%{...}">
> > > >
> > > > So there's two levels of remote divs inside a
> > > > tabbedPanel and building the deepest URL is where
> > > > the
> > > > method gets hosed.
> > > >
> > > > Um... I don't have an <s:head theme="ajax"/> in the
> > > > JSP that creates the lowest-level <s:div.../> but I
> > > > thought I did at one point; I'll check that
> > > > tomorrow.
> > > >
> > > > d.
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > > ____________________________________________________________________________________
> > > > Finding fabulous fares is fun.
> > > > Let Yahoo! FareChase search your favorite travel
> > > > sites to find flight and hotel bargains.
> > > > http://farechase.yahoo.com/promo-generic-14795097
> > > >
> > > >
> > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail:
> > > > user-unsubscribe@struts.apache.org
> > > > For additional commands, e-mail:
> > > > user-help@struts.apache.org
> > > >
> > > >
> > >
> > >
> > >
> > >
> > >
> > > ____________________________________________________________________________________
> > > Don't pick lemons.
> > > See all the new 2007 cars at Yahoo! Autos.
> > > http://autos.yahoo.com/new_cars.html
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > > For additional commands, e-mail: user-help@struts.apache.org
> > >
> > >
> >
> >
> > --
> > "Hey you! Would you help me to carry the stone?" Pink Floyd
> >
>
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

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