|
This post was updated on .
Hy!
I' woud like to invoke a method (myAction) from an erb file. The button appears, but the method does not invoke after I pressed the button. Any suggestion? //xx.html.erb <div class="dashbox"> <%= button_to "GO", :method => :myAction %> </div> //Java @UserRole(UserRole.ADMIN) @NavigationSection(NavigationSection.CONFIGURATION) public final class MyPage extends AbstractRubyTemplate implements org.sonar.api.web.RubyRailsPage, Page{ public String getId() { return "xxx"; } public String getTitle() { return "yyy"; } public void myAction(){ System.out.println("go"); } @Override protected String getTemplatePath() { return xx.html.erb"; } } |
|
Hi,
The extension point "Page" provides only metadata. The page is implemented in the Ruby code. For this reason the Java method myAction() is ignored. You should have a look at the new extension point for implementing complete ruby applications : http://docs.codehaus.org/display/SONAR/Extend+Web+Application#ExtendWebApplication-Applications Regards On 5 September 2012 12:33, bbalazs <[hidden email]> wrote: Hy! -- http://sonarsource.com |
|
This post was updated on .
Thank you for your fast reply!
Is it possible to invoke a java code instead of a Jruby code after I pressed a button, because I have no too much experience with Jruby. Can you attach me more real sample/example code how to implement complete JRUBY application with Sonar, please? Thanks. |
| Powered by Nabble | Edit this page |
