How do you (if you) manage client side validation with grails ? Do you use a plugin or do you mirror your constraints using a javascript framework ?
Cheers
I haven't used them personally but these two plugins might help you out:
http://grails.org/plugin/javascript-validator
http://www.grails.org/plugin/remote-constraints
On Grails projects that I've been a part of, We haven't used a plugin but rather a mashup of javascript plugins and custom validators (jQuery plugins, Prototype, Dojo, etc.) to achieve the client side validation. Its handy to provide instant field-level validation on the client.
As leebutts said, The source of these plugins are open. Why not consider enhancing one(or both) of these plugins to achieve what you need and contribute that back to the community?
Might be worth checking out the new constraints plugin. With it Constraints become a Grails artefact, and might make this job easier.
Related
Struts2 Scope Plugin is no longer compatible with the latest version of Struts2-core (e.g. 2.3.15). What is the successor of the Struts2 Scope Plugin? Struts2 Conversation Scope Plugin? What is the migration effort? Experience?
Yes, It is the Struts2 Conversation Plugin. There is nothing such as a migration plan.
Best strategy is to identify annotations from the old scope plugin. Then replace the them one-by-one with the new annotations. E.g. Find #In/#Out annotations and replace them with #ConversationField (of course, where appropriate)
Follow the Quick-Intro here: http://code.google.com/p/struts2-conversation/
First I tried to update the scope plugin itself. This is pretty straight forward (change dependency, add a version to the maven compiler, replace findAnnotatedMethods by getAnnotatedMethods and fix the tests) and seems to work fine.
Nevertheless I decided to remove the plugin completely and use a simple SessionAware actions.
I want a workflow/webflow plugin that needs to be integrated with an existing Struts2 application.
I found Struts-workflow-extension but looking in its source code I realized it is entirely based on the Struts1 and have there is no support for this plugin since 2003.
Basically my requirement is to handle the entire workflow through configurations that could be done at runtime. Spring webflow is also an option but it's much of a learning curve depending on the deadline that I have to meet.
So is there any workflow/webflow extension that can be easily integrated with Struts2?
Any help will be highly appreciated. Thanks
You can try https://github.com/aleksandr-m/struts2-actionflow which seems to be more up to date.
I am responsible for four different Jenkins installations - two test and two production servers.
What options do I have from within Jenkins to make it more obvious which machine I am connected to?
What I would like to do is be able to change the Jenkins text at the top of the screen to 'Jenkins Department 1 Test' - is this possible? Are there other options such as changing colours etc?
I think the simplest way to do this is with the Simple Theme Plugin.
A plugin for Jenkins that supports custom CSS & JavaScript.
You can make your own simple css and/or javascript, point to the file in the configuration and you're done. Or you can use existing css from the internet.
obsolete as of 2017
Try the Page Markup Plugin.
Adds custom HTML content to header & footer on all Hudson pages.
Use this plugin to add your own custom content (e.g. CSS, site headers, and site footers) to Hudson pages.
I haven't used this plugin myself, but you should be able to override the default CSS styles to insert your own header text or image.
Alternatively, you can edit the CSS / images yourself in JENKINS_HOME/war/css and JENKINS_HOME/war/images, but I don't recommend that since you'll probably lose any customizations when you upgrade.
Another possibility would be to use tools like Greasemonkey (Firefox) or a similar built in ability with in Chrome (http://www.chromium.org/developers/design-documents/user-scripts) to have JavaScript code alter the appearance of the page. You'd get a lot of flexibility and could potentially go so far as to prohibit certain commands from executing or enforce additional restrictions when executing certain commands on the production servers.
In addition to or instead of the Simple Theme Plugin proposed by #Illidanek, you might also try the jQuery Plugin.
This plugin is a library plugin for other plugins to share common jQuery. It also allows users to use jQuery on each view descriptions.
It doesn't completely match your requirements, but it might be useful to add jQuery snippets for special formatting/styling/html-manipulation in the Jenkins "System Message", in view descriptions or in job descriptions.
I personally often prefer the Simple Theme Plugin.
I'm trying to include Grails applications into a Liferay portlet. I tried the Grails Liferay Portlets Plugin but it did not work for me at all.
Does anybody know any other possibilities? Which do you think is the best and why?
We had our Grails project integrated with Liferay at one point but it was a mess. Inevitably we pulled it out of Liferay and we were able to use Grails properly again. In our instance the question became, why are we using Liferay and do we really need it?
Now if you have a requirement for Liferay you might try simply using Spring Portlet support and use parts of Grails you like but not fully integration. Spring Portlets with Groovy were much easier and cleaner to do. If you simply want Grails goodies for services etc. you can try deploying a Grails WAR on the same tomcat and expose services to your portlets through REST, Hessian, Burlap or some other easy service serialization mechanism in Spring/Grails. In this case you have a Liferay UI app that calls your Grails services.
Once again, try some options, then decide if you truly need (or have) to use Liferay. With advances in Javascript UI packages, I'm not sure 'portlet' spec apps are as appealing as they once were and the word 'portal' is something that sounds good to management but inevitably means little to what needs to be implemented.
Does Grails have any plugins with functionality similar to the django-debug-toolbar (djdt)?
See this screencast for an introduction to djdt.
Why yes it does grails debug-toolbar:
Grails Debug Toolbar is a plugin
inspired from Django Debug Toolbar
While it doesn't have all the features of djdt it is planned to expand the feature set in the future, here is relevant section from their webpage:
Future work
Currently the views of debugtoolbar
need to go in the grails-app/views of
the application. When you install the
plugin they are automatically copied
to your application grails-app/views.
Need to avoid this.
JavaScript and
static resources for the toolbar
reside in web-app/debugtoolbar. It is
also copied to your application
web-app/debugtoolbar. Need to avoid
this.
A way of ordering the panels in
the toolbar. Currently it is random
depending on how beans are found
during execution of tag.
More useful panels such as Timing the requests, SQL queries, logging etc
It not quite a toolbar (and not a plugin) but Spring Insight gives you detailled request timing right down to the JDBC level. It integrates pretty nicely with Spring Tool Suite from what I've seen.
Check out Peter's screencast: http://www.grails.org/blog/view/pledbrook/New+screencast%3A+Profiling+with+STS+%26+Spring+Insight
You need to deploy your app to Spring's tcServer rather than a plain tomcat which might be fine for development tuning.
cheers
Lee