GrahamA (4) [Avatar] Offline
#1
I'm just starting the chapter 7 wasn't sure where/how to create the JavaScript event handler (7.1.3), which files should I edit?

I've checked the source code on GIT and there only seems to be a TestDriveController rather than the full examples from earlier chapters.
ken.rimple (246) [Avatar] Offline
#2
Re: Chapter 7.1 Java Script and AJAX - Example Code
Wow, I didn't realize how little context I gave on that one.

This will have to go in for some hints in the text for the next major revision. I just submitted a batch of changes that will become the 2nd update soon.

Ok, on to your question....

I'm talking about the course entity, so it's create.jspx and update.jspx. I truly noticed a snafu here - for some reason the chapter 08 examples ONLY consist of the aspect-j files. This is a mistake and I have to dig through the archives to get it fixed.

I just committed (a maybe earlier version) of the coursemanager-ajax project - it's from Roo 1.2.0, so I think it's recent enough. For now, it'll have to do until I can cross-check it against the manuscript.

UGH.

I also switched it away from MySQL into using HSQL. I will have to make it a point to switch all non-RDBMS chapters to HSQL so that we don't have to do too much work to get the base examples working.

So, you'll modify create.jspx and update.jspx in the views/course under WEB-INF, and add the relevant Javascript tags to those sections.

If you look at the source code for create it will have the Ajax code in there. Now. UGH.

Again, sorry. Somehow I did the inverse of what I wanted at some point in a fever (remove all aj files and commit the code. Apparently I KEPT all aj files and committed the code in that example.)

Best,

Ken
ken.rimple (246) [Avatar] Offline
#3
Re: Chapter 7.1 Java Script and AJAX - Example Code
Oh, and the updated samples can be fetched from:

https://github.com/krimple/spring-roo-in-action-examples

so hit that, click on the zip file download, extract it and you should have what you need. I just fixed the pom in the parent to now include the ajax one, and upgraded the ajax example to Roo 1.2.2. I still have to review the gwt build.

Ken
GrahamA (4) [Avatar] Offline
#4
Re: Chapter 7.1 Java Script and AJAX - Example Code
Ken

Thanks for the updated example I can see how it all fits together now.


Regards


Graham
ken.rimple (246) [Avatar] Offline
#5
Re: Chapter 7.1 Java Script and AJAX - Example Code
Awesome Graham, that is my goal so it is good to hear I was able to help.

All the best,

Ken
348209 (1) [Avatar] Offline
#6
Re: Chapter 7.1 Java Script and AJAX - Example Code
[quote=ken.rimple]Wow, I didn't realize how little context I gave on that one.

This will have to go in for some hints in the text for the next major revision. I just submitted a batch of changes that will become the 2nd update soon.

Ok, on to your question....

I'm talking about the course entity, so it's create.jspx and update.jspx. I truly noticed a snafu here - for some reason the chapter 08 examples ONLY consist of the aspect-j files. This is a mistake and I have to dig through the archives to get it fixed.

I just committed (a maybe earlier version) of the coursemanager-ajax project - it's from Roo 1.2.0, so I think it's recent enough. For now, it'll have to do until I can cross-check it against the manuscript.

UGH.

I also switched it away from MySQL into using HSQL. I will have to make it a point to switch all non-RDBMS chapters to HSQL so that we don't have to do too much work to get the base examples working.

So, you'll modify create.jspx and update.jspx in the views/course under WEB-INF, and add the relevant Javascript tags to those sections.

If you look at the source code for create it will have the Ajax code in there. Now. UGH.

Again, sorry. Somehow I did the inverse of what I wanted at some point in a fever (remove all aj files and commit the code. Apparently I KEPT all aj files and committed the code in that example.)

Best,

Ken[/quote]