[JBoss jBPM] - event management
by orochimaru19860000
Hello everybody
Still with jbpm and its headackes :-)
I'm trying to add this time to add event listners to my control. but I m still didnt succeeded. here is a code that I tried.
the bean:
| import javax.faces.event.ValueChangeListener;
| public class test {
|
| private String fname;
| private String lname;
| private String age;
|
|
|
| // fname property
| public String getFname(){ return fname;}
| public void setFname(String NewValue){ fname=NewValue;}
|
| // lname property
| public String getLname(){ return lname;}
| public void setLname(String NewValue){ lname=NewValue;}
| // age property
| public String getAge(){ return age;}
| public void setAge(String NewValue){ age=NewValue;}
| //event listener
| public void method(ActionEvent evt) {
| setAge("twenty");
| }
|
|
|
| public test() {
| setFname("William");
| setLname("Wallas");
| }
|
| }
the jsf file:
<!-- TASKFORM ROWS -->
| <jbpm:datacell>
| <f:facet name="header">
| <h:outputText value="first name"/>
| </f:facet>
| <h:inputText value="#{traitement.fname}" />
| </jbpm:datacell>
| <jbpm:datacell>
| <f:facet name="header">
| <h:outputText value="last name"/>
| </f:facet>
| <h:inputText value="#{traitement.lname}" />
|
|
| <!--here is the button where the listener is-->
|
| <h:commandButton value="button1" action="#{traitement.methode}"></h:commandButton>
| </jbpm:datacell>
| <jbpm:datacell>
| <f:facet name="header">
| <h:outputText value="age"/>
| </f:facet>
| <h:inputText value="#{var['age']}" />
| </jbpm:datacell>
and the faces-config.xml:
<managed-bean>
| <managed-bean-name>traitement</managed-bean-name>
| <managed-bean-class>test</managed-bean-class>
| <managed-bean-scope>session</managed-bean-scope>
| </managed-bean>
When a deploy and try to load the page it makes an exception:
exception
|
| javax.servlet.ServletException: Property 'methode' not found on type test
| javax.faces.webapp.FacesServlet.service(FacesServlet.java:256)
|
|
is there anything wrong in the code? please help.
thank you
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4079916#4079916
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4079916
16Â years, 10Â months
[JBoss Seam] - Re: How to get EntityManager without @In?
by nhieb
Why don't u use EJB3 timers? You can create timer that will do ur "housekeeping" work, and it will survive redeploys and server shutdown. Besides, in this case EM will be accessible automatically.
try something like this
@Stateless
| @Name("jobsTimer")
| public class JobsTimerIMPL implements JobsTimer {
| @Resource
| javax.ejb.TimerService timerService;
|
| @In
| EntityManager entityManager;
|
| @Logger
| private Log log;
|
| public void createTimer() {
| Timer timer = timerService.createTimer(5, 5, "timer that fires every 5 sec and starts 5 sec after it was created");
| }
|
| @Timeout
| public void timeout(Timer timer) {
| //em must be automatically accessable here
| log.info(em);
| }
|
So create timer with createTimer method, and then timeout method wll be called every 5 sec
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4079915#4079915
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4079915
16Â years, 10Â months
[EJB 3.0] - Acegi integration in JBoss
by niityasirï¼ hotmail.com
Dear Sir
I am facing problem in Acegi integration with JBOSS. I have successfully used acegi with servlets using Tomcat 6. In my servlets based application I used following configurations in tomcat.
<filter-name>Acegi Filter Chain Proxy</filter-name>
<filter-class>org.acegisecurity.util.FilterToBeanProxy</filter-class>
<init-param>
<param-name>targetClass</param-name>
<param-value>org.acegisecurity.util.FilterChainProxy</param-value>
</init-param>
<filter-mapping>
<filter-name>Acegi Filter Chain Proxy</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener-class>org.springframework.web.util.Log4jConfigList ener</listener-class>
<listener-class>org.springframework.web.context.ContextLoade rListener</listener-class>
My Jboss application is based on EJB 3.0 and JSF. I want to use same filter based Acegi security in my jboss application. But problem is in configurations. I do not know how/where to make these configurations.
Should I have to make changes in
jboss-4.0.4.GA\server\default\deploy\jbossweb-tomcat55.sar\conf\web.xml ?
But this file already have following some other filters.
<filter-name>CommonHeadersFilter</filter-name>
<filter-class>org.jboss.web.tomcat.filters.ReplyHeaderFilt er</filter-class>
<init-param>
<param-name>X-Powered-By</param-name>
<param-value>Servlet 2.4; JBoss-4.0.4.GA (build: CVSTag=JBoss_4_0_4_GA date=200605151000)/Tomcat-5.5</param-value>
</init-param>
<filter-mapping>
<filter-name>CommonHeadersFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
I donot think that both of these filters will work at same time.
Kindly help me in this regard.
Thanks
Best Regards
Yasir
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4079909#4079909
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4079909
16Â years, 10Â months