Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Very simple way to determine the URL under which the site will be available.
line 7:
@DefaultHandler
This Method is called when the URL is visited. Returns a Resolution to the JSP-File new_game.jsp.
line 12:
public Resolution update() {
This method is called when the HTML-Form-Submit-Button (see below in new_game.jsp) is clicked (<stripes:submit name="update">).
The methods getGame and setGame srepresent the Bean property "game", which can be accessed (read and write) from the corresponding jsp file.
line 24:
@Validate(field="mainTitle", required=true, on="update")
The form field  "game.mainTitle" is validated (must not be empty) in the methode "update".

 

 

Code Block
languagehtml/xml
titlenew_game.jsp
firstline1
linenumberstrue
<%@ include file="/WEB-INF/taglibs.jspp"%>

<stripes:layout-render name="/jsp/layout/main.jsp">

<stripes:layout-component name="html_head">
 <link rel="stylesheet" href="${contextPath}/css/easy-accordion.css" />
</stripes:layout-component>

<stripes:layout-component name="contents">

<stripes:form beanclass="org.oregami.action.experimental.NewGameActionBean">
<table class="form">
    <tr><td>
  
         mainTitle: <stripes:text name="game.mainTitle" class="required"/> 
    </td>
    <td>
        <stripes:errors field="game.mainTitle"></stripes:errors>
    </td></tr>
    <tr><td>
        description: <stripes:text name="game.description"/>
    </td></tr>
    <tr><td colspan="1">
        <stripes:submit name="update"><fmt:message key="aktualisieren"/></stripes:submit>
    </td></tr>
</table>
</stripes:form>   

</stripes:layout-component>
</stripes:layout-render>

line 17:
<
stripes:errors field="game.mainTitle"></stripes:errors>

Displays the error message for the field "mainTitle" of the property "game" (if an error exists).