spring-roo

Testing @RooJavaBean class in Eclipse IDE with JUnit

六月ゝ 毕业季﹏ 提交于 2019-12-11 07:16:29
问题 I use Spring Roo to generate getters/setters. When I update my class under test and then run JUnit tests from Eclipse IDE (STS), it does't see changes I have made. For example: java.lang.NoSuchMethodError: com.example.web.forms.UserRegistrationForm_Roo_JavaBean.ajc$interMethodDispatch1$com_datefitting_web_forms_UserRegistrationForm_Roo_JavaBean$com_example_web_forms_UserRegistrationForm$setName(Lcom/datefitting/web/forms/UserRegistrationForm;Ljava/lang/String;)V` After running roo>perform

Why is Spring Roo giving me a “Member holding details required” error?

假装没事ソ 提交于 2019-12-11 06:23:34
问题 I have tried running a few commands with Roo and it keeps returning: roo> controller all --package com.package Member holding details required Additionally, when creating new entities, it does not create the normal Roo aspects it previously created. Now it just creates a new empty class with a few @Roo annotations: roo> entity --class com.package.Dummy Created SRC_MAIN_JAVA/com/package/Dummy.java Searching the web has turned up empty on this specific error. Any ideas? 来源: https:/

Stringbuilder append newline in spring mvc

霸气de小男生 提交于 2019-12-11 04:53:07
问题 I am still learning Spring Roo so please bear with me. Here is what I have (generated by roo) public String convert(Cluster cluster) { return new StringBuilder().append(cluster.getName()).toString(); } so what that produces is this. <div id="_s_com_clusters_id" class="box">Cluster1,Cluster2,Cluster3,Cluster4,Cluster5,Cluster6</div> Which displayed Cluster1,Cluster2,Cluster3,Cluster4,Cluster5,Cluster6 to the webpage. What I want to do is insert a new line instead of the "," i tried append("\n"

How can one rollback commands in Spring Roo?

别说谁变了你拦得住时间么 提交于 2019-12-11 04:29:30
问题 Ben Alex has a slideshow introducing Spring Roo. On slide 8, there is the claim "Even if you make a mistake, Roo will rollback changes!" I'm unable to find actual documentation of this feature. Does anyone know how this can be accomplished? 回答1: If you typed in a command you cannot rollback using roo command line(as far as I know) 回答2: You cannot roll back, but roo keeps a log, roo.log, so you can repeat everything you've done up until then. And of course, you can just remove what's been

Grails/Roo for a .Net developer

心已入冬 提交于 2019-12-11 02:23:55
问题 I am currently picking up Grails and Roo. The vast majority of training materials appear aimed at new developers or existing Java developers. Does anyone know of any guides, resources or tips for translating existing development experience with .Net (C#/ASP.Net/Asp.Net MVC)? 回答1: Not that I know of, but there may be resources for .Net -> Java, which is probably all you really need. Perhaps tag your question with 'java' as well? BTW, it's probably worth mentioning which language you're

How can I get Roo to produce a link that opens a create or edit page instead of text when it generates output for a page?

☆樱花仙子☆ 提交于 2019-12-11 00:57:16
问题 Currently in the list view for an entity, references to other entities are just output as the key value in plain text. Instead, I would like references to other entities to be output as hyperlinks. I tried modifying the list.jspx but I couldn't figure out what I needed to add to the URL to make it open to the right controller. A pointer in the right direction would be helpful. 回答1: I find the roo tag libraries always point me in the right direction. Here is an example from src/main/webapp/WEB

executing spring roo programmatically

浪子不回头ぞ 提交于 2019-12-10 21:33:59
问题 i had a look at spring roo.I found that we can generate entities ,contollers and others using command prompt. But i need to get the entity names and field names as a user input from text boxes and then generate the project using roo. I am using windows. 回答1: You can use the Roo Command Wizard available on the Springsource Tool Suite (STS). 回答2: You can create script file, and then execute that file with roo. >roo script --file fileName. Unfortunaly I do not know if it is possible to run roo

<script> tag doesn't close properly

主宰稳场 提交于 2019-12-10 19:45:56
问题 In my default.jspx which contains the basic layout for the page I am trying to import some jquery libraries as follows <head> ... <spring:url value="/resources/js/lib/jquery-1.9.1.min.js" var="jquery_url" /> <spring:url value="/resources/js/lib/jquery.tokeninput.js" var="jquery_tokeninput_url" /> <script src="${jquery_url}" type="text/javascript"></script> <script src="${jquery_tokeninput_url}" type="text/javascript"></script> <script type="text/javascript"> $.noConflict(); </script> <util

Problem with @OneToMany annotation with Spring Roo

爷,独闯天下 提交于 2019-12-10 15:48:33
问题 I'm trying to use Spring Roo to generate entities with a @OneToMany unidirectional relationship. Here's what I've tried: entity --class ~.family.Child field string --fieldName name controller scaffold ~.web.ChildController entity --class ~.family.Father field string --fieldName name field set --fieldName children --element ~.family.Child --cardinality ONE_TO_MANY controller scaffold ~.web.FatherController perform package This produces the expected entities and database tables (including a

I want to disable Roo scaffolding

时间秒杀一切 提交于 2019-12-10 13:02:22
问题 Because I have manually tuned my entities and controllers and view, I would like roo to change none of them. Nevertheless I would like roo to keep on scaffolding all new entities. How could I do that 回答1: You can modify the @RooWebScaffold annotation in your entity by adding update=false attribute for it. @RooWebScaffold(path = "<yourpath>", formBackingObject = <YourClass>.class, update=false) This tells Roo not to scaffold and update views for the generated entity. Cheers!!! 回答2: Remove