[JBoss Seam] - Re: A Seam example with RichFaces?
by stu2
"manuel.gentile(a)itd.cnr.it" wrote : Hello,
| I think it is useful to have an example of using Seam with richfaces. In particular with drag and drop features.
| I have some problem with this and the RichFaces people didn't give me a solution. The richfaces example works... but i use
| Seam+Facelet+Richfaces from CVS and I'm not able to use the drag and drop features.....
|
| Thanks
I'm using DnD for a "map your columns to our columns" type scenario with the latest Seam + Facelets + Richfaces. Up until yesterday when the Richfaces snapshot seemed to break with JSF 1.2 (http://jboss.com/index.html?module=bb&op=viewtopic&t=104731) it worked extremely well. Here's a summary:
| <rich:dragIndicator id="indicator" />
| <s:link action="#{feedMapping.hideEmptyFeedColumns}" value="Hide Empty Columns" rendered="#{empty feedMapping.hiddenEmptyFeedMappingColumns}"/>
| <s:link action="#{feedMapping.showEmptyFeedColumns}" value="Show Empty Columns (#{feedMapping.hiddenEmptyFeedMappingColumnCount} hidden)" rendered="#{! empty feedMapping.hiddenEmptyFeedMappingColumns}"/>
| <h:form id="mapping">
| <div style="float: left; width: 60%;">
| <rich:panel id="feedColumns">
| <f:facet name="header">Your Columns</f:facet>
| <rich:dataTable value="#{unmappedColumns}" var="fm"
| styleClass="datatable" rowClasses="rowOdd,rowEven" style="width: 100%;">
| <h:column>
| <f:facet name="header">Your Column</f:facet>
| #{fm.rawColumn.columnNumber}
| </h:column>
| <h:column>
| <f:facet name="header">Example Data(Drag me!)</f:facet>
| <a:outputPanel style="border:1px solid grey;padding:2px;"
| layout="block">
| <rich:dragSupport dragIndicator=":indicator" dragType="column"
| dragValue="#{fm.rawColumn.columnNumber}">
| <rich:dndParam name="label" value="#{fm.rawColumn.header}" />
| </rich:dragSupport>
| <span style="float: right"><strong>#{fm.rawColumn.header}</strong></span> <em>#{fm.rawColumn.oneExample}</em>
| </a:outputPanel>
| </h:column>
| </rich:dataTable>
| </rich:panel>
| </div>
| <div>
| <rich:panel id="cdmFields">
| <f:facet name="header">
| <h:outputText value="CDM Fields" />
| </f:facet>
|
| <rich:dataGrid value="#{remainingCdmFields}"
| var="fm" columns="2">
| <h:column>
| <a:outputPanel style="border:1px solid #{fm.required ? 'red' : 'grey'};padding:2px;" layout="block">
| <rich:dropSupport acceptedTypes="column" dropValue="#{fm.cdmField}"
| dropListener="#{feedMapping.mapColumn}" reRender="cdmFields,messages,mappedColumns,feedColumns">
| </rich:dropSupport>
| #{fm.cdmField.name}
| </a:outputPanel>
| </h:column>
| </rich:dataGrid>
| </rich:panel>
| </div>
|
In the SFSB the DnD event is received like this:
| public void mapColumn(DropEvent dropEvent) {
| Dropzone dropzone = (Dropzone) dropEvent.getComponent();
| this.mapColumn(Integer.parseInt(dropEvent.getDragValue().toString()), dropzone.getDropValue().toString());
| }
|
|
Hope that helps. You'll find quite a few Richfaces examples in the seam example apps - especially the wiki. Though they don't cover DnD.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4030771#4030771
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4030771
19Â years, 1Â month
[EJB 3.0] - Embedded EJB3 and AOP -- can I get loadtime weaving?
by hindog
Hi, I am trying to apply my AOP aspects to an embedded EJB3 test -- when I do that, I get the following error:
Exception in thread "main" java.lang.ExceptionInInitializerError
at com.edicorp.EJB3Test.main(EJB3Test.java:28)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
Caused by: java.lang.RuntimeException: org.jboss.xb.binding.JBossXBException: Failed to parse source: file:/home/hindog/IdeaProjects/maven/edicorp/erp/ejb/target/classes/META-INF/jboss-aop.xml@2,70
at org.jboss.ejb3.embedded.EJB3StandaloneBootstrap.deployXmlResource(EJB3StandaloneBootstrap.java:103)
at com.edicorp.EJB3Deployer.(EJB3Deployer.java:32)
... 6 more
Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: file:/home/hindog/IdeaProjects/maven/edicorp/erp/ejb/target/classes/META-INF/jboss-aop.xml@2,70
at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:142)
at org.jboss.xb.binding.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:133)
at org.jboss.kernel.plugins.deployment.xml.BeanXMLDeployer.deploy(BeanXMLDeployer.java:85)
at org.jboss.ejb3.embedded.EJB3StandaloneBootstrap.deployXmlResource(EJB3StandaloneBootstrap.java:97)
... 7 more
Caused by: org.jboss.xb.binding.JBossXBRuntimeException: No cursor for aspect
at org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.startElement(SundayContentHandler.java:280)
at org.jboss.xb.binding.parser.sax.SaxJBossXBParser$DelegatingContentHandler.startElement(SaxJBossXBParser.java:301)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:138)
With a very basic AOP configuration:
If I load the AOP aspects from the run command, I get IllegalAccessErrors in my beans as it seems the EJBStandaloneDeployer deploys into a separate classloader. So I am trying to do EJB3StandaloneDeployer.deployXmlResource( "my-aop.xml" ) to have the AOP deployed in the same classloader as the beans are managed from.
I'm not sure if I am doing any of this the right way, is there a method for getting AOP to work in Embedded, or is it not supported (loadtime weaving)?
Thanks,
Aaron
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4030760#4030760
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4030760
19Â years, 1Â month