[JBoss Seam] - No action called
by vikramchhetryy
Hi all,
I want to view details of a user by clicking on a link. But when I click the link nothing happens. I went accross the seam-booking example but couldnt figure out the problem.
My Code
XHTML
| <h:column>
| <f:facet name="header">Action</f:facet>
| <s:link id="editCallCenterAgent" value="Edit" action="callCenterAgentEdit.editSelectedCallCenterAgentDetails(details)" />
| </h:column>
|
Stateful bean:
public class CallCenterAgentEditAction implements CallCenterAgentEdit {
|
| @Logger
| private Log log;
|
| @In
| FacesMessages facesMessages;
|
| /*@In(required=false) @Out
| private Account account;*/
|
| @Begin
| public void editSelectedCallCenterAgentDetails(Account acc) {
| log.info("Inside editSelectedCallCenterAgentDetails method "
| + acc.getPerson().getStrFirstName());
| getSelectedCallCenterAgentDetails(acc.getStrUserName());
| log.info("Exiting editSelectedCallCenterAgentDetails method");
| }
|
| public void getSelectedCallCenterAgentDetails(String userName) {
| log.info("Inside getSelectedCallCenterAgentDetails method " + userName);
|
| log.info("Exiting getSelectedCallCenterAgentDetails method");
| }
|
| @End
| public void updateCallCenterAgentDetails() {
| log.info("Inside updateCallCenterAgentDetails method");
|
| log.info("Exiting updateCallCenterAgentDetails method");
| }
|
| @Remove
| public void destroy() {
| }
|
| @End
| public void cancel() {
| }
|
| }
|
Call any one tell me whats going wrong? Do I need to do something more to get it working?
Any help would be appreciated.
-VIkram
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4118568#4118568
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4118568
18 years, 3 months
[JBoss Seam] - Re: Design question with Rich GWT Ajax Client
by sdegardin
I have a working solution ....
in my ContextualHttpRequest, I call the same code as in SeamPhaseListener for JSF.
before proceeding the request :
anonymous wrote :
| void begin()
| {
| try
| {
| if ( !Transaction.instance().isActiveOrMarkedRollback() )
| {
| //log.debug("beginning transaction prior to phase: " + phaseId);
| Transaction.instance().begin();
| }
| }
| catch (Exception e)
| {
| throw new IllegalStateException("Could not start transaction", e);
| }
| }
|
at the end :
anonymous wrote :
| void commitOrRollback()
| {
| try
| {
| if ( Transaction.instance().isActive() )
| {
| //log.debug("committing transaction after phase: " + phaseId);
| Transaction.instance().commit();
| }
| else if ( Transaction.instance().isRolledBackOrMarkedRollback() )
| {
| //log.debug("rolling back transaction after phase: " + phaseId);
| Transaction.instance().rollback();
| }
| }
| catch (Exception e)
| {
| throw new IllegalStateException("Could not commit transaction", e);
| }
| }
|
|
I'm sure there are issue with this solution but it works for the begining ...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4118567#4118567
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4118567
18 years, 3 months
[EJB 3.0] - DataSource resource injection
by francis1970
Hi all!
sorry for bothering again about injection.
I'm unable to inject a Datasource resource into my EJB.
n my EJB I use:
@Resource(mappedName="java:jdbc/MyDS")
| protected DataSource dataSource;
in my .ds file I use the following
<jndi-name>jdbc/MyDS</jndi-name>
When I try to use the Datasource I get
java.lang.RuntimeException: Unable to inject jndi dependency: env/oracle.ejb30.HelloTestBean/dataSource into property oracle.ejb30.HelloTestBean.dataSource: jdbc not bound
Should I insert a resource-ref also in jboss.xml ? or in ejb-jar.xml too ??
I really hope I don't need to use ejb-jar.xml anymore since I'm fed up with it..........
Thanks for your feedback.......
By the way I'm using JBoss 4.2.x
Thanks
Francesco
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4118566#4118566
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4118566
18 years, 3 months