Comments (8)
This is a breaking change with Grails 2.3. The list
action no longer exists in the scaffolding. We will need to update the chapter and source code to use the index
action instead.
from graina2.
Thank you, Peter. With your help above, and looking at the official "Scaffolding - Reference Documentation" at http://grails.org/doc/latest/guide/scaffolding.html (currently for the version 2.3.1), I think it works now.
I commented out the entire index method in the QuoteController.groovy class as follows, and it seems to work now (meaning, I am able to see the quote list which I was not able to see before).
//def index() { //redirect(action: "home") //}
Thank you again for the quick feedback, it was very helpful (especially for a newbie like myself).
from graina2.
Glad it's working for you. I'd like to keep this open as a reminder that we need to update the QOTD app.
from graina2.
I see the index page, but I cannot see the list Larry, Chuck and Eric's quotes.
I inserted three record using "grails console", and it prints 3 when I command "print qotd.Quote.count()"
Interestingly I don't see the 3 results in scaffolding index(list) page.
What's wrong with my index page?
Grails 2.3.4
from graina2.
Have you switched to a persistent database? If not, any changes you make via the console UI will not have an effect on the running application.
from graina2.
Thank you for your response.
I changed my environment settings for development as follwos:
development {
dataSource {
dbCreate = "update" // one of 'create', 'create-drop', 'update', 'validate', ''
url = "jdbc:h2:file:~/devDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
}
}
I believe that it's enough to use persistent database.
I see the results "grails console". I can retreive results using random() action method described in your book.
I cannot see the three records only when I access the index() page supported by "scaffolding".
It's quite weired.
I tried to import your qotd application provided in github. It doesn't seem to work with Grails 2.3.4.
Can I know which version I have to choose on the fly?
from graina2.
Hmm...
I found an answer here: http://www.grailsexample.net/instant-ui-dynamic-scaffolding/#comment-29334
However, it sees like a bug of Grails 2.3.4 because I have to pass the List even using "dynamic" scaffolding like:
def index() {
[quoteInstanceList : Quote.list()]
}
I believe that some contents must be changed if your book's supposed to support the latest version of Grails.
Thank you.
from graina2.
The sample source code is now based on Grails 2.3.4. @nasiajai please check your code against that. You should not be overriding the index
action in your controller.
from graina2.
Related Issues (20)
- Scaffolding does not correctly handle multipart forms
- In section 1.3.2 either add an explicit return or explain why it's optional
- Ch 8 (p.219) references non-existent section in ch 2
- Including `password` constraint on `ApplicationUser` doesn't work
- Section 3.2.1 Page 69 Reference to integration test not found HOT 2
- Section 3.4.2, page 85, keeping the many side sorted, paragraph 2, last line HOT 1
- Chapter 3, page 90, figure 3.10, public.user table HOT 1
- Redundant unscoped isEditState variable used in listing 13.10, 13.11
- Chapter 6, Page 145, paragraph 2, line 2 HOT 2
- Chapter 6, Page 146, Figure 6.4 HOT 1
- Page 159 first sentence HOT 2
- Hubbub can't run with 2.4.4 HOT 1
- Technique for executing single feature method doesn't work
- Suggestion for reader changes to listing 8.5 is confusing
- Page 218, Listing 8.11 HOT 1
- Page 223, first paragraph under code fragment HOT 1
- Page 223, Prototype or jQuery? HOT 1
- Chapter 9, Page 240, first line, "When you give..." HOT 2
- Chapter 9, listing 9.9 HOT 2
- `random` action should not be a closure property
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from graina2.