Add button to show.jspx in spring roo mvc project

I created a spring roo project using Getting Started with Spring Roo as a starting point. The project is created in STS using roo 1.1.5. I have added a neo4j plot and can create nodes with simple edges and create a web part that outputs "controller all -package ~ .web".

The project is a simple web application with a node character and race and a contributor grant with start time, end time, total time, and race. Since the Edge Member is @RelatedToVia, it becomes @RelationshipEntity and I want to add a button to save the Member.

I found WEB-INF / tags / form / field / table.tagx where add, edit, delete and friends buttons are defined, i.e .:

      <c:if test="${update}">
        <td class="utilbox">

      

..                    

But where to set the variable update? I looked at the code generated by STS but couldn't find it. Sorry if it's obvious.

Regards Klaus

Edit:

I found out that WEB-INF / tags / form / show.tagx have buttons to turn on / off, like refresh buttons:

<c:if test="${empty update}">
  <c:set var="update" value="true" />
</c:if>

      

So, I will add a new button to this file. The spring framework seems to be laid out so well. You just need to find different places.

Regards Klaus

+3


source to share


1 answer


The value for is update

obtained from the attributes that you specify when using a tag created with tagx

.

As an example,

If form:table

used as in jspx

, and if the following was set: you will get true

in your variable update

if it was assigned using the directive. However, it seems to be true

set by default in a tag form:table

inside Spring Roo.

If you want to set to false, when using, you must set the value for the attribute as follows.



<form:table update="false" />

If you want to dive deeper into this, take a look at the file table.tagx

you mentioned, you will find the following line that explains it.

<jsp:directive.attribute name="update" type="java.lang.Boolean" required="false" rtexprvalue="true" description="Include 'update' link into table (default true)" />

Greetings.

+2


source







All Articles