Skip to content

Commit

Permalink
simplified the demo
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanrauh committed Jul 4, 2016
1 parent c2c433a commit 6702472
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/webapp/mobile/Shake.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,24 @@ td {
and many tablet computers have such a sensor.</p>
<h1>Basic usage</h1>
<p><code>&lt;b:shake /&gt;</code> only takes a singe parameter: <code>onshake</code>.
That's either a JavaScript function or - if it's preceded by <code>ajax:</code> - a call of a backend method.</p>
That's either a JavaScript function.</p>

<h1>Live demo</h1>
<p>Open this page on a mobile device and shake it. Both a JSF message and a JSF alert box should show. This is
<p>Open this page on a mobile device and shake it. A JSF alert box should show. This is
the source code needed:</p>
<b:well>
<script type="syntaxhighlighter"
class="brush: xml; toolbar: false;gutter: false; first-line: 1">
<![CDATA[
<h:form>
<b:shake onshake="ajax:shakeBean.onShake();javascript:alert('shaken!');" update="form" />
<b:shake onshake="alert('shaken!');"/>
<b:messages />
</h:form>
]]></script>
</b:well>

<h:form>
<b:shake onshake="ajax:shakeBean.onShake();javascript:alert('shaken!');" update="form" />
<b:shake onshake="alert('shaken!');" />
<b:messages />
</h:form>

Expand Down

0 comments on commit 6702472

Please sign in to comment.