Skip to content

Commit

Permalink
[playframework#1367] Docs: Disqus comments - December 2011
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Hilton committed Jan 7, 2012
1 parent 5619b35 commit 10da3fb
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 7 deletions.
2 changes: 1 addition & 1 deletion documentation/manual/configuration.textile
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ Default: @secret@

h2(#cron). Scheduled jobs

You can configure cron expressions for scheduled jobs as configuration keys that start with @cron.@ and use the key as the value of a <code>@play.jobs.On</code> or <code>@Every</code> annotation. For example, <code>@On(cron.noon)</code> refers to:
You can configure cron expressions for scheduled jobs as configuration keys that start with @cron.@ and use the key as the value of a <code>@play.jobs.On</code> or <code>@Every</code> annotation. For example, <code>@On("cron.noon")</code> refers to:

bc. cron.noon=0 0 12 * * ?

Expand Down
9 changes: 9 additions & 0 deletions documentation/manual/crud.textile
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,15 @@ bc. public class CustomAdminCompany extends CRUD {

This is not the end; you can also customize @findPage@ and other methods. Have a look at the source code.

h2. <a name="l10n">Localisation</a>

You can localise the user-interface text by overriding the CRUD module’s messages in your application’s @conf/messages@ file.

bc. crud.add=Create new &{%s}

To see which message keys are used, look in the CRUD module’s own message file: @$PLAY_HOME/modules/crud/conf/messages@.


h2. <a name="commands">Commands</a>

The CRUD module provides a *crud:override* command that you use on the command line to override the default templates. This works because the CRUD module loads templates from your application if they are present, instead of its own. You can also use @crud:ov@ instead of @crud:override@.
Expand Down
2 changes: 1 addition & 1 deletion documentation/manual/guide7.textile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ To enable the CRUD module, add a line in the @/conf/dependencies.yml@ file, afte
bc. require:
- play -> crud

Now run the @play dependencies@ command to resolve the new module dependency.
Now run the @play dependencies@ command to resolve the new module dependency. If you are using an IDE then you should also update its project, to include the new module dependency: for example, run `play eclipsify` again, and refresh the project in Eclipse.

Then this module comes with a generic set of **routes** that we can reuse for now. To import these routes just add this line to the @/yabe/conf/routes@ file:

Expand Down
12 changes: 9 additions & 3 deletions documentation/manual/tags.textile
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ bc. #{field 'user.name'}
<input type="text" id="${field.id}" name="${field.name}" value="${field.value}" class="${field.errorClass}">
<span class="error">${field.error}</span>
</p>
#{/}
#{/field}

So you don’t repeat @user.name@ again and again.

Expand Down Expand Up @@ -250,15 +250,21 @@ h2. <a name="get">get</a>
Retrieves a value defined with a "set":#set tag. You may use the get/set mechanism to exchange values between templates, layouts and sub-templates.

bc. <head>
<title>#{get 'title' /}
<title>#{get 'title' /}</title>
</head>

You can also use the get tag in the following way, which will display "Homepage" if title has not been specified.

bc. <head>
<title>#{get 'title'}Homepage #{/}
<title>#{get 'title'}Homepage #{/get}</title>
</head>

You can test whether a variable is set using the @if@ tag:

bc. #{if get('title')}
<h1>#{get 'title' /}</h1>
#{/if}

h2. <a name="i18n">i18n</a>

Exports localized messages in JavaScript. Localized messages are available from your JavaScript code using the @i18n()@ function.
Expand Down
2 changes: 1 addition & 1 deletion documentation/manual/templates.textile
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ Each extension method is a static method and should return a @java.lang.String@

Use your formatter like this:

bc. <em>Price: ${123456.324234.ccyAmount()}</em>
bc. <em>Price: ${123456.324234.ccyAmount("€")}</em>

Template extension classes are automatically detected by Play at start-up. You just have to restart your application to make them available.

Expand Down
2 changes: 1 addition & 1 deletion documentation/manual/validation.textile
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ This would result in the output:
bc. Customer name is required
age is required

You can change also override the error key using the @error.message(String key)@ method. For example:
You can also override the error key using the @error.message(String key)@ method. For example:

bc. Error error = validation.required(name).error;
if(error != null) {
Expand Down

0 comments on commit 10da3fb

Please sign in to comment.