cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 黄 海冬 <lingererhu...@hotmail.com>
Subject re:Combining database actions and Woody
Date Mon, 16 Feb 2004 09:03:31 GMT
  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


Mime
View raw message