[JBoss Seam] - sequence execution not followed in seam reemoting
by surajmundadaï¼ yahoo.com
Hi,
I was facing a lot of problem in implementation of pop-up in my application.
Eveytime I would invoke a pop-up, the javascript part (written in onclick attribute) would get executed before the my listener method (written in action attribute).
After reading Seam Remoting, I tried to call a listener method from javascript function and was able to do so in the first attempt.
Now my code looks like this:
|
| <script type="text/javascript" src="seam/remoting/resource/remote.js">
| </script>
|
| <script type="text/javascript" src="seam/remoting/interface.js?searchListener">
| </script>
|
| <script type="text/javascript">
| function fun_openSearchWindow(){
| alert('in fun_openSearchWindow()');
| Seam.Component.getInstance("searchListener").resetPage(resetPageCallback);
|
| window.open('search.jsf','search','scrollbars,height=400,width=700');
| }
| </script>
|
|
But my problem is that 'window.open' function gets executed first before my 'resetPage' method gets executed completely, defeating the whole purpose of remoting in my case.
Is there any way to keep the sequence of execution ?
Thanks in advance ...
Suraj
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4009613#4009613
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4009613
18Â years, 9Â months
[Beginners Corner] - Sakai 2.3 on JBoss - how to deploy?
by faiio
Hello,
I have tried successfully Sakai 2.3.x on Tomcat 5.5 but I need to
finally deploy it into JBoss and I am a bit lost here. On Tomcat, maven
puts files in the directories
common/lib: JAR files (for Tomcat and applications)
server/lib: JAR files (for Tomcat only)
shared/lib: JAR files (for applications)
webapps: WAR files (applications)
components: component declarations? Empty directories with WEBAPPS subdirectories.
My interpretation of JBoss documentation is that the mapping starts as
TOMCAT JBOSS
webapps -> deploy
server/lib -> server/lib
but then I got little idea about the rest. My thinking is that
shared/lib would go to deploy but then I am doubtful on where to put the
files deployed to common/lib and the components directory.
Any clues? Do I have to do anything else besides placing the files in
diferent places?
Rafael
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4009611#4009611
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4009611
18Â years, 9Â months
[JBoss Seam] - Access to EntityManager in authenticator?
by dustismo
I am trying to add the new security features to my app, and am getting stuck trying to authenticate.
Here is my class (almost exactly the same as the docs)
| @Name("authenticator")
| public class Authenticator {
|
| @In
| private EntityManager entityManager;
|
| @Logger Log log;
| public boolean authenticate(String username, String password, Set<String> roles)
| {
| log.info("Authenticating user " + username);
| log.info("em " + entityManager);
| try
| {
| User user = (User) entityManager.createQuery(
| "from User where name = :username and password = :password")
| .setParameter("username", username)
| .setParameter("password", password)
| .getSingleResult();
| return true;
| }
| catch (NoResultException ex)
| {
| FacesMessages.instance().add("Invalid username/password");
| return false;
| }
| catch (Exception ex)
| {
| log.error("Caught", ex);
| FacesMessages.instance().add("Could not log in.. Please contact admin");
| return false;
| }
| }
| }
|
It throws an exception saying:
org.jboss.seam.RequiredException: In attribute requires value for component: authenticator.entityManager
but if I change
@In
| private EntityManager entityManager;
to
@PersistenceContext
| private EntityManager entityManager;
I get a null pointer exception..
Am I missing something, am I supposed to be outjecting the EntityManager somewhere?
thanks,
Dustin
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4009605#4009605
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4009605
18Â years, 9Â months
[Tomcat, HTTPD, Servlets & JSP] - Sakai 2.3 on JBoss - how to deploy?
by faiio
Hello,
I have tried successfully Sakai 2.3.x on Tomcat 5.5 but I need to
finally deploy it into JBoss and I am a bit lost here. On Tomcat, maven
puts files in the directories
common/lib: JAR files (for Tomcat and applications)
server/lib: JAR files (for Tomcat only)
shared/lib: JAR files (for applications)
webapps: WAR files (applications)
components: component declarations? Empty directories with WEBAPPS subdirectories.
My interpretation of JBoss documentation is that the mapping starts as
TOMCAT JBOSS
webapps -> deploy
server/lib -> server/lib
but then I got little idea about the rest. My thinking is that
shared/lib would go to deploy but then I am doubtful on where to put the
files deployed to common/lib and the components directory.
Any clues? Do I have to do anything else besides placing the files in
diferent places?
Rafael
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4009603#4009603
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4009603
18Â years, 9Â months