Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

svn commit: r278742 - in /lenya/trunk/src: java/org/apache/lenya/cms/usecas: msg#00006

cms.lenya.cvs

Subject: svn commit: r278742 - in /lenya/trunk/src: java/org/apache/lenya/cms/usecase/UsecaseView.java webapp/lenya/usecases/usecases.js

Author: thorsten
Date: Mon Sep 5 07:14:04 2005
New Revision: 278742

URL: http://svn.apache.org/viewcvs?rev=278742&view=rev
Log:
Simplified the cform definitions for the usecase-fw

Modified:
lenya/trunk/src/java/org/apache/lenya/cms/usecase/UsecaseView.java
lenya/trunk/src/webapp/lenya/usecases/usecases.js

Modified: lenya/trunk/src/java/org/apache/lenya/cms/usecase/UsecaseView.java
URL:
http://svn.apache.org/viewcvs/lenya/trunk/src/java/org/apache/lenya/cms/usecase/UsecaseView.java?rev=278742&r1=278741&r2=278742&view=diff
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/cms/usecase/UsecaseView.java
(original)
+++ lenya/trunk/src/java/org/apache/lenya/cms/usecase/UsecaseView.java Mon Sep
5 07:14:04 2005
@@ -46,9 +46,8 @@

protected static final String ELEMENT_CFORM_DEFINITION = "definition";
protected static final String ELEMENT_CFORM_BINDING = "binding";
- protected static final String ELEMENT_AFTER = "after";
- protected static final String ELEMENT_BEFORE = "before";
protected static final String ELEMENT_CFORM_OUTRO = "outro";
+ protected static final String ELEMENT_CFORM_INTRO = "intro";

protected static final String ATTRIBUTE_URI = "uri";
protected static final String ATTRIBUTE_GROUP = "group";
@@ -89,17 +88,19 @@
this.viewType = config.getAttribute(ATTRIBUTE_TYPE, null);

if (this.viewType!=null && this.viewType.equals(VIEW_CFORM)){
+ Configuration cformIntroConfig =
config.getChild(ELEMENT_CFORM_INTRO, false);
+ if (cformIntroConfig!=null){
+ this.cformIntro = cformIntroConfig.getValue(null);
+ }
Configuration cformDefinitionConfig =
config.getChild(ELEMENT_CFORM_DEFINITION, false);
if (cformDefinitionConfig!=null){
this.cformDefinition =
cformDefinitionConfig.getAttribute(ATTRIBUTE_TEMPLATE_URI, null);
- this.cformDefinitionBefore =
cformDefinitionConfig.getChild(ELEMENT_BEFORE,false).getValue(null);
- this.cformDefinitionAfter =
cformDefinitionConfig.getChild(ELEMENT_AFTER,false).getValue(null);
+ this.cformDefinitionBody =
cformDefinitionConfig.getValue(null);
}
Configuration cformBindingConfig =
config.getChild(ELEMENT_CFORM_BINDING, false);
if (cformBindingConfig!=null){
this.cformBinding =
cformBindingConfig.getAttribute(ATTRIBUTE_TEMPLATE_URI, null);
- this.cformBindingBefore =
cformBindingConfig.getChild(ELEMENT_BEFORE,false).getValue(null);
- this.cformBindingAfter =
cformBindingConfig.getChild(ELEMENT_AFTER,false).getValue(null);
+ this.cformBindingBody = cformBindingConfig.getValue(null);
}
Configuration cformOutroConfig =
config.getChild(ELEMENT_CFORM_OUTRO, false);
if (cformOutroConfig!=null){
@@ -205,73 +206,16 @@
this.cformDefinition = cformDefinition;
}

- private String cformDefinitionBefore =null;
-
- private String cformDefinitionAfter =null;

private String cformBinding =null;

- private String cformBindingBefore =null;
+ private String cformOutro=null;

- private String cformBindingAfter =null;
+ private String cformIntro=null;

- private String cformOutro=null;
-
- /**
- * @return Returns the cformBindingAfter.
- */
- public String getCformBindingAfter() {
- return cformBindingAfter;
- }
-
- /**
- * @param cformBindingAfter The cformBindingAfter to set.
- */
- public void setCformBindingAfter(String cformBindingAfter) {
- this.cformBindingAfter = cformBindingAfter;
- }
-
- /**
- * @return Returns the cformBindingBefore.
- */
- public String getCformBindingBefore() {
- return cformBindingBefore;
- }
-
- /**
- * @param cformBindingBefore The cformBindingBefore to set.
- */
- public void setCformBindingBefore(String cformBindingBefore) {
- this.cformBindingBefore = cformBindingBefore;
- }
-
- /**
- * @return Returns the cformDefinitionAfter.
- */
- public String getCformDefinitionAfter() {
- return cformDefinitionAfter;
- }
-
- /**
- * @param cformDefinitionAfter The cformDefinitionAfter to set.
- */
- public void setCformDefinitionAfter(String cformDefinitionAfter) {
- this.cformDefinitionAfter = cformDefinitionAfter;
- }
-
- /**
- * @return Returns the cformDefinitionBefore.
- */
- public String getCformDefinitionBefore() {
- return cformDefinitionBefore;
- }
-
- /**
- * @param cformDefinitionBefore The cformDefinitionBefore to set.
- */
- public void setCformDefinitionBefore(String cformDefinitionBefore) {
- this.cformDefinitionBefore = cformDefinitionBefore;
- }
+ private String cformDefinitionBody=null;
+
+ private String cformBindingBody=null;

/**
* @return Returns the cformBinding.
@@ -315,6 +259,48 @@
*/
public void setCformOutro(String cformOutro) {
this.cformOutro = cformOutro;
+ }
+
+ /**
+ * @return Returns the cformIntro.
+ */
+ public String getCformIntro() {
+ return cformIntro;
+ }
+
+ /**
+ * @param cformIntro The cformIntro to set.
+ */
+ public void setCformIntro(String cformIntro) {
+ this.cformIntro = cformIntro;
+ }
+
+ /**
+ * @return Returns the cformBindingBody.
+ */
+ public String getCformBindingBody() {
+ return cformBindingBody;
+ }
+
+ /**
+ * @param cformBindingBody The cformBindingBody to set.
+ */
+ public void setCformBindingBody(String cformBindingBody) {
+ this.cformBindingBody = cformBindingBody;
+ }
+
+ /**
+ * @return Returns the cformDefinitionBody.
+ */
+ public String getCformDefinitionBody() {
+ return cformDefinitionBody;
+ }
+
+ /**
+ * @param cformDefinitionBody The cformDefinitionBody to set.
+ */
+ public void setCformDefinitionBody(String cformDefinitionBody) {
+ this.cformDefinitionBody = cformDefinitionBody;
}

}

