Skip to main content

Posts

Showing posts from April, 2008

Jmaki, Jruby and Tomcat: stories from J Land

I was using the nice Dojo Table widget for a rails application because I needed to allow the user to sort the displayed table. I also needed to deploy the application on Tomcat. To make it work, I had to copy the resources folder created by Jmaki in the public folder to the root folder of Tomcat's webapps (the webapps folder). I also had to do some fixes to jmaki_core_celper.rb source. The modified parts (which adds more functionality such as allowing to pass field names to jmaki widgets) are the following: module JmakiCoreHelper # ---------- Global Constants ---------- JMAKI_RESOURCES = RAILS_ROOT + '/' + "public/resources/" #chg by JPT to allow Tomcat to find the the widget's files ... # ---------- Global jMaki Methods ---------- def jmaki_widget(name, options = {}, field_name ="jmaki_field", width = 100) # Set up variables we will need result = "" nameSlashed = name.tr('.', '/') widgetD