JsTools does not exist in current context

Mar 22, 2011 at 11:48 AM

Hi,

I followed all the instruction to include js,css and dll files but I've been getting this error message:

<ProjectPath>\Views\Shared\Awesome\Popup.ascx(9): error CS0103: The name 'JsTools' does not exist in the current context

 

Could anyone help me urgently, please

Coordinator
Mar 22, 2011 at 12:15 PM

if you would had resharper you would go to popup.ascx and hit alt+enter

you need to import the Omu.Awesom.Mvc namespace into that view

you can do this by adding the @Import ..

or as I described on the frontpage by adding in the webconfig those lines with Omu.Awesome.Mvc and Core

Mar 22, 2011 at 12:27 PM

Thanks for quick response,

There is already import statments below on popup.ascx:

<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<Omu.Awesome.Mvc.Helpers.LookupInfo>" %>
<%@ Import Namespace="Omu.Awesome.Mvc" %>

Also I've added this on webconfig inside view:

 <add namespace="Omu.Awesome.Mvc.Helpers" />
        <add namespace="Omu.Awesome.Core" />

And finally I don't have resharper :-).

 

Btw, it's excellent controls and perfect for my current project. I can't wait to see it working.

 

Coordinator
Mar 22, 2011 at 12:30 PM
Edited Mar 22, 2011 at 12:31 PM

so is it still not working?

have you added the references to omu.awesome.mvc and omu.aswesome.core ?

are you .net 3.5 or 4.0?

 

try creating a new solution empty mvc app and try there to integrate the awesome

(also, there are 2 web.configs)

Mar 22, 2011 at 9:42 PM

I'm using MVC 3.0 with Razor View Engine on 4.0 Framework.

Coordinator
Mar 23, 2011 at 7:03 AM

so, is it working now ?

Mar 23, 2011 at 7:52 AM

Nope, not sure why it's not working. I noticed the awesome folder contains aspx and acs but I'm using Razor view engine. Does this matter?

 

I can run the simpleDemo project, but simply can't run my new project (after following all the steps). Is there anything else I need to consider?

Coordinator
Mar 23, 2011 at 8:03 AM

could you send me an archive of your new sample project ?

Mar 23, 2011 at 8:42 AM
o wrote:

could you send me an archive of your new sample project ?

Sure, which email add do i sent to. I tried to send to notifications@codeplex.com.

But no success

Mar 23, 2011 at 9:17 AM

Now I'm getting this error:

Microsoft JScript runtime error: Object doesn't support this property or method

Coordinator
Mar 23, 2011 at 10:17 AM

send to vnexster@gmail.com

Coordinator
Mar 24, 2011 at 7:50 AM

so, did you fixed it alredy?, I didn't get any email from you

Mar 24, 2011 at 11:58 AM

Hi Awesome,

I think I finally got my head around, but will do more testing.

Is there any step by step guide on using each controls, especially I'm after Pop up form.

This is what I would like to achieve with Awesome control:

1. I've got form (LOB application with MVC 3.0) full of check boxes, drop down , text boxes, text areas and radio buttons.

2. It's designed for slate devices, I would like the AweSomePopUpfom appear when they click on Link or Radio button with all the above 1. this will help user to scroll down up and save space as well.

Now Question:

1. How does Awesome works? If I create DetailsBla action and populate the view with above 1. requirement and call this action from Radio button 2. above, it will work?

2. I also would like to show all the user selected values on confirm page. if they select no then go back to form otherwise persist into db.

 

your help much appreciated.

 

Coordinator
Mar 24, 2011 at 1:31 PM

yes, there is a guide, it's on the frontpage http://awesome.codeplex.com/, but 100% in detail you can learn by looking at the "live demo"

to use the popupform you first call html.MakePopupForm to generate the script for calling it and after you can create actionlinks by doing html.PopupFormActionLink

or you can get the javascript method call by doing Url.PopupFormAction

so you could do something like

$('#myradio').click(function(){ @Url.PopupFormAction("foo"); });

or just make an popupactionlink and look at the generated html to see what's inside the a href='

Mar 25, 2011 at 8:27 PM

Thanks Awesome,

If you could explain the details of my query below will much appreciated.
1. PopupFormAction("foo")
   What is "foo"? Is it an action method? If it is how does Awesome renders the Views that is already on foo action?

2. Do I need to create foo page with out using master layout? Otherwise header and footer will be shown on Popup form?

3. Scenario: Assume I've got Popup form where users will fill up check boxes and radio buttons and submits. How do I display the posted
   back details (stuff the users have filled in) on  Awesome Confirmation page?

Coordinator
Mar 26, 2011 at 5:51 AM

"foo" is the action (you can use intellisene to se that ctrl+space ) from where you will get the html

the action returns the view (html) and the html is set inside of the popup

depends what kind of master layout,(usually yes without) if you will use the same masterpage as the main it will break because you'll import jquery 2 times

3. ??? I don't really understand you want to display in the confirm dialog something ?

Mar 26, 2011 at 8:21 PM

Q3. Confirm Dialog should show all the fields selected/filled by end user so that they can review and confirm/cancel. Is this possible?

Coordinator
Mar 26, 2011 at 8:32 PM

well yes, depending on your scenario it can be done differently

in your post action for the popupform you can return json with some data and use a success function which will show a popup which itself would have 2 buttons confirm or not

look in the live demo at the popop and popupform with successfunction