Sha256: 720e4f51efacd2e5b68f79bcefc4d40631becc1fe32dac9eb63c4dc301600f7b

Contents?: true

Size: 505 Bytes

Versions: 5

Compression:

Stored size: 505 Bytes

Contents

class JspGenerator < BaseScaffold

  def self.source_root
    File.dirname(__FILE__)
  end

  def build
    create_view("index")
    create_view("show")
    create_view("form")
    create_view("edit")
    create_view("new", "new#{class_name}")
  end

  def create_view(template_name, file_name=template_name)
    template("templates/#{template_name}.erb", "#{Configuration::WEB_INF}/jsp/#{@model}/#{file_name}.jsp")
  end
  
  def path url=""
    %Q{<c:url value="/#{@model.pluralize}#{url}"/>}
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
vraptor-scaffold-1.0.0 lib/generators/scaffold_generator/jsp_generator/jsp_generator.rb
vraptor-scaffold-0.0.4 lib/generators/scaffold_generator/jsp_generator/jsp_generator.rb
vraptor-scaffold-0.0.3 lib/generators/scaffold_generator/jsp_generator/jsp_generator.rb
vraptor-scaffold-0.0.2 lib/generators/scaffold_generator/jsp_generator/jsp_generator.rb
vraptor-scaffold-0.0.1 lib/generators/scaffold_generator/jsp_generator/jsp_generator.rb