ZK framework advice grails - grails

I am needing something to allow a user to use a tool to define a layout which then can be applied to a grails application.
I have been looking into ZK Framework, It seems this will allow it but I am not 100% sure.
Has any one made use of this before?
Or could anyone suggest any alternative.

It seems that the ZKGrails plugin does what you want.
It enables you to port the ZUL pages you developed in ZK to Grails. In particular, you would extend the class GrailsComposer (which in turn extends from ZK's GenericForwardComposer) in order to autowire your ZUL UI components to Grails event handlers.
This ZKGrails tutorial shows how to port the ZK's Load-On-Demand program to Grails.

Related

How can I use Vaadin with SparkJava

I have implemented an API that is REST based using SparkJava (http://sparkjava.com). Its a standalone app and works great.
Now I'd like to implement part of that functionality access through a Vaadin UI. I'm quite new to Vaadin as well.
Does anyone know how I can still keep the single VM model, and able to use Vaadin's wonderful UI structures with greatness of SparkJava?
Is there someway that I can bind the Vaadin Servlet to the SparkJava Route perhaps?? Just thinking loud here.
Appreciate your help very much!!
I assume this is possible because I saw its used with Jetty (Vaadin 10/11 and embedded Jetty)
sure that is possible! You can simply make Jetty expose both SparkJava filter, and Vaadin 10+ servlet. I've created an example application which builds on Alejandro's work: https://github.com/mvysny/embedded-jetty-demo

Hybris : How to create addons for acceleratorservices extension?

I am new to Hybris environment. i'm working on add-ons concept in Hybris. I can able to create addons for storefront but my question is how to create addons for acceleratorservices extension. I have tried the usual method but that is not working.
(ant addoninstall -Daddonnames="{addonName}" -DaddonStorefront.yacceleratorstorefront="acceleratorservices"). When i compile my system it is throwing cyclic reference error. So can anyone tell me like how to create addons for acceleratorservices extension.
Any sort answer is welcome from Hybris expert. Thanks in advance.
Addon is used to extends the functionnality of templates (extensions starting with y). In your case acceleratorservices is just a dependency of storefront. So you should just use spring to override/extends the features of acceleratorservices you need.
To do it well, you class must extends the one from acceleratorservices that you want to modify. Then depending on your needs, add or override methods.
Finally update your sping configuration with "aliases" to replace the bean reference by your new implementation.

Which is the best way to include Grails into Liferay?

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 similar to the django-debug-toolbar (djdt)?

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

Grails client side validation

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.

Resources