The ‘create’ for the main class is coming.

With YUI, finally I managed to rewrite the standard ‘create’ view. It does not mean that the view is done, but my eyes don’t hurt so much. The Grails generated views make me feel dizzy. I don’t know why.

I created 3×3 grid in the CSS Grid builder, decomposed the  standard view into templates (_topright.gsp, _bottomleft.gsp, and so on) and put <g:render template=”…” /> in the html file I got from the builder. Of course the YUI ‘grids.css’ or ‘grids-min.css’ (build/grids folder within the YUI zip file) stylesheet must be added to HEAD either in the new view, or in the ‘main.gsp’ Sitemash layout (…/views/layout/main.gsp).

Ah, yes – I didn’t delete the original ‘create’ view. I just added a new one – ‘newcreate’ (pretty geeky name, I know…) and all the new “experimental”  stuff is landing there. What is important is to not forget about adding a new action to the controller. Another one key thing is to modify the ‘list’, ‘show’ and ‘edit’ views to re/direct actions to the ‘newcreate’ instead of ‘create’. Obvious stuff, but writing something down, helps to remember things :)

To be honest I am not so sure if the time I’ve spend on the views was a good deal, but for sure I learnt something new. This is good. Good. However, I don’t feel I moved towards the goal as much as I wished to. The real thing will be to introduce some services to import the real data into the database.

Distracted. This is how I feel.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s