You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by 黄 海冬 <li...@hotmail.com> on 2004/02/16 10:03:31 UTC
re:Combining database actions and Woody
See woody binding examples,if you want to save the data using modular
database action ,I think there's no easy way.
That's what I do for saving dom data by actions.
in flow js:cocoon.sendPage(formname+"-add",{"data":document});
you can write an inputmodule to read data from the data object,then you
can use database action.
the module can read data from context like that:
Object obj = FlowHelper.getContextObject(objectModel);
JXPathContextFactory jxpathContextFactory =
JXPathContextFactory.newInstance();
JXPathContext jxpathContext;
jxpathContext = jxpathContextFactory.newContext(null, obj);
String nameAdjust = name.substring(name.lastIndexOf(".") +
1,name.length());
return jxpathContext.getValue(path+nameAdjust);
roy huang
_________________________________________________________________
与联机的朋友进行交流,请使用 MSN Messenger: http://messenger.msn.com/cn
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org