[jboss-user] [JBoss Seam] - PortletSession Question

2006-10-11 Thread recycle_bin
i am using SEAM to implement a Portlet application, i have a question that how 
can i get/inject PortletSession in the SessionBean?


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3977444#3977444

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3977444
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Portal] - Can JBoss Portal run on other AS?

2006-08-10 Thread recycle_bin
Can JBoss Portal run on other AS like WEBLOGIC or WEBSPHERE? If yes, where can 
i found related resources?

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3964283#3964283

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3964283
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: DataModelSelection Problem

2006-08-05 Thread recycle_bin
Thanks. Below is my source code:

SysConfig2Bean:

  | package com.abc.test.session;
  | 
  | import static javax.ejb.TransactionAttributeType.NOT_SUPPORTED;
  | 
  | import javax.ejb.Remove;
  | import javax.ejb.Stateful;
  | import javax.ejb.TransactionAttribute;
  | import javax.interceptor.Interceptors;
  | import javax.persistence.EntityManager;
  | import javax.persistence.PersistenceContext;
  | 
  | import org.jboss.seam.ScopeType;
  | import org.jboss.seam.annotations.Destroy;
  | import org.jboss.seam.annotations.Name;
  | import org.jboss.seam.annotations.Scope;
  | import org.jboss.seam.ejb.SeamInterceptor;
  | 
  | import com.abc.core.entity.SysConfig;
  | 
  | @Stateful
  | @Name("com.abc.test.session.sysConfig2Bean")
  | @Interceptors(SeamInterceptor.class)
  | public class SysConfig2Bean implements SysConfig2Local {
  | @PersistenceContext
  | EntityManager em;
  | 
  | private SysConfig instance;
  | private boolean isNew=true;
  | 
  | @TransactionAttribute(NOT_SUPPORTED)
  | public SysConfig getInstance() {
  | return instance;
  | }
  | 
  | public void setInstance(SysConfig instance) {
  | this.instance = instance;
  | }
  | 
  | @TransactionAttribute(NOT_SUPPORTED)
  | public boolean isNew() {
  | return isNew;
  | }
  | 
  | public void setNew(boolean isNew) {
  | this.isNew = isNew;
  | }
  | 
  | @Remove
  | @Destroy
  | public void remove(){
  | 
  | }
  | }
  | 

SysConfig2FinderBean

  | package com.abc.test.session;
  | 
  | import java.util.List;
  | 
  | import javax.ejb.Remove;
  | import javax.ejb.Stateful;
  | import javax.interceptor.Interceptors;
  | import javax.persistence.EntityManager;
  | import javax.persistence.PersistenceContext;
  | 
  | import org.jboss.seam.ScopeType;
  | import org.jboss.seam.annotations.Destroy;
  | import org.jboss.seam.annotations.In;
  | import org.jboss.seam.annotations.Name;
  | import org.jboss.seam.annotations.Scope;
  | import org.jboss.seam.annotations.datamodel.DataModel;
  | import org.jboss.seam.annotations.datamodel.DataModelSelection;
  | import org.jboss.seam.ejb.SeamInterceptor;
  | 
  | import com.abc.core.entity.SysConfig;
  | 
  | @Stateful
  | @Name("com.abc.test.session.sysConfig2FinderBean")
  | @Scope(ScopeType.SESSION)
  | @Interceptors(SeamInterceptor.class)
  | public class SysConfig2FinderBean implements SysConfig2FinderLocal {
  | @PersistenceContext
  | private EntityManager em;
  | 
  | @DataModel
  | private List entityList;
  | 
  | @DataModelSelection
  | private SysConfig selectedEntity;
  | 
  | public SysConfig getSelectedEntity(){
  | return em.merge(selectedEntity);
  | }
  | 
  | public List getEntityList() {
  | entityList = query();
  | return entityList;
  | }
  | 
  | public void setEntityList(List entityList) {
  | this.entityList = entityList;
  | }
  | 
  | private List query(){
  | return em.createQuery("from SysConfig").getResultList();
  | }
  | 
  | @Destroy
  | @Remove
  | public void remove(){
  | 
  | }
  | }
  | 
  | 


SysConfig2SelectorBean



  | package com.abc.test.session;
  | 
  | import javax.ejb.Stateless;
  | import javax.interceptor.Interceptors;
  | 
  | import org.jboss.seam.annotations.Begin;
  | import org.jboss.seam.annotations.In;
  | import org.jboss.seam.annotations.Name;
  | import org.jboss.seam.ejb.SeamInterceptor;
  | 
  | @Stateless
  | @Name("com.abc.test.session.sysConfig2SelectorBean")
  | @Interceptors(SeamInterceptor.class)
  | public class SysConfig2SelectorBean implements SysConfig2SelectorLocal {
  | @In(create = true, value="com.abc.test.session.sysConfig2Bean")
  | private transient SysConfig2Local sysConfig2Bean;
  | 
  | @In(create = true, value="com.abc.test.session.sysConfig2FinderBean")
  | private transient SysConfig2FinderLocal sysConfig2Finder;
  | 
  | @Begin
  | public String select() {
  | 
sysConfig2Bean.setInstance(sysConfig2Finder.getSelectedEntity());
  | sysConfig2Bean.setNew(false);
  | return "sysConfigEdit";
  | }
  | }
  | 
  | 

sysConfigList.jsf


  | <%@ page contentType="text/html; charset=UTF-8" %>
  | <%@ page pageEncoding="UTF-8" %>
  | <%@ taglib uri="http://java.sun.com/jsf/html"; prefix="h" %>
  | <%@ taglib uri="http://java.sun.com/jsf/core"; prefix="f" %>
  | http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
  | http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
  | 
  | Testing
  | 
  |  
  | 
  | 
  | 
  | @import "/jsp/css/default.css";
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  |  

[jboss-user] [JBoss Seam] - Re: DataModelSelection Problem

2006-08-04 Thread recycle_bin
it is typo error but it also doesn't work even correcting it. any other thing i 
missed?

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3963124#3963124

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3963124
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - DataModelSelection Problem

2006-08-03 Thread recycle_bin
I am using SFSB and @DataModel to display a list of record. But when i press 
"edit" button to select a record to edit with @DataModelSelection. It always 
select first record in the list, not selected one. Does anyone know why?


  | @DataModel
  | private List entityList;
  | 
  | @DataModelSelection
  | private Record selectedEntity;
  | 

In the JSP's DataTable


  | 
  | 

  | 

  | 
  | 
  | 

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3963091#3963091

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3963091
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Get ServletContext in Session Bean

2006-07-27 Thread recycle_bin
Thank Cptnkirk. it works now when i call session bean through JSF. i made a 
mistake that i call such session bean in a servlet.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3961470#3961470

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3961470
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Get ServletContext in Session Bean

2006-07-27 Thread recycle_bin
I would preload system data to ServletContext for later use during system up. 
Then i will get those data in the Session Bean (both stateful and stateless). 

I use following code to retrieve 
Context context = Contexts.getApplicationContext();

But, context is NULL. Is there anything that i need to take care when i use 
getApplicationContext()? or are there other ways to achieve same goal? 


Thanks.


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3961463#3961463

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3961463
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user