Modified: lenya/trunk/src/webapp/lenya/usecases/usecases.js
URL:
http://svn.apache.org/viewcvs/lenya/trunk/src/webapp/lenya/usecases/usecases.js?rev=278742&r1=278741&r2=278742&view=diff
==============================================================================
--- lenya/trunk/src/webapp/lenya/usecases/usecases.js (original)
+++ lenya/trunk/src/webapp/lenya/usecases/usecases.js Mon Sep 5 07:14:04 2005
@@ -137,8 +137,8 @@
cocoon.log.debug("usecases.js::executeUsecase()::cforms
in usecase " + usecaseName + ", preparing formDefinition, calling Cocoon with
viewUri = [" + viewDef + "]");

// custom flowscript
- if (view.getCformDefinitionBefore()!=null){
- scriptString= view.getCformDefinitionBefore();
+ if (view.getCformIntro()!=null){
+ scriptString= view.getCformIntro();
evalFunc = new Function (scriptString);
evalFunc();
}
@@ -147,8 +147,8 @@
form = new Form(viewDef);

// custom flowscript
- if (view.getCformDefinitionAfter()!=null){
- scriptString= view.getCformDefinitionAfter();
+ if (view.getCformDefinitionBody()!=null){
+ scriptString= view.getCformDefinitionBody();
evalFunc = new Function
("form","generic",scriptString);
evalFunc(form,generic);
}
@@ -158,20 +158,13 @@
var viewBind = "fallback://lenya/"+
view.getCformBinding();
if (cocoon.log.isDebugEnabled())

cocoon.log.debug("usecases.js::executeUsecase()::cforms in usecase " +
usecaseName + ", preparing formDefinition, calling Cocoon with viewUri = [" +
viewBind + "]");
-
- // custom flowscript
- if (view.getCformBindingBefore()!=null){
- scriptString= view.getCformBindingBefore();
- evalFunc = new Function
("form","generic",scriptString);
- evalFunc(form,generic);
- }

// form binding
form.createBinding(viewBind);

// custom flowscript
- if (view.getCformBindingAfter()!=null){
- scriptString= view.getCformBindingAfter();
+ if (view.getCformBindingBody()!=null){
+ scriptString= view.getCformBindingBody();
evalFunc = new Function
("form","generic",scriptString);
evalFunc(form,generic);
}


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
hardware.arm.at...    cms.citadel.dev...    video.gstreamer...    java.facelets.u...    misc.basics.qna...    web.wiki.instik...    network.uip.use...    xdg.devel/2003-...    tex.bibtex.bibd...    finance.quotesp...    ietf.zeroconf/2...    redhat.blinux.g...    suse.db2/2003-0...    php.phpesp/2004...    uml.devel/2003-...    gnome.labyrinth...    qnx.openqnx.dev...    boot-loaders.gr...    db.dataperfect....    audio.audacity....    linux.uclinux.m...    editors.j.devel...    os.openbsd.tech...    kde.users.multi...   
Home | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation