[SOLVED] Help with viewport sample
*NEW - Coolite Toolkit Version 0.7 now available for DOWNLOAD. See also Examples Explorer.
 

Coolite Forums

Welcome Guest ( Login | Register )
 
[SOLVED] Help with viewport sample
Subscribe
Last Login: 11/20/2008 4:01:17 AM
Posts: 11,
Posted 8/19/2008 11:43:50 AM

Group: Coolite Early Adopter
 Hi! I'm trying to adapt the viewport with BorderLayour sample to use in a personal project. I want to show an aspx page in each panel of accordion control, select an option of this panel (with buttons, links or anything) and show a page in a tab in center region.

But I have a problem: when I add in the panel some asp.net controls (buttons, for example), I have a crash when I click them. If I add coolite buttons, they doesn't show when I run the application. (I'm using AutoLoad property in the panel to show the page with the buttons). The buttons are visible if I run only the page which contains them (not the viewport page). 

Can someone help me? (any sample or something like it would be very welcome!)

(Disclaimer: I'm from Argentina and my english sucks. Sorry if you can't understand me and thanks for trying!)
Last Login: Today @ 3:28:10 PM
Posts: 1,652,
Posted 8/19/2008 12:11:00 PM

Group: Core Development Team
By "crash", do you mean Visual Studio crashes when you add a control during design time? If yes, are you using any other 3rd party controls on the same page? If yes, which one(s)?

If VS is not crashing, the can you provide more details on what exactly is crashing? the browser? which would be very strange. Or, are you just getting a JavaScript error? or is an Exception thrown?

I think you might have to post some code demonstrating what you've got so far?
--
Geoffrey McGill
Coolite Inc.
Development Team
Coolite Examples | Coolite API Docs | ExtJS API Docs
twitter [coolite | personal]
Last Login: 11/20/2008 4:01:17 AM
Posts: 11,
Posted 8/20/2008 5:58:02 AM

Group: Coolite Early Adopter
geoffrey.mcgill (8/19/2008)
By "crash", do you mean Visual Studio crashes when you add a control during design time? If yes, are you using any other 3rd party controls on the same page? If yes, which one(s)?

If VS is not crashing, the can you provide more details on what exactly is crashing? the browser? which would be very strange. Or, are you just getting a JavaScript error? or is an Exception thrown?

I think you might have to post some code demonstrating what you've got so far?


I have several problems:

-If I open in IE6, It doesn't show anything in the panel in the accordion (only Loading...).
-In Firefox 3, the panel shows the aspx page (Paginas.aspx), and I can see the asp.net button, but not the coolite button.
-If I click the asp.net button, I get an exception.

I'm attaching the code. Just copy the Coolite dll.

Thanks!
Post Attachments
Pruebas de Interfaz.rar (6 views, 17.66 KB)
Last Login: Today @ 3:28:10 PM
Posts: 1,652,
Posted 8/20/2008 10:08:11 AM

Group: Core Development Team
Based on your description, I think you're just getting a JavaScript error somewhere. I'm taking a look at your sample now.
--
Geoffrey McGill
Coolite Inc.
Development Team
Coolite Examples | Coolite API Docs | ExtJS API Docs
twitter [coolite | personal]
Last Login: Today @ 3:28:10 PM
Posts: 1,652,
Posted 8/20/2008 11:27:57 AM

Group: Core Development Team
The problem is caused because the AutoLoad property is loading another .aspx Page which contains a <form> and server controls. The AutoLoad feature is very unique in that it takes the html of the AutoLoad page (Child) and adds it directly to the Parent Page. The two become one.

The AutoLoad property makes an ajax request for the Child page, so the complete lifecycle of the Child is executed. AutoLoad then takes the Child html response and adds it directly to the Parent. It's kind of like a client-side file include.

In general, if you have an asp.net web control, for example <asp:Button>, on the Child, then clicking the Button will trigger a postback, not to the Child, but to the Parent. Because the button was on the Child, but the server is trying to process through the Parent, you may get a Exception and/or unexpected results. The Child posts back to the Parent.

If you want to define functionality within a Child Page and that child contains asp.net web controls which post back to the server, I would suggest adding the functionality to a web user control (.ascx), or loading an <iframe> with the Child.

If the .AutoLoad property is set with a url which starts with "http", then AutoLoad thinks you're loading an external domain and loads the url into an <iframe>.

If the Child does not contain postback controls, using AutoLoad shouldn't be a problem.

I think for your scenario, it would be best to add the Child controls/functionality to a web user control (.ascx), then add the .ascx to the <Content> section.

Hope this helps.
--
Geoffrey McGill
Coolite Inc.
Development Team
Coolite Examples | Coolite API Docs | ExtJS API Docs
twitter [coolite | personal]
Last Login: 11/20/2008 4:01:17 AM
Posts: 11,
Posted 8/21/2008 10:37:13 AM

Group: Coolite Early Adopter
Thanks, I think I will use iframes.
« Prev Topic | Next Topic »
Reading This Topic
Active Users: 0 ( 0 guests, 0 members, 0 anonymous members )
No members currently viewing this topic.
All times are GMT -8:00, Time now is 6:48pm