You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by we...@apache.org on 2010/04/21 16:31:02 UTC
svn commit: r936324 -
/myfaces/extensions/scripting/trunk/extscript-examples/myfaces20-example/src/main/webapp/javablog.xhtml
Author: werpu
Date: Wed Apr 21 14:31:02 2010
New Revision: 936324
URL: http://svn.apache.org/viewvc?rev=936324&view=rev
Log:
adding ajax support to the java blog
Modified:
myfaces/extensions/scripting/trunk/extscript-examples/myfaces20-example/src/main/webapp/javablog.xhtml
Modified: myfaces/extensions/scripting/trunk/extscript-examples/myfaces20-example/src/main/webapp/javablog.xhtml
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/extscript-examples/myfaces20-example/src/main/webapp/javablog.xhtml?rev=936324&r1=936323&r2=936324&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/extscript-examples/myfaces20-example/src/main/webapp/javablog.xhtml (original)
+++ myfaces/extensions/scripting/trunk/extscript-examples/myfaces20-example/src/main/webapp/javablog.xhtml Wed Apr 21 14:31:02 2010
@@ -3,14 +3,16 @@
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html"
xmlns:t="http://myfaces.apache.org/tomahawk" xmlns:grv="http://myfaces.apache.org/groovy">
-<head>
+<h:head>
<title>Hello World</title>
-</head>
+</h:head>
<body>
<ui:composition template="/template.xhtml">
<ui:define name="body">
-
+ <h:outputScript name="jsf.js" library="javax.faces"
+ target="head"/>
+
<h1>
<ui:insert name="title">Ext-Scripting Javablog Example</ui:insert>
@@ -38,11 +40,13 @@
<h:inputTextarea value="#{javaBlogView.content}"/>
</h:panelGrid>
<hr/>
- <h:commandButton styleClass="btn" action="#{javaBlogView.addEntry}" value="Add Blog Entry"/>
+ <h:commandButton styleClass="btn" action="#{javaBlogView.addEntry}" value="Add Blog Entry">
+ <f:ajax execute="@this" render="content"/>
+ </h:commandButton>
</h:panelGrid>
</div>
- <h:panelGrid columns="1" styleClass="right">
+ <h:panelGrid id="content" columns="1" styleClass="right">
<ui:repeat value="#{javaBlogService.blogEntries}" var="item">
<h:panelGrid columns="1" styleClass="messageBox">
<h:panelGroup styleClass="topic">