[jboss-user] [JBoss Seam] - Questions about injection and outjection
1)When a method in a session bean is invoked, will Seam inject all the variables annotated by @IN or just inject the variables used by the being invoked method? 2)When a Session Bean is injected as a facade, is it possible for the mthod in the session facade bean inject or outject varibales? 3)Could an injected variable such as EntitManager em be passed to a POJO method as a parameter? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4054124#4054124 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4054124 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Questions about injection and outjection
1) If the answer to question one is Yes, does it mean that it will inject non-relevant variables as well? Does it affect performance ? 2) For question 2, If I have two session beans A and B. B is used as a session facade. | @Stateless | @Name(a) | public Class A ...{ |@In B b; |public String test1() | { |return b.test2(); | } | } | | @Stateless | @Name(b) | public Class B ...{ | @In String s1; | @Out String s2; | public String test2(String s) | { | s2=s+; | return s+s1; | } |} is the above codes legal ? Could I get the variable named s2 outjected? 3) For question 3, Could you give a simple example to demo that? For example |@Stateless |@Name(actionA) |public class ActionA implents ActionAInf { | @PersistenceContext | private EntityManager em; | | public String methodA() | { |new Bean(em); | } | } How do I use the EL binding in this case? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4054144#4054144 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4054144 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Generate 1000 number using facelet
Hi!, I tried to display 1000 numbers in a page under some condition. It seemed c:if and c:forEach did not work well with my condition, so I tried ui:repeat. The problem is I have to hold the 1000 numbers in a arraylist. Anybody knows better solutions that uses less memory? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4052285#4052285 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4052285 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Ajax and concurrency
Hi! I have a SFSB with like following: | | .. | Doc doc; | | @Begin | public void getDoc() | { | doc=. | } | | public void preView() | { | | | | } | | @End | public String save() | { | if (doc!=null) | update(); | else |new(); | | } | | In my page there are a Preview Button and a Save button, Sometimes after clicking the Preview button, if I click the save button too quick. I'll get the message: Conversation is end or is busy. This is not a problem, the real problem is I got a new duplicated reocord of doc in the DB when I tried to edit the doc. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4037256#4037256 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4037256 ___ jboss-user mailing list [EMAIL PROTECTED] https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Two bytes char again
Hi! In my textarea I inputed a char \\#\x\2\5\B\3;(?) and saved it to the DB. When it is retrieved for DB to the textarea, it becomes ?. This behavior is not what we want. Since we need the process string \\#\x\2\5\B\3; instead of char ?. Another problem is when we processing pages containing east asian characters, we input ?(big) as page parameter and it becomes 大 when it gets redisplayed. Thanks for any suggestions. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4037259#4037259 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4037259 ___ jboss-user mailing list [EMAIL PROTECTED] https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - page parameter of two bytes character of EntityQuery
Hi!, I constructed a search page using EntityQuery. I found the characters of two bytes entered in the form field becomes ? when the result page get redisplayed. Where does the paramters get processed? The the charaters in the submitted url is something like ...ED%FD% Regards View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4031832#4031832 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4031832 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0] - How to assign field value based on auto generated id
I have a field named encryptId which is calcuated based on the id auto generated by mysql. Anybody could give some suggestion on when to set this value in EJB 3.0? any post constructor in EJB 3.0 ? Regards View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4031467#4031467 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4031467 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - is link secure?
Hi! I'd like to know if the links generated by s:link s:button are secure. for example | s:link action=#{AA.method} value=XXX | f:param name=id value=#{object.id} / | /s:link | is it possible for somebody to copy this link to the browser and modify the object id in the current session so that he could see the content of other objects? Thanks View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4030315#4030315 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4030315 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Page Refresh problem
Hi! I have a stateless session bean which outjects a bean to the conversation scope and then redirects to a page which displays the content of the bean. Everything is ok for the display. But when I clicked the refresh button of the browser, this page became blank. Anybody knows a better way to solve this problem? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4028240#4028240 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4028240 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Seam gen wire() problem
Those *Home.java, *List.java *.page.xml , etc. were generated under seam 1.1.7 and are running under 1.2.0. I did not re-run seam to generate the projects, since I did a lot of modifications to the genrated pages. It is obvious that the code generated using 1.2 seam-gen are different from that using 1.1.7. I'd like to know what could cause this exception and any simple solutions to fix that. thanks. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4025885#4025885 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4025885 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Seam gen wire() problem
Hi!, I just migrated from 1.1.7 to 1.2.0, the view pages gnerated by seam generate-entites don't work. when | public void wire() { | if (role != null) { | getInstance().setRole(role; | } | } is executed from the .page.xml the following exception were thrown. Any extra configration needed? Thanks in advance! | 22:38:13,822 ERROR [SeamPhaseListener] uncaught exception | javax.faces.el.EvaluationException: Exception while invoking expression #{User.wire} | at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:153) | at org.jboss.seam.actionparam.ActionParamBindingHelper.invokeTheExpression(ActionParamBindingHelper.java:58) | at org.jboss.seam.actionparam.ActionParamMethodBinding.invoke(ActionParamMethodBinding.java:75) | at org.jboss.seam.core.Expressions$2.invoke(Expressions.java:106) | at org.jboss.seam.pages.Page.enter(Page.java:226) | at org.jboss.seam.core.Pages.enterPage(Pages.java:269) | at org.jboss.seam.jsf.AbstractSeamPhaseListener.enterPage(AbstractSeamPhaseListener.java:242) | at org.jboss.seam.jsf.AbstractSeamPhaseListener.beforeRender(AbstractSeamPhaseListener.java:193) | at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:57) | at org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersBefore(PhaseListenerManager.java:70) | at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:373) | at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138) | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) | at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63) | at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45) | at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49) | at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57) | at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49) | at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79) | at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49) | at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84) | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) | at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) | at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) | at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) | at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175) | at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74) | at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) | at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) | at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156) | at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) | at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) | at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) | at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) | at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) | at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112) | at java.lang.Thread.run(Thread.java:595) | Caused by: javax.persistence.TransactionRequiredException: No active JTA transaction on joinTransaction call | at org.hibernate.ejb.AbstractEntityManagerImpl.joinTransaction(AbstractEntityManagerImpl.java:469) | at org.hibernate.ejb.AbstractEntityManagerImpl.joinTransaction(AbstractEntityManagerImpl.java:442) | at org.jboss.seam.persistence.EntityManagerProxy.joinTransaction(EntityManagerProxy.java:111) | at org.jboss.seam.framework.EntityHome.find(EntityHome.java:69) | at org.jboss.seam.framework.Home.initInstance(Home.java:84) | at org.jboss.seam.framework.Home.getInstance(Home.java:70) | at com.math.model.User.wire(User.java:29) | at
[jboss-user] [JBoss Seam] - Re: Upgrading from 1.1.5 to 1.2
I also got the exception. | | javax.faces.el.EvaluationException: Exception while invoking expression #{authenticator.authenticate} | at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:165) | at org.jboss.seam.actionparam.ActionParamBindingHelper.invokeTheExpression(ActionParamBindingHelper.java:58) | at org.jboss.seam.actionparam.ActionParamMethodBinding.invoke(ActionParamMethodBinding.java:75) | at org.jboss.seam.core.Expressions$2.invoke(Expressions.java:106) | at org.jboss.seam.security.jaas.SeamLoginModule.login(SeamLoginModule.java:104) | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) | at java.lang.reflect.Method.invoke(Method.java:585) | at javax.security.auth.login.LoginContext.invoke(LoginContext.java:769) | at javax.security.auth.login.LoginContext.access$000(LoginContext.java:186) | at javax.security.auth.login.LoginContext$5.run(LoginContext.java:706) | at java.security.AccessController.doPrivileged(Native Method) | at javax.security.auth.login.LoginContext.invokeCreatorPriv(LoginContext.java:703) | at javax.security.auth.login.LoginContext.login(LoginContext.java:575) | at org.jboss.seam.security.Identity.authenticate(Identity.java:249) | at org.jboss.seam.security.Identity.authenticate(Identity.java:242) | at org.jboss.seam.security.Identity.login(Identity.java:172) | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) | at java.lang.reflect.Method.invoke(Method.java:585) | at com.sun.el.parser.AstValue.invoke(AstValue.java:151) | at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283) | at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68) | at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:69) | at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:63) | at javax.faces.component.UICommand.broadcast(UICommand.java:106) | at org.ajax4jsf.framework.ajax.AjaxViewRoot.processEvents(AjaxViewRoot.java:274) | at org.ajax4jsf.framework.ajax.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:250) | at org.ajax4jsf.framework.ajax.AjaxViewRoot.processApplication(AjaxViewRoot.java:405) | at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:343) | at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86) | at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137) | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) | at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63) | at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45) | at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49) | at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57) | at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49) | at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:53) | at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79) | at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49) | at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84) | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) | at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) | at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) | at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) | at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175) | at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74) | at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) | at
[jboss-user] [JBoss Seam] - pass parameters from page to page
Hi! Anybody knows how to pass parameters from one page to another page? for example in pageA.xhtml I have | s:link value= view=/pageB.xhtml | f:param name=para1 value=para1/ | /s:link | in pageB.xhtml I'd like to do the following: | s:link value= view=/pageC.xhtml | f:param name=para1 value=#{para1}/ | /s:link | is that possible without any extra configuration? Since I am trying to use EntityHome and don't wan't to add a lot of codes to the extended EntityHome. I did some testing and found the EL #{para1} is always null. Thanks a lot! View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4018088#4018088 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4018088 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: EntityManager: For newbies or to close gaps in your know
Anybody can help to answer the above question? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3989864#3989864 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3989864 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: EntityManager: For newbies or to close gaps in your know
Hi! bfo81, great! I have one question as following: Suppose I have two tables | user(id, name) | userlog(id,userid,content) | I'd like to create a new user and write the log at the same time. Suppose I use extended persistent manager. I have the following code: | @In @Out user; | | @PersistenceContext(type=EXTENDED) | private EntityManager em; | | public void new_user() | { | | user.setName(user); | Userlog userlog=new Userlog(); | userlog.setContent(register); | userlog.setUser(user); | | - | | } | the question is: 1)Do I need to em.persist to save user and userlog? 2)If it is needed. Which one is first? user or userlog thanks in advance View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3989578#3989578 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3989578 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Seam-gen and recursive tables
anonymous wrote : packages an updated seam-gen which includes a totally revamped database to application reverse engineering tool based on Hibernate Tools I tried a simple recursive table test which has a field parent with a foreign key to this table's id column. test (id, parent, desc) then I ran command same generate-entities. it generated some entity homes and lists objects as well as some xhtml view files. when I used the created xhtml to create a new entity Test. I got ClassNotFound Exception I also tried a none-recursive entiy, it works fine. thanks a lot! View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3986284#3986284 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3986284 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Seam 1.1 beta 1
Security Example: It seems that Authenticator.instance().authenticate(user.getUsername(), user.getPassword()) in LoginAction always return true. It seems jboss-service.xml login-config.xml are not used any more. The sutentication configuration guide still apply to 1.1? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3981496#3981496 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3981496 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - security example problem
Hi!, I followed the instructions from wiki to config the authentication model. but I got the following exception: org.jboss.seam.RequiredException: In attribute requires value for component: authenticatorAction.entityManager. It seems the entityManager attribute could not be created even with (create=true) Anybody know what the reason that might cause this problem? Thanks View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3980254#3980254 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3980254 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user