I got rid of all the stuff I had created - GreyboxController, greybox.jsp,
and the reference to it in dispatcherservlet.xml. I am now back to using
loader_frame.html, which lives in /scripts/greybox_static/.

In default.jsp I have defined the GB_ROOT_DIR like this:

var GB_ROOT_DIR = "<c:url value='/scripts/greybox_static/'/>";

And in my jsp I have defined this line:

href="<c:url value='/findplaces.html'/>" onclick="return GB_show('Find
places', this.href)">Find places

This in turn tries to load the loader_frame.html page. I changed the
following line in my web.xml (in bold):

<filter>
        <filter-name>staticFilter</filter-name>
        <filter-class>org.appfuse.webapp.filter.StaticFilter</filter-class>
        <init-param>
            <param-name>includes</param-name>
           
<param-value>/scripts/dojo/*,/dwr/*,/scripts/greybox_static/*</param-value>
        </init-param>
        <init-param>
            <param-name>servletName</param-name>
            <param-value>dispatcher</param-value>
        </init-param>
    </filter>

and no go. When I click on the above link it greys out the page and creates
a greybox but loads nothing in it. No errors. And if I try to load
/scripts/greybox_static/loader_frame.html directly in the browser it seems
that Spring MVC is still processing it because it is decorating the page.
Theoretically I shouldn't have to put this page in decorators.xml, correct?
The idea in putting it in the StaticFilter section of web.xml is so Spring
MVC does nothing at all with it, and lets it be served by the web server as
a normal html page.

Something tells me these fancy js scripts weren't designed to (easily) work
with complex envirnoments like Appfuse. For now I am going to use pop-ups.
Unfortunately the client has already seen and loves greybox. Ugh.

Bob




syg6 wrote:
> 
> I am using 2.0 RC1. I haven't tried configuring StaticFilter, I am going
> to give it a try. I have to un-do all the stuff I have just done -
> changing loader_frame.html back into loader_frame.htm, etc.
> 
> I will let you (the list) know.
> 
> Thanks,
> Bob
> 
> 
> mraible wrote:
>> 
>> Have you tried adding /scripts/* to your StaticFilter? What version of
>> AppFuse you are using?
>> 
>> Matt
>> 
>> On 9/18/07, syg6 <[EMAIL PROTECTED]> wrote:
>>>
>>> Did anyone every get this to work? I was thiiiiiiis close but no cigar.
>>>
>>> The problem is that internally greybox uses a page, loader_frame.html,
>>> to do
>>> most of the work. This page is found with other 'static' files, like css
>>> and
>>> gif, in a directory you specify in the GB_ROOT_DIR variable. When you
>>> create
>>> a link that opens a Greybox it calls that page passing it the url you
>>> want
>>> to open.
>>>
>>> The problem of course is that Spring MVC wants to manage the
>>> loader_frame.html url because Spring manages all *.html urls. So I made
>>> myself an empty controller, LoaderFrameController, that redirects to
>>> loaderFrame.jsp which is nothing more than the old loader_frame.html.
>>> And I
>>> also made an entry in decorators.xml so that page wouldn't be decorated.
>>> I
>>> figured I might have to change the .js so it finds the images and .css
>>> but
>>> that's all ...
>>>
>>> But it doesn't work. No error, just doesn't load the page. At this
>>> point,
>>> after trying unsuccessfully to get both thickbox and greybox to work
>>> with
>>> Appfuse, I think I am going to give up and just use normal pop-ups. It
>>> might
>>> be as simple as telling Spring MVC not to manage loader_frame.html. Or
>>> changing loader_frame.html to loader_frame.htm (I already tried this ...
>>> doesn't work either. It seems Spring MVC is also managing *.htm. And it
>>> ignored the line I put in decorators.xml no not decorate
>>> /scripts/greybox_static/loading_frame.htm)
>>>
>>> If anyone has successfully used Thickbox or Greybox with Appfuse (Spring
>>> MVC) I'd be interested in knowing how you did it. Otherwise, it looks
>>> like
>>> window.open for me!
>>>
>>> Bob
>>>
>>>
>>> climbingrose wrote:
>>> >
>>> > I think you have to disable the script in global.js which runs when
>>> the
>>> > page
>>> > load because it interferes with greybox.
>>> >
>>> > On 8/10/07, thinkboy <[EMAIL PROTECTED]> wrote:
>>> >>
>>> >>
>>> >> hi matt
>>> >> even I remove all sitemesh decorator from my jsp. it still show
>>> error:
>>> >> seems having error on something else. never mind, hopefully, I will
>>> get
>>> >> it
>>> >> work someday.
>>> >> btw, greybox is really nice.  i am so sad that I could not get it
>>> running
>>> >> :-(
>>> >> sorry to trouble u friends ..
>>> >>
>>> >> ----
>>> >> error message in greybox window
>>> >> ----
>>> >> The page isn't redirecting properly
>>> >> Firefox has detected that the server is redirecting the request for
>>> >> this address in a way that will never complete.
>>> >>
>>> >>
>>> >>
>>> >>
>>> >>
>>> >> mraible wrote:
>>> >> >
>>> >> > You might try disabling SiteMesh on your page (by excluding it in
>>> >> > decorators.xml or commenting out the filter-mapping in web.xml).
>>> That
>>> >> > should allow you to view things w/o worrying about AppFuse's
>>> default
>>> >> > JavaScript or CSS.
>>> >> >
>>> >> > Matt
>>> >> >
>>> >> > On 8/9/07, Thinkboy <[EMAIL PROTECTED]> wrote:
>>> >> >> hi,
>>> >> >>
>>> >> >> sorry, this issue may not be very much about appfuse problem.
>>> >> >>
>>> >> >> anyone has successfully setup greybox in appfuse?  it is very
>>> beauiful
>>> >> >> for popup windows: http://orangoo.com/labs/GreyBox/
>>> >> >>
>>> >> >> however. I am unable to set it up in appfuse and not able to find
>>> any
>>> >> >> solution via google. i just doubt  it may due to any conflict in
>>> js or
>>> >> >> css  which are existing in appfuse.
>>> >> >>
>>> >> >> pls help!.
>>> >> >>
>>> >> >> [scenario:]
>>> >> >> 1) I installation greybox:
>>> >> >> 2) in decorator/default.jsp, i added the following snippet in
>>> between
>>> >> >> <head> tag
>>> >> >>         <script type="text/javascript">
>>> >> >>         var GB_ROOT_DIR = "./greybox/";
>>> >> >>         </script>
>>> >> >> <script type="text/javascript"
>>> >> src="/platform/greybox/AJS.js"></script>
>>> >> >>                 <script type="text/javascript"
>>> >> >> src="/platform/greybox/gb_scripts.js"></script>
>>> >> >>                 <link rel="stylesheet" type="text/css" media="all"
>>> >> >> href="http:/mydomain.com/platform/greybox/gb_styles.css"/>
>>> >> >>                                         <decorator:head />
>>> >> >>
>>> >> >>
>>> >> >> 3) add to  my jsp page:
>>> >> >>  http://google.com/ Launch
>>> >> >> google.com in fullscreen window
>>> >> >>
>>> >> >>
>>> >> >> 4) on web page, a grebox is popup , but it shows  an error message
>>> >> >> ----
>>> >> >> error message in greybox window
>>> >> >> ----
>>> >> >> The page isn't redirecting properly
>>> >> >> Firefox has detected that the server is redirecting the request
>>> for
>>> >> >> this address in a way that will never complete.
>>> >> >>
>>> >> >>
>>> >> >>
>>> ---------------------------------------------------------------------
>>> >> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> >> >> For additional commands, e-mail: [EMAIL PROTECTED]
>>> >> >>
>>> >> >>
>>> >> >
>>> >> >
>>> >> > --
>>> >> > http://raibledesigns.com
>>> >> >
>>> >> >
>>> ---------------------------------------------------------------------
>>> >> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> >> > For additional commands, e-mail: [EMAIL PROTECTED]
>>> >> >
>>> >> >
>>> >> >
>>> >>
>>> >> --
>>> >> View this message in context:
>>> >>
>>> http://www.nabble.com/problem-setting-up-greybox-in-appfuse-tf4241315s2369.html#a12076455
>>> >> Sent from the AppFuse - User mailing list archive at Nabble.com.
>>> >>
>>> >> ---------------------------------------------------------------------
>>> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> >> For additional commands, e-mail: [EMAIL PROTECTED]
>>> >>
>>> >>
>>> >
>>> >
>>> > --
>>> > Regards,
>>> >
>>> > Cuong Hoang
>>> >
>>> >
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/problem-setting-up-greybox-in-appfuse-tf4241315s2369.html#a12758398
>>> Sent from the AppFuse - User mailing list archive at Nabble.com.
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>> 
>> 
>> -- 
>> http://raibledesigns.com
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/problem-setting-up-greybox-in-appfuse-tf4241315s2369.html#a12774454
Sent from the AppFuse - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to