[JBoss Seam] - datasource testing
by alex_enache
Hi,
I have a small question. I've configured SEAM to use MySQL. And I want to do some small testing with it.
myapp-ds.xml
<datasources>
| <local-tx-datasource>
| <jndi-name>myTestDataSource</jndi-name>
| <connection-url>jdbc:mysql://localhost:3306/test</connection-url>
| <driver-class>com.mysql.jdbc.Driver</driver-class>
| <user-name>mytestuser</user-name>
| <password>mytestpass</password>
| <metadata>
| <type-mapping>mySQL</type-mapping>
| </metadata>
| </local-tx-datasource>
| </datasources>
persistence.xml
<persistence>
| <persistence-unit name="myTestDB">
| <provider>org.hibernate.ejb.HibernatePersistence</provider>
| <jta-data-source>java:/myTestDataSource</jta-data-source>
| <properties>
| <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>
| <property name="hibernate.hbm2ddl.auto" value="none"/>
| </properties>
| </persistence-unit>
| </persistence>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4079010#4079010
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4079010
18Â years, 7Â months
[JBoss Seam] - Re: SelectOneRadio
by yohann49
I'm so desperate. It works if I use selectManyCheckbox :
| <body>
|
| <ui:composition template="templates/client.xhtml">
|
| <ui:define name="servicesclients">
|
| <h:form>
|
| <h:selectOneRadio value="#{PackageManager.packageLine}" layout="pageDirection">
| <s:selectItems value="#{packages}" var="pack" label="#{pack.packName} : #{pack.descriptionPack}"/>
|
| </h:selectOneRadio>
|
| <h:commandButton value="Next" type="submit"/>
|
| </h:form>
|
| </ui:define>
|
| </ui:composition>
|
| </body>
|
When I click on the button, packageLine contain the selected rows, but I want to use selecetOneRadio, because the client must select one package.
Somebody can help me ?
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4079009#4079009
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4079009
18Â years, 7Â months
[JBoss Portal] - Re: How to deploy 2 portlets in the same WAR
by habicht
i guess you mean the file portlet.xml. here is an example that i use
<?xml version="1.0" encoding="UTF-8"?>
| <portlet-app id="PortletA" version="1.0">
| <portlet id="PortletA">
| <portlet-name>portleta</portlet-name>
| <display-name>portleta</display-name>
| <portlet-class>test.PortletA</portlet-class>
| <expiration-cache>0</expiration-cache>
| <supports>
| <mime-type>text/html</mime-type>
| <portlet-mode>VIEW</portlet-mode>
| </supports>
| <portlet-info>
| <short-title>Portlet A</short-title>
| <keywords>Portlet</keywords>
| </portlet-info>
| </portlet>
| </portlet-app>
so the file for 2 portlets should look something like that
<?xml version="1.0" encoding="UTF-8"?>
| <portlet-app id="Portlets" version="1.0">
| <portlet id="PortletA">
| <portlet-name>portleta</portlet-name>
| <display-name>portleta</display-name>
| <portlet-class>test.PortletA</portlet-class>
| <expiration-cache>0</expiration-cache>
| <supports>
| <mime-type>text/html</mime-type>
| <portlet-mode>VIEW</portlet-mode>
| </supports>
| <portlet-info>
| <short-title>Portlet A</short-title>
| <keywords>Portlet</keywords>
| </portlet-info>
| </portlet>
| <portlet id="PortletB">
| <portlet-name>portletb</portlet-name>
| <display-name>portletb</display-name>
| <portlet-class>test.PortletB</portlet-class>
| <expiration-cache>0</expiration-cache>
| <supports>
| <mime-type>text/html</mime-type>
| <portlet-mode>VIEW</portlet-mode>
| </supports>
| <portlet-info>
| <short-title>Portlet B</short-title>
| <keywords>Portlet</keywords>
| </portlet-info>
| </portlet>
| </portlet-app>
as for the portlet-instances.xml i'm not sure what the file should look like.
hope this can help you
greetings habicht
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4079005#4079005
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4079005
18Â years, 7Â months
[JBoss Seam] - Re: the intercept component don't work!
by chlol
my test intercept:
@Name("interceptsTest")
| @Interceptor
| public class InterceptsTest {
| @Logger
| Log log;
|
|
| @AroundInvoke
| public Object doLogs(InvocationContext inv) throws Exception {
|
| int methodModify = inv.getMethod().getModifiers();
| String methodName = inv.getMethod().getName();
|
| if (methodModify == Modifier.PUBLIC
| && (methodName.startsWith("create")
| || methodName.startsWith("update")
| || methodName.startsWith("persist")
| || methodName.startsWith("remove"))) {
|
| Map data = inv.getContextData();
| Object target = inv.getTarget();
| log.debug("ContextData:" + data);
| log.debug("Target:" + target);
| }
|
| return inv.proceed();
| }
|
| }
my invoke intercept class:
@Name("useIntercept")
| @Interceptors(InterceptsTest.class)
| public class UseIntercept {
|
| public void persist() {
| System.out.println("&&&&&&&&&&&& do persist() &&&&&&&&&&&&");
| }
|
| }
help me,please
thank you
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4079000#4079000
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4079000
18Â years, 7Â months