[jboss-user] [JBoss Seam] - Re: Progress
Congratulations! Thank you so much and have a great weekend! View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3958216#3958216 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3958216 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Progress
The support for @Factory methods that return values causes problems for me and my DataBinders. I have the following: | @SelectItems | private List items; | | @Factory("items") | public List getItems() | { |... static lookup code | } | Prior to the enhancement this was great. When my EJB clients were accessing the bean they could get the items via the getItems method. When JSF needed the items, Seam resolved the variable, called the factory method that set the instance variable and sent everything through my DataBinder. With the latest CVS it seems the DataBinder is called but the List that's eventually exposed to JSF is the one from the @Factory method, which JSF can't process. I guess I'd either ask that Seam check for and apply data binders for things created via a @Factory return. Or supply some way to disable the new @Factory logic. Thanks, Jim View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3958311#3958311 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3958311 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Progress
I just made a change in CVS. Please try it out and see if that solves your problem. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3958559#3958559 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3958559 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Progress
Nope. The context object is still the Factory return instead of being the data binder wrapped object. The data binder is still called though. I wonder if there's some sort of outjection race condition or ordering problem. Both the Factory and DataBinder implicitly outject the same component. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3958572#3958572 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3958572 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Progress
I don't believe you have the latest changes: private static Object handleFactoryMethodResult(String name, Component component, Object result, ScopeType scope) |{ | Object value = Contexts.lookupInStatefulContexts(name); //see if a value was outjected by the factory method | if (value==null) //usually a factory method returning a value | { | if (scope==ScopeType.UNSPECIFIED) | { | if (component==null) | { |throw new IllegalArgumentException("no scope specified for factory method defined in components.xml: " + name); | } | else //an @Factory method defaults to the same scope as the component | { |scope = component.getScope(); | } | } | scope.getContext().set(name, result); | } | else //usually a factory method with a void return type | { | if (scope!=ScopeType.UNSPECIFIED) | { | throw new IllegalArgumentException("factory method with defined scope outjected a value: " + name); | } | } | return result; |} Use your debugger to step through this code if you really have it. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3958576#3958576 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3958576 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Progress
Also Gavin please don't forget the annoying little Log4JLogger issue: http://www.jboss.com/index.html?module=bb&op=viewtopic&t=86058 Probably you already fixed it in CVS, but I just got things working with 1.0.1GA, so I'm going to avoid destabilizing my local build with latest CVS for a couple weeks :-) Cheers! Rob View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3958577#3958577 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3958577 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Progress
Yes, I appear to have the latest. It looks like you return result, no matter what value is. According to the debugger value is the object I'm looking for. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3958597#3958597 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3958597 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Progress
Ooops. Yes, I screwed up. Should now be fixed. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3958602#3958602 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3958602 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Progress
All better now. Thanks. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3958628#3958628 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3958628 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Progress
"[EMAIL PROTECTED]" wrote : | * deprecation of @Conversational(ifNotBeginOutcome) in favor of no-conversation-view-id I just started to use 1.1 in cvs and I am wondering about the reason for deprecating @Conversational. I don't use pages.xml very much and would prefer to have this functionality on my SFSB rather than in a seperate file. I am all for choices; however, I am just curious about the reason for deprecating a choice. I could be missing the bigger picture with respect to pages.xml; It seems like one more place to remember to look in for how a given component works by being forced to use pages.xml. Thanks, Chris View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3961348#3961348 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3961348 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Progress
Basically it just didn't work very well ;-) The trouble with @Conversational is that lots of methods of the component can get called before an action method. There may not even be an action method. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3961364#3961364 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3961364 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Progress
"[EMAIL PROTECTED]" wrote : Basically it just didn't work very well ;-) | | The trouble with @Conversational is that lots of methods of the component can get called before an action method. There may not even be an action method. I think I discovered that one my own. It seems like I have some cases where I think it should work but doesn't... Guess I'm back to the design mode. I'm trying to put in a framework that handles exceptions - basically all exceptions should redirect to an error page that displays FacesMessages if present. The specific case I'm working on is: a) user submits a page that throws a BusinessExcpetion b) BusinessException is annotated with @Redirect c) error page is displayed correclty d) user in a different window corrects the error e) user than returns to the original window (still displaying the error message) and hits the back button f) the same page is resubmitted - an ugle error is generated basically saying that a conversation is already started and to use (Begin join=true) - however, the conversation was rolledback and I believe destroyed in #b/c I've read some of the other threads/JIRA about using Servlets / modifying JSF, so I'll think about it some more. Anyway, just curious how other handle generic exceptions rather than showing the ugly app server error messages or generic http messages. Chris View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3961395#3961395 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3961395 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Progress
An exception shouldn't implicitly kill the conversation. In fact you've proven that it doesn't. You might roll back a transaction on an exception, but conversations aren't the same as transactions and should survive your given use case (although if you wanted to, it wouldn't be hard to end a conversation when you navigate to your error page). View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3961437#3961437 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3961437 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Progress
Your right. I went back and traced through the logs again and I thought it was being destroyed since I saw some context.destroy messages in the log. I mis-read them as being in the stateful context.Thanks for putting me on the right path. I'm really used to stateless frameworks and wrapping my head around a conversation's interactions and subtlies is a bit more than I initial thought it was going to be. Thanks for the patience. Chris View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3961448#3961448 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3961448 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Progress
Good morning Gavin, I haven't seen the ajax4jsf topics in the Seam forum for a little while. Do you have a plan to integrate ajax4jsf into Seam in near future? It seems that ajax4jsf is greatly improving JSF functionalities, and also ajax4jsf adds some new excellent functions into JSF (e.g. mediaOutput in rc4). It will be the greatest for Seam + ajax4jsf. Thank you very much. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3961559#3961559 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3961559 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Progress
We are still figuring out our strategy here. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3961663#3961663 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3961663 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Progress
Gavin do you have any news about ajax and in particular ajax4jsf??? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3961921#3961921 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3961921 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Progress
No news, I have actually been working on other stuff. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3961941#3961941 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3961941 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Progress
Ok Gavin another question? I try many times to generate seam skeleton application from annotated bean! I can't be able to make it works Can you help me ? Eclipse IDE doens't allows annotaion configuration?? :-) Thanks in advance View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3961953#3961953 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3961953 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Progress
it does support code generation from annotation configuration it is just not guaranteed that the seam templates can handle all the combos you can create with annotated classes. if you have any specific issues with I can recommend the tools forum at forum.hibernate.org View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3962078#3962078 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3962078 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Progress
Hi, would you mind including an example treating "SEAM and JAAS" like discussed in http://www.jboss.com/index.html?module=bb&op=viewtopic&t=74300 in version 1.1 ? I think the @LoggedInInterceptor from the current examples gives a little bit of an idea that you have to secure your stuff, but I would never go online with that kind of authentication. TIA Greetings - Michael P.S.: I hope I didn't abuse this thread. ;-) View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3967337#3967337 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3967337 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Progress bar for fileUpload
A temporary solution: Overide multipartFilter to put multipartRequest into session(Put this class anywhere in application source): | @Startup | @Scope(APPLICATION) | @Name("org.jboss.seam.web.multipartFilter") | @Install(precedence = Install.APPLICATION) | @BypassInterceptors | @Filter(within={"org.jboss.seam.web.ajax4jsfFilter", "org.jboss.seam.web.exceptionFilter"}) | public class MonitoredMultipartFilter extends MultipartFilter { | | @Override | public void doFilter(final ServletRequest request, final ServletResponse response, final FilterChain chain) | throws IOException, ServletException { | if (!(response instanceof HttpServletResponse)) { | chain.doFilter(request, response); | return; | } | | final HttpServletRequest httpRequest = (HttpServletRequest) request; | | if (isMultipartRequest(httpRequest)) { | processMultipart(httpRequest, response, chain); | } else chain.doFilter(request, response); | } | | private void processMultipart(HttpServletRequest httpRequest, ServletResponse response, FilterChain chain) | throws IOException, ServletException { | | MultipartRequest multipartRequest = new MultipartRequest(httpRequest, getCreateTempFiles(), getMaxRequestSize()); | HttpSession httpSession = httpRequest.getSession(false); | if (httpSession != null) { | httpSession.setAttribute("MULITIPART_REQUESET", multipartRequest); | } | | chain.doFilter(multipartRequest, response); | | } | | private boolean isMultipartRequest(HttpServletRequest request) { | if (!"post".equals(request.getMethod().toLowerCase())) { | return false; | } | | String contentType = request.getContentType(); | if (contentType == null) { | return false; | } | | if (contentType.toLowerCase().startsWith(MULTIPART)) { | return true; | } | | return false; | } | } | And in the backing seam component: | @In(value="MULITIPART_REQUESET",required=false) private MultipartRequest multipartRequest; | private static final String UPLOAD_COMPONENT_ID_IN_HTML = "uploadForm:upload"; | | @WebRemote | public Integer uploadPercentage() { | int uploadsize = multipartRequest.getFileSize(UPLOAD_COMPONENT_ID_IN_HTML); | int totalsize = multipartRequest.getContentLength(); | if (uploadsize>=0 && totalsize>=0) { | Integer progress = (int)Math.floor(((double)uploadsize / (double) totalsize) * 100.0); | return progress; | } else return null; | } | Now seam remoting can access uploadPercentage() method to get the progress. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4098102#4098102 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4098102 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Progress bar for fileUpload
But I still have question on this solution: 1.I want to put the attribute into conversation instead of session. I tried to use ContextualHttpServletRequest to wrap the processMulitpart() method in the filter to access conversation context. But it's no success. It gives error "java.lang.IllegalStateException: No active event context". Maybe it's becauce seam context is built twice? 2. In the mulitpart request value of getContentLength() method doesn't exactly match the size of a fully uploaded file, even when only one uploaded file exists. This makes difficult to examine if the upload is really finished. Thanks in advance. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4098103#4098103 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4098103 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Progress bar for fileUpload
I was thinking of tracking file upload progress as a session-scoped variable, but this is not the most desirable solution (a user could theoretically upload more than one file at once). Feel free to raise an issue for this in JIRA, that way at least I can keep track of it until I have time to come up with a better idea. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4067404#4067404 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4067404 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Progress bar for fileUpload
This is the jira address: http://jira.jboss.org/jira/browse/JBSEAM-1729 View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4067768#4067768 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4067768 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Progress bar for fileUpload
Thanks shane. Do you mean a user will upload several files in a _single_ multipart request, or upload several files simultaneously in different tabs of browser in the same user session but _separated_ multipart requests? If what you means is the first. I guess it's just not possible to distinguish individually how much each file is uploaded since in http, fields are serialized and it doesn't make sense to distinguish so. Just use session variable to store how much the total bytes the multipart request is, and how much bytes currently the filter has received, that should be perfectly enough, at least for our use case. If what you mean it the second one, I think it's much better to store variables in conversation scoped components, and these variables will not interfere each other because they are isolated by conversion. This is a very interesting feature I admit, and if seam can implement it it would be very nice. Before jira can solve this issue, I'd like to come up to some quick solutions. Now I have two scenarios: 1. Build a servlet myself and use that servlet to process file uploads. 2. Extends SeamFilter The second one should be cleaner, but I don't how difficulte it would be. Both need to put some variables( eventually, total bytes for a request and currently processed bytes for that request) somewhere. And both require to access seam component (of course, I can use session but it's not clean anyway) in servlet or servlet filter. Is there way to access seam component in servlets or filters? Then I can find them using a4j or seam remoting. Cheers, Zaya View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4067765#4067765 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4067765 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user