[S2] Type Conversion Problem in documentation
Hi all, I have a problem with this type-conversion thing. http://struts.apache.org/2.x/docs/type-conversion.html I am trying to dynamically fill a table. I have a bean Person and Person has ListHouse. What I did - step by step. 1 - I defined List House houseList in the PersonAction class. (Also Getter and Setter Methods) 2 - create a file. in the resources directory (the path is the same with the PersonAction) PersonAction-conversion.properties KeyProperty_houseList=id Element_houseList=org.tutorial.model.House CreateIfNull_houseList=true 3 - And in the jsp file I put this as it is said in link above. s:iterator value=houseList id=house s:textfield name=houseList(%{house.id}).name / /s:iterator (House has a String field name) 4 - The values are not shown in the jsp file. So I cannot get them in the action too. But when I change the name of the s:textfield to name it writes the names on the textboxes. But still I cannot get the list when I press on the update button. I expect it to fill the houseList when I go back to Action class. Is it wrong? Can you see what I am doing wrong or something missing? Thanks for reading. -- View this message in context: http://www.nabble.com/-S2--Type-Conversion-Problem-in-documentation-tf3655875.html#a10213635 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2] Autocompleter FATAL exception raised: [object Error]?
Hi! I have the following JSP with AJAX tag and the debug is true: %@ taglib prefix=s uri=/struts-tags % html head titleAJAX/title s:head theme=ajax debug=true/ /head body s:url id=options action=AjaxTest/ s:autocompleter theme=ajax href=%{options} name=option/ /body /html the struts.xml looks like the following: package name=com.dummy.test.ajax extends=json-default action name=AjaxTest class=ajaxTest result type=json/ /action /package and here is my action class: package com.dummy.test.ajax; public class AjaxTest extends ActionSupport { public String execute() throws Exception { return SUCCESS; } public String[][] getOptions() { return new String[][] {{a,b,c}}; } } when entered http://localhost:8080/test/AjaxTest.action, it produced the following: {options:[[a,b,c]]} but when I clicked on the dropdown list, it prints FATAL exception raised: [object Error] May I know how do I start debug from here? Do you have any idea of what could be the problem? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
nested iteration using struts2 iteration tag
hi i have a list that holds other lists and inside of the other lists i have objects but i have a little problem while reaching the lists inside of a list. Here is my tag structure s:iterator status=statMain value=menuList ul id=#statMain.index class=treeview s:iterator value=menuList[#statMain.index] status=stat li ../admin/EditMenu!authorize.action?menuId=s:property value= ../images/edit_icon.gif ../admin/EditMenu!delete.action?menuId=s:property value= ../images/delete.gif s:property value=title/ s:iterator status=stat1 value=childMenus s:if test=#stat1.index==0 ul /s:if li ../admin/EditMenu!authorize.action?menuId=s:property value=../images/edit_icon.gif ../admin/EditMenu!delete.action?menuId=s:property value= ../images/delete.gif /textarea s:property value=title//li s:if test=#stat1.last /ul /s:if /s:iterator /li /s:iterator /ul /s:iterator i can not access to the bold one what should i do for accesing a list inside of a list. Thanks -- View this message in context: http://www.nabble.com/nested-iteration-using-struts2-iteration-tag-tf3656055.html#a10214250 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[s2] web-container authorization problem
Hello all I have simple application (struts2) that works on Tomcat 5.5 with DataSourceRealm. In web.xml I have: login-config auth-methodFORM/auth-method realm-namemyRealm/realm-name form-login-config form-login-page/logon.jsp/form-login-page form-error-page/logon_error.jsp/form-error-page /form-login-config /login-config and everything works fine. But when I try use this: form-login-page/logon.do/form-login-page form-error-page/logon_error.do/form-error-page and I request the secured page (/myContext/admin/users.do), server response is: HTTP Status 404 - /myContext/logon.do When I request page /myContext/logon.do, this page works without problem. struts.xml: package name=logon namespace=/ extends=struts-default action name=logon class=example.SupportAction result/logon.jsp/result /action action name=logon_error class=example.SupportAction result/logon_error.jsp/result /action /package logon.jsp and logon_error.jsp are a simple jsp without struts tags (but I woud like use s:text tag). Can you tell me what is wrong ? Best regards Marcin Orlinski -- View this message in context: http://www.nabble.com/-s2--web-container-authorization-problem-tf3656226.html#a10214779 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[s2] use remoteUser with struts tags
Hello all I have a question about struts2 tags and get information from HttServletRequest. Does simple method exist to use request.getRemoteUser() and request.isUserInRole() in (for example) s:if test= ? Best regards Marcin Orlinski -- View this message in context: http://www.nabble.com/-s2--use-remoteUser-with-struts-tags-tf3656482.html#a10215560 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Beanutils.copyproerties problem
Hi techies, I have a problem with Beanutils.copyproperties. I have a jsp with a html:select multiple=true property=practices/ I know in action I will be getting an array of practices. I am using LazyValidatorForm. In my GP object I have an array of practices. Practice[] practices. I am using Beanutils.copyproperties to copy from form to GP object. But I am getting the following error: java.lang.IllegalArgumentException: Cannot invoke com.mwcs.par.Gp.setPractices - argument type mismatch at org.apache.commons.beanutils.PropertyUtilsBean.invokeMethod(PropertyUtilsBean.java:1778) at org.apache.commons.beanutils.PropertyUtilsBean.setSimpleProperty(PropertyUtilsBean.java:1759) at org.apache.commons.beanutils.BeanUtilsBean.copyProperty(BeanUtilsBean.java:447) at org.apache.commons.beanutils.BeanUtilsBean.copyProperties(BeanUtilsBean.java:236) at org.apache.commons.beanutils.BeanUtils.copyProperties(BeanUtils.java:114) at com.mwcs.controller.admin.GpAddEditDoneAction.execute(GpAddEditDoneAction.java:31) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) 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) can anyone help me out to solve this problem. I have searched many forums and I cant find an answer for this. Thanks in advance friends, Sony -- View this message in context: http://www.nabble.com/Beanutils.copyproerties-problem-tf3656485.html#a10215566 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Autocompleter FATAL exception raised: [object Error]?
--- wolverine my [EMAIL PROTECTED] wrote: when entered http://localhost:8080/test/AjaxTest.action, it produced the following: {options:[[a,b,c]]} AFAIK the documentation at: http://struts.apache.org/2.x/docs/ajax-tags.html#AjaxTags-autocompleterTag is still correct for the required input to s:autocompleter.../ I don't know if that will solve the problem or not. d. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
plugin for generating UML from config and java file
Hi everybody. Im using struts 1.2.7 with eclipse 3.2.0. and jboss 4.0.3 SP1. I want to generate UML from struts-config file and from java files also (it will be great if i can see which method is called, not only the java file). Is there any plugin (or plugins) that can give me that? Tnx, Stanislav - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
logic:iterate how to test the 1st and last iteration ?
Hi, What I want to do is quite simple. I'd like to know how to test in a logic:iterate when I'm at the first or last iteration. My present problem is to parse a collection of String and display the results like this : ### CODE : begin ### value1, value2, value3 ### CODE : end ### And as you can see, for the last iteration, I mustn't displey the comma character. My present code is : ### CODE : begin ### logic:iterate id=e name=myCollection bean:write name=e property=name /, /logic:iterate ### CODE : end ### Thanks in advance :) piloupy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Books
Hi, I have been using Struts 1.x for some time now. I have been looking at JSF for the last couple of weeks. JSF is such a departure from Struts its simply depressing. I do understand that JSF is a component framework. Whereas Struts is an action framework. The biggest problem is that the web is an action environment: Request/Response (Pull/Push). Trying to wrap a component framework around such an environment is making things more difficult to program, at least with the current version of JSF. Simply due to the fact that you are required to use a set of JSF components which by definition is limiting, if not harder to use. All this to get events à la Visual Basic... if I wanted to do event programming I would find a job using Visual Basic. Yes yes I know, its seems that the answer to everything in regards to JSF limitations is: its customizable. Plus you cannot do any GETs, everything in JSF is a POST. There are thousands of applications out there that do GET/POST !!! Who decided that? By creating a specification that from the beginning which is limited is frustrating... especially when you look at the heavyweights behind the specification. The sadist part to it, its the industry standard. All of this is suppose to make development easier and faster thus less expensive. Now where did this logic come from? Not only must you learn the new JSF specification... you must continue to use JSTL... plus learn how to jump thru hops to get the page to display... because of the JSF limitations but also due to some dead-end rules (e.g.: such as you cannot embed JSTL with a JSF tag). As an example, IBM has its own JSF tag to allow you to mix and match these tags. Plus there are at least 3 different implementations of JSF out there... all different. Now in order to circumvent the GET restriction... you need to wrap again... and a new specification is emerging... SEAM. Which is morphing into a JCP: http://www.jcp.org/en/jsr/detail?id=299 So not only must you master: HTML, JavaScript, CSS, JSTL, JSF, now you must also know SEAM (without EJBs). Not to mention AJAX. All of this to get a web page to display. I may revisit JSF in the future and for some I hope JSF is useful. Converting an application from Struts 1.x to JSF has no advantage at the moment... just lots of problems. I have started to look at Struts2... which looks promising. I was wondering if the book WebWork in Action is still worth reading, if I were to use Struts2? Regards, maestro
Re: logic:iterate how to test the 1st and last iteration ?
You have an indexId attribute on the logic:iterate tag. This indexId attribute sets the name of a JSP scope variable that will contain the index in the loop. Then you can test the value of this variable with the logic:equal. Olivier 2007/4/27, piloupy GOTTAPIL [EMAIL PROTECTED]: Hi, What I want to do is quite simple. I'd like to know how to test in a logic:iterate when I'm at the first or last iteration. My present problem is to parse a collection of String and display the results like this : ### CODE : begin ### value1, value2, value3 ### CODE : end ### And as you can see, for the last iteration, I mustn't displey the comma character. My present code is : ### CODE : begin ### logic:iterate id=e name=myCollection bean:write name=e property=name /, /logic:iterate ### CODE : end ### Thanks in advance :) piloupy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2] Problem with Form Tag
Hi I've got this snippet in my .jsp file s:iterator value=order.details status=status s:set name=indexValue value=#status.index/ s:form id=form%{#indexValue} method=post action=setLineItemAction disabled=true s:textfield name=order.details[%{#status.index}].productCode/ s:textfield name=order.details[%{#status.index}].productDescription/ s:textfield name=order.details[%{#status.index}].quantity/ s:submit/ /s:form /s:iterator but the disabled attribute is not being rendered into the final html, so all the forms are active. What am I doing wrong? Regards Roger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to fill a div from an Ajax call when a onchange event is fired ?
Thanks Musachy, your advices were very helpful. I succeeded in doing what I wanted, but there is still a detail that upsets me with your solution and I'm not totally happy with the solution. The drawback of the solution is that the the parameter I can get in my action has the name of the text field in my JSP page (here demandeAbsence.matriculeDemandeur). This reduces the possibility to reuse this action in other forms, since the action expects the employee code to be sent in a demandeAbsence.matriculeDemandeur parameter. But the employee code text field can have a different name in other forms ... I found a solution by implementing the ParameterAware interface in my action, so I could get the first (and only) parameter. But of course it won't work if I have more parameters expected. Do you know if there is a way to change the name of the parameters before they are sent to the Struts servlet or to the action ? Thanks in advance Olivier
Re: How to fill a div from an Ajax call when a onchange event is fired ?
I think the alias interceptor would help in this case: http://struts.apache.org/2.x/docs/alias-interceptor.html musachy On 4/27/07, Olivier THIERRY [EMAIL PROTECTED] wrote: Thanks Musachy, your advices were very helpful. I succeeded in doing what I wanted, but there is still a detail that upsets me with your solution and I'm not totally happy with the solution. The drawback of the solution is that the the parameter I can get in my action has the name of the text field in my JSP page (here demandeAbsence.matriculeDemandeur). This reduces the possibility to reuse this action in other forms, since the action expects the employee code to be sent in a demandeAbsence.matriculeDemandeur parameter. But the employee code text field can have a different name in other forms ... I found a solution by implementing the ParameterAware interface in my action, so I could get the first (and only) parameter. But of course it won't work if I have more parameters expected. Do you know if there is a way to change the name of the parameters before they are sent to the Struts servlet or to the action ? Thanks in advance Olivier -- Hey you! Would you help me to carry the stone? Pink Floyd
Dojo.io.bind vs IE7
Hi guys, I'm having problems to make a Dojo.io.bind in IE7. I've trying to find something in Dojo's foruns, but have nothing that I can use. Does anyone knows something about that? I'll appreciate any help. Thanks, Felipe -- View this message in context: http://www.nabble.com/Dojo.io.bind-vs-IE7-tf3657557.html#a10218772 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OGNL
I think so. If the documentation says Because the Action is on the stack, and the stack is the OGNL root, references to Action properties can omit the # marker, it should also say *if you don't want it to work*. Scott On 4/26/07, Dave Newton [EMAIL PROTECTED] wrote: --- Big Stick [EMAIL PROTECTED] wrote: That's my point Dave! I think this doc needs to be updated. ...references to Action properties can omit the # marker... To what, must omit? d. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Scott [EMAIL PROTECTED]
Re: logic:iterate how to test the 1st and last iteration ?
Thanks for the answer, but how I can get the collection's length ? I try to avoid any use of scriptlet if possible. piloupy On 4/27/07, Olivier THIERRY [EMAIL PROTECTED] wrote: You have an indexId attribute on the logic:iterate tag. This indexId attribute sets the name of a JSP scope variable that will contain the index in the loop. Then you can test the value of this variable with the logic:equal. Olivier 2007/4/27, piloupy GOTTAPIL [EMAIL PROTECTED]: Hi, What I want to do is quite simple. I'd like to know how to test in a logic:iterate when I'm at the first or last iteration. My present problem is to parse a collection of String and display the results like this : ### CODE : begin ### value1, value2, value3 ### CODE : end ### And as you can see, for the last iteration, I mustn't displey the comma character. My present code is : ### CODE : begin ### logic:iterate id=e name=myCollection bean:write name=e property=name /, /logic:iterate ### CODE : end ### Thanks in advance :) piloupy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: logic:iterate how to test the 1st and last iteration ?
Use bean:size tag to have the collection's length ;) 2007/4/27, piloupy GOTTAPIL [EMAIL PROTECTED]: Thanks for the answer, but how I can get the collection's length ? I try to avoid any use of scriptlet if possible. piloupy On 4/27/07, Olivier THIERRY [EMAIL PROTECTED] wrote: You have an indexId attribute on the logic:iterate tag. This indexId attribute sets the name of a JSP scope variable that will contain the index in the loop. Then you can test the value of this variable with the logic:equal. Olivier 2007/4/27, piloupy GOTTAPIL [EMAIL PROTECTED]: Hi, What I want to do is quite simple. I'd like to know how to test in a logic:iterate when I'm at the first or last iteration. My present problem is to parse a collection of String and display the results like this : ### CODE : begin ### value1, value2, value3 ### CODE : end ### And as you can see, for the last iteration, I mustn't displey the comma character. My present code is : ### CODE : begin ### logic:iterate id=e name=myCollection bean:write name=e property=name /, /logic:iterate ### CODE : end ### Thanks in advance :) piloupy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to fill a div from an Ajax call when a onchange event is fired ?
OK, I see. It's something like that ? action name=getInfosEmploye class=infosEmployeAction param name=aliases#{'demandeAbsence.matriculeDemandeur' : 'matricule'}/param interceptor-ref name=alias / result name=success/jsp/employes/infosEmploye.jsp/result /action Does it mean I need to create a specific action for any form which will user the getInfosEmploye action ? In fact, it would be perfect if you could apply the alias interceptor in the JSP page, but I'm not sure it could be possible :( Olivier 2007/4/27, Musachy Barroso [EMAIL PROTECTED]: I think the alias interceptor would help in this case: http://struts.apache.org/2.x/docs/alias-interceptor.html musachy On 4/27/07, Olivier THIERRY [EMAIL PROTECTED] wrote: Thanks Musachy, your advices were very helpful. I succeeded in doing what I wanted, but there is still a detail that upsets me with your solution and I'm not totally happy with the solution. The drawback of the solution is that the the parameter I can get in my action has the name of the text field in my JSP page (here demandeAbsence.matriculeDemandeur). This reduces the possibility to reuse this action in other forms, since the action expects the employee code to be sent in a demandeAbsence.matriculeDemandeur parameter. But the employee code text field can have a different name in other forms ... I found a solution by implementing the ParameterAware interface in my action, so I could get the first (and only) parameter. But of course it won't work if I have more parameters expected. Do you know if there is a way to change the name of the parameters before they are sent to the Struts servlet or to the action ? Thanks in advance Olivier -- Hey you! Would you help me to carry the stone? Pink Floyd
Re: [s2] ajax tags for doing popup/overlay form?
Allen, I am trying to implement ajaz in my struts app. I don;t know how how ajax anabled div works.can you please elamorate or send the example. shiva --- Allen Gilliland [EMAIL PROTECTED] wrote: i'm guessing that this is a pretty common problem but i couldn't find any examples on the struts2 docs, i would like to know how best to go about doing a popup/overlay form using struts2 + ajax. so for example, if the user is on a page and clicks a link like add category that link would popup/overlay a simple form on top of the existing page and allow the user to enter in the necessary information and submit it. the submit would happen asynchronously and after the form is successfully submitted the overlay would close and an element on the underlying page would be refreshed to contain the new data. what i have so far is an ajax enabled div and an ajax enable anchor which can pull the form ... s:a theme=ajax href=%{addCategoryUrl} targets=addCategoryFormDivAdd Category/s:a s:div theme=ajax href=%{listCategoriesUrl} listenTopics=/refreshCats / div id=addCategoryFormDiv/div so with these elements I can have my categories listed on a page using my s:div and if I publish a /refreshCats event then that div refreshes. then if my s:a link is clicked it will use the response to display in the specified div below my category list, but that's as far as i have been able to get. what i don't fully understand is how to ... 1. get the form to be an overlay instead of just showing up on the page. does dojo/struts2 have built-in support for this somehow? 2. how to properly setup the form so that when the user submits it to add a new category that it closes the overlay form and publishes a /refreshCats event. This is how I have defined the form which gets asynchronously loaded when the Add Category link is clicked ... s:form action=categoryAdd theme=ajax s:textfield name=newCatName / s:submit type=button / /s:form i can then submit the form and have the category get added, but i don't fully understand how to properly cause the form to close and then how to publish the /refreshCats event. can anyone offer some advice or examples on how to accomplish what i am trying to do? i am happy to take my working code and put it together into an example on the struts2 documentation as well. -- Allen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: logic:iterate how to test the 1st and last iteration ?
Morning All c:forEach will support values in a comma delimited String but has problems with nulls If you want to be more specific on what is used for delims then load all of your values in to StringTokenizer object then do c:forEach http://javaboutique.internet.com/tutorials/Struts_EL/index-3.html HTH M-- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Olivier THIERRY [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Friday, April 27, 2007 9:25 AM Subject: Re: logic:iterate how to test the 1st and last iteration ? Use bean:size tag to have the collection's length ;) 2007/4/27, piloupy GOTTAPIL [EMAIL PROTECTED]: Thanks for the answer, but how I can get the collection's length ? I try to avoid any use of scriptlet if possible. piloupy On 4/27/07, Olivier THIERRY [EMAIL PROTECTED] wrote: You have an indexId attribute on the logic:iterate tag. This indexId attribute sets the name of a JSP scope variable that will contain the index in the loop. Then you can test the value of this variable with the logic:equal. Olivier 2007/4/27, piloupy GOTTAPIL [EMAIL PROTECTED]: Hi, What I want to do is quite simple. I'd like to know how to test in a logic:iterate when I'm at the first or last iteration. My present problem is to parse a collection of String and display the results like this : ### CODE : begin ### value1, value2, value3 ### CODE : end ### And as you can see, for the last iteration, I mustn't displey the comma character. My present code is : ### CODE : begin ### logic:iterate id=e name=myCollection bean:write name=e property=name /, /logic:iterate ### CODE : end ### Thanks in advance :) piloupy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[BEER] Re: Books
--- maestro [EMAIL PROTECTED] wrote: The sadist part to it, its the industry standard. That misspelling is *so* accurate in this case! :D I just lol'd out loud. d. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Problem with Form Tag
Put disabled in the fields instead of in the form. regards, Felipe Roger Varley wrote: Hi I've got this snippet in my .jsp file s:iterator value=order.details status=status s:set name=indexValue value=#status.index/ s:form id=form%{#indexValue} method=post action=setLineItemAction disabled=true s:textfield name=order.details[%{#status.index}].productCode/ s:textfield name=order.details[%{#status.index}].productDescription/ s:textfield name=order.details[%{#status.index}].quantity/ s:submit/ /s:form /s:iterator but the disabled attribute is not being rendered into the final html, so all the forms are active. What am I doing wrong? Regards Roger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/-S2--Problem-with-Form-Tag-tf3657504.html#a10219394 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: logic:iterate how to test the 1st and last iteration ?
last entry is c:forTokens M-- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Martin Gainty [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Friday, April 27, 2007 9:43 AM Subject: Re: logic:iterate how to test the 1st and last iteration ? Morning All c:forEach will support values in a comma delimited String but has problems with nulls If you want to be more specific on what is used for delims then load all of your values in to StringTokenizer object then do c:forEach http://javaboutique.internet.com/tutorials/Struts_EL/index-3.html HTH M-- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Olivier THIERRY [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Friday, April 27, 2007 9:25 AM Subject: Re: logic:iterate how to test the 1st and last iteration ? Use bean:size tag to have the collection's length ;) 2007/4/27, piloupy GOTTAPIL [EMAIL PROTECTED]: Thanks for the answer, but how I can get the collection's length ? I try to avoid any use of scriptlet if possible. piloupy On 4/27/07, Olivier THIERRY [EMAIL PROTECTED] wrote: You have an indexId attribute on the logic:iterate tag. This indexId attribute sets the name of a JSP scope variable that will contain the index in the loop. Then you can test the value of this variable with the logic:equal. Olivier 2007/4/27, piloupy GOTTAPIL [EMAIL PROTECTED]: Hi, What I want to do is quite simple. I'd like to know how to test in a logic:iterate when I'm at the first or last iteration. My present problem is to parse a collection of String and display the results like this : ### CODE : begin ### value1, value2, value3 ### CODE : end ### And as you can see, for the last iteration, I mustn't displey the comma character. My present code is : ### CODE : begin ### logic:iterate id=e name=myCollection bean:write name=e property=name /, /logic:iterate ### CODE : end ### Thanks in advance :) piloupy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [BEER] Re: Books
Oops... honestly, I had to polish up my original text... it was much more harsh. I had sent it off to fellow developers but decided to post it. I missed one ! But a good laugh is always good ;) On 4/27/07, Dave Newton [EMAIL PROTECTED] wrote: --- maestro [EMAIL PROTECTED] wrote: The sadist part to it, its the industry standard. That misspelling is *so* accurate in this case! :D I just lol'd out loud. d. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [BEER] Re: Books
By th eway he describes the whole thing, I think he meant it literaly, even though he should have used the adjective instead (sadistic). It is indeed very funny! hff On 4/27/07, Dave Newton [EMAIL PROTECTED] wrote: --- maestro [EMAIL PROTECTED] wrote: The sadist part to it, its the industry standard. That misspelling is *so* accurate in this case! :D I just lol'd out loud. d. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
s:textfield question
Hey all I am trying to populate the value of a s:textfield with some data from a method via OGNL. I tried value=getTagsAsString(movie.id) which doesn't work at all (the textfield is populated with getTagsAsString(movie.id)). Then I tried the JSTL approach, by writing value=%{#getTagsAsString(movie.id)} but that doesn't return a result at all. It seems as if the method getTagsAsString isn't called - shouldn't you be able to do this via the value parameter of a s:textfield? I have pulled it off before with s:property. Thanks! -- View this message in context: http://www.nabble.com/%3Cs%3Atextfield%3E-question-tf3657820.html#a10219702 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Problem with Form Tag
On 27/04/07, Felipe Rodrigues [EMAIL PROTECTED] wrote: Put disabled in the fields instead of in the form. That's no good for me. If you click on a field within a disabled form, the onclick() event is triggered, but if you leave the form active and disable each field individually the onclick() event does not fire. I need to responsd to the onclick() event to make that form the active form for the page. I can work around it by calling document.forms[].disabled=true for each form on the page in a script called from the body onload() event but I was wondering why the s:form tag doesn't appear to support the disabled attribute. Regards Roger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [BEER] Re: Books
We're all sadistic after all. At Tiles 2 we changed DTDs and tag libraries completely, not to mention the APIs. It's a real sadistic pleasure seeing developers in difficulties when trying to upgrade :-) Antonio 2007/4/27, Harring Figueiredo [EMAIL PROTECTED]: By th eway he describes the whole thing, I think he meant it literaly, even though he should have used the adjective instead (sadistic). It is indeed very funny! hff On 4/27/07, Dave Newton [EMAIL PROTECTED] wrote: --- maestro [EMAIL PROTECTED] wrote: The sadist part to it, its the industry standard. That misspelling is *so* accurate in this case! :D I just lol'd out loud. d. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [BEER] Re: Books
On 4/27/07, Harring Figueiredo [EMAIL PROTECTED] wrote: By th eway he describes the whole thing, I think he meant it literaly, even though he should have used the adjective instead (sadistic). It is indeed very funny! A former coworker once accused open source developers of changing stuff not so that it would work better, but simply so they could sell more books! -- Wendy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2]Loop through two arrays in my JSP
Hi Skip http://husted.com/struts/tips/006.html from id of the iterate is then used to reference name (for the specific array value indicated by property) Does this help? M-- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Skip Hollowell [EMAIL PROTECTED] To: user@struts.apache.org Sent: Thursday, April 26, 2007 1:39 PM Subject: [S2]Loop through two arrays in my JSP I have two Arrays (account.amt and account.date) and while they are both the same size, I don't know what that size is until the page gets em. If I really needed to I guess I could also put a size field into account. But what is the best way to loop over them and grab these values? I can easily go over one field at a time: s:iterator value=payment.datePaid s:property/ /s:iterator I can't seem to find any looping constructs that would get me the index each time through and allow me to do something like: //index i=0 somesortaloopcontracut s:textfield key=payment.amtToPay value=%{payment.amtToPay[i]} theme=simple / s:textfield key=payment.datePaid value=%{payment.datePaid[i]} theme=simple/br //increment my index i /s:iterator Am I missing some basic way of doing things, or am I way off base on my object definitions. I tried the alternate way, creating an array of payments (instead of a payment with an array of dates and an array of amounts), with each payment having a date and an amount, but then I couldn't update these objects from the form (see earlier post and some suggestions from Mike Menard, which I wasn't able to get functioning) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: logic:iterate how to test the 1st and last iteration ?
To Olivier : Here's what I've done : ### CODE : begin ### bean:size id=colSize name=myCollection/ logic:iterate id=e indexId=eid name=myCollection logic:equal name=eid value=colSize bean:write name=e property=name /, /logic:equal logic:notEqual name=eid value=colSize bean:write name=e property=name /, /logic:notEqual /logic:iterate ### CODE : end ### But it doesn't work. I don't know how to use correctly the logic:equal tag :-( I thought I may try the logic-el:equal name=eid value=${colSize}, but the logic-el:equal tag doesn't exist... If it is possible, I'd like to only use Struts tags, but if there's no way to do what I need, I'll use the JTSL tags... Geez, if it was Java code, it'd be so simple... these Struts tags make me think that I'm a stupid guy... *sigh* By the way, Olivier, if you're french, Merci pour ton aide ;-) piloupy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: s:textfield question
Is the method you're calling binded in some action that result in this form? I mean, to call some method by OGNL this method should be on the stack. Make sure it is on the stack, if it is and keeps not working, post the code of your action and your form here. Regards, Felipe meeboo wrote: Hey all I am trying to populate the value of a s:textfield with some data from a method via OGNL. I tried value=getTagsAsString(movie.id) which doesn't work at all (the textfield is populated with getTagsAsString(movie.id)). Then I tried the JSTL approach, by writing value=%{#getTagsAsString(movie.id)} but that doesn't return a result at all. It seems as if the method getTagsAsString isn't called - shouldn't you be able to do this via the value parameter of a s:textfield? I have pulled it off before with s:property. Thanks! -- View this message in context: http://www.nabble.com/%3Cs%3Atextfield%3E-question-tf3657820.html#a10220047 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: s:textfield question
I'm sure that it's on the stack. I am using another method call via OGNL where I do s:property value=getMovieCategory(category)/ and that works fine. But when I write s:textfield value=getMovieCategory(category)/ it only prints out getMovieCategory(category). Is this expected behaviour or a bug? Thanks! Felipe Rodrigues wrote: Is the method you're calling binded in some action that result in this form? I mean, to call some method by OGNL this method should be on the stack. Make sure it is on the stack, if it is and keeps not working, post the code of your action and your form here. Regards, Felipe meeboo wrote: Hey all I am trying to populate the value of a s:textfield with some data from a method via OGNL. I tried value=getTagsAsString(movie.id) which doesn't work at all (the textfield is populated with getTagsAsString(movie.id)). Then I tried the JSTL approach, by writing value=%{#getTagsAsString(movie.id)} but that doesn't return a result at all. It seems as if the method getTagsAsString isn't called - shouldn't you be able to do this via the value parameter of a s:textfield? I have pulled it off before with s:property. Thanks! -- View this message in context: http://www.nabble.com/%3Cs%3Atextfield%3E-question-tf3657820.html#a10220153 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: s:textfield question
--- meeboo [EMAIL PROTECTED] wrote: But when I write s:textfield value=getMovieCategory(category)/ it only prints out getMovieCategory(category). Does %{getMovieCategory(category)} work? d. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: logic:iterate how to test the 1st and last iteration ?
Hi Piloupy, You can do this using JSTL as such: c:forEach var=item items=myCollection varStatus=status c:set var=myOutput value=${myOutput}${item} / c:if test=${not status.last} c:set var=myOutput value=${myOutput}, / /c:if /c:forEach Then you can reference ${myOutput} anywhere you like. HTH, -Rod -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of piloupy GOTTAPIL Sent: Friday, April 27, 2007 10:14 To: Struts Users Mailing List; Martin Gainty Subject: Re: logic:iterate how to test the 1st and last iteration ? To Olivier : Here's what I've done : ### CODE : begin ### bean:size id=colSize name=myCollection/ logic:iterate id=e indexId=eid name=myCollection logic:equal name=eid value=colSize bean:write name=e property=name /, /logic:equal logic:notEqual name=eid value=colSize bean:write name=e property=name /, /logic:notEqual /logic:iterate ### CODE : end ### But it doesn't work. I don't know how to use correctly the logic:equal tag :-( I thought I may try the logic-el:equal name=eid value=${colSize}, but the logic-el:equal tag doesn't exist... If it is possible, I'd like to only use Struts tags, but if there's no way to do what I need, I'll use the JTSL tags... Geez, if it was Java code, it'd be so simple... these Struts tags make me think that I'm a stupid guy... *sigh* By the way, Olivier, if you're french, Merci pour ton aide ;-) piloupy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2] Newbie Passing S2 variables to javascript functions
Hi Within a s:iterator tag I have the following statement s:set name=indexValue value=#status.index/ (because status seems to disappear when the iterator exits) and I use the expression %{#indexValue} within other struts s: tags without a problem. I now need to pass this value to a javascript function i.e onclick=enableField(%{#indexValue}) but the browser complains about invalid syntax. How do I pass the value indexValue to a javascript function? Regards Roger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: logic:iterate how to test the 1st and last iteration ?
De rien lol For what I know, the logic:equal tag can only compare with a constant value. So you have to use a scriptlet :( Try this : logic:equal name=eid value=%=colSize% Olivier 2007/4/27, piloupy GOTTAPIL [EMAIL PROTECTED]: To Olivier : Here's what I've done : ### CODE : begin ### bean:size id=colSize name=myCollection/ logic:iterate id=e indexId=eid name=myCollection logic:equal name=eid value=colSize bean:write name=e property=name /, /logic:equal logic:notEqual name=eid value=colSize bean:write name=e property=name /, /logic:notEqual /logic:iterate ### CODE : end ### But it doesn't work. I don't know how to use correctly the logic:equal tag :-( I thought I may try the logic-el:equal name=eid value=${colSize}, but the logic-el:equal tag doesn't exist... If it is possible, I'd like to only use Struts tags, but if there's no way to do what I need, I'll use the JTSL tags... Geez, if it was Java code, it'd be so simple... these Struts tags make me think that I'm a stupid guy... *sigh* By the way, Olivier, if you're french, Merci pour ton aide ;-) piloupy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to fill a div from an Ajax call when a onchange event is fired ?
As some people asked me by private message, a few words to explain how I could make it work. I hope it will help other Struts users ;) The original need : when the user types an elmployee code, I want to retrieve his name and firstname and display it in a div. My action class is as followin (it works with Spring ioc) : It calls a service class to retrieve employee infos public class InfosEmployeAction { private ServiceEmploye serviceEmploye; public ServiceEmploye getServiceEmploye() { return serviceEmploye; } public void setServiceEmploye(ServiceEmploye serviceEmploye) { this.serviceEmploye = serviceEmploye; } private VOEmploye employe; public VOEmploye getEmploye() { return employe; } public void setEmploye(VOEmploye employe) { this.employe = employe; } private String matricule; public String getMatricule() { return matricule; } public void setMatricule(String matricule) { this.matricule = matricule; } public String execute() throws Exception { if (getMatricule() == null || getMatricule().length() == 0) { this.setEmploye(null); } else { this.setEmploye (getServiceEmploye().getEmployeByMatricule(getMatricule())); } return success; } } An extract from the JSP page from where I call the action : s:url id=urlInfosEmploye action=getInfosEmploye namespace=/employes / s:form action=submitCreerDemandeAbsence id=form1 s:textfield id=matriculeDemandeur name=demandeAbsence.matriculeDemandeur label=Matricule onchange=dojo.event.topic.publish('updateInfosDemandeurTopic', this.value); / s:div theme=ajax loadingText=Chargement en cours ... href=%{urlInfosEmploye} formId=form1 listenTopics=updateInfosDemandeurTopic formFilter=filterInfosDemandeur / /s:form The div listens a topic on which I publish when the onchange event is fired for my text field. It is bound to the form including the text field, the formFilter is used to filter informations sent to the action (here the employee code), thanks to the following JS function : script type=text/javascript function filterInfosDemandeur(field) { return field.name == demandeAbsence.matriculeDemandeur; } /script My Struts action is configured as following : package name=employes extends=struts-default namespace=/employes action name=getInfosEmploye class=infosEmployeAction param name=aliases#{'demandeAbsence.matriculeDemandeur' : 'matricule'}/param interceptor-ref name=alias / result name=success/jsp/employes/infosEmploye.jsp/result /action /package The alias interceptor changes the name of parameter to what is expected by the action. And finally the infoEmploye.jsp page : !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.1 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; [EMAIL PROTECTED] contentType=text/html; charset=UTF-8 pageEncoding=UTF-8 % [EMAIL PROTECTED] prefix=s uri=/struts-tags % s:property value=employe.nom /nbsp;s:property value=employe.prenom / The drawback of this solution is that you have to duplicate getInfosEmploye action for each JSP page where you want to use it :( Now it works, but if you have any suggestion to improve it, you're welcome. And thanks a lot again to Musachy for his help ;) Olivier
[BEAN-UITLS]setting super class using bean retrospection
Is there any way I can set super class using bean retrospection ? I create a instance of a class is there a possible way to to add a super class using bean retrospection ? Thansk Regards miro - Ahhh...imagining that irresistible new car smell? Check outnew cars at Yahoo! Autos.
[BEER] Re: [BEAN-UITLS]setting super class using bean retrospection
--- temp temp [EMAIL PROTECTED] wrote: Is there any way I can set super class using bean retrospection ? I create a instance of a class is there a possible way to to add a super class using bean retrospection ? In a day of surprisingly accurate typos, retrospection is *exactly* what you'd want to use. What do you mean by add a super class? A class can only have a single superclass, which is determined at compile-time (AFAIK). d. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [BEER] Re: [BEAN-UITLS]setting super class using bean retrospection
I want a wrapper class for an object I do not want to write methods which calls method Assume I have class I have inteface getString(); getLength(); Some class is implementing this. At runtime I uwant to update this object by overriding method getLenth(). one way is create a new implementation this implemtation is just a wrapper to actual implementation so in this wrapper I will say getLenght(){ actualImplementation.getLength(); instead of doing this is there a way I create a class override only method getLength nad rest methods comes from super class . Thanks Regards Miro Dave Newton [EMAIL PROTECTED] wrote: --- temp temp wrote: Is there any way I can set super class using bean retrospection ? I create a instance of a class is there a possible way to to add a super class using bean retrospection ? In a day of surprisingly accurate typos, retrospection is *exactly* what you'd want to use. What do you mean by add a super class? A class can only have a single superclass, which is determined at compile-time (AFAIK). d. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Ahhh...imagining that irresistible new car smell? Check outnew cars at Yahoo! Autos.
Re: S2: Autocompleter and focus
Would you mind posting the onload script? I'm having trouble with it... Thanks... David M. Scott Nesbitt wrote: I am having trouble setting the focus on an autocompleter field. When I print out all the fields in my overlay, I see three for the sports team autocompleter: sportsTeam sportsTeamKey (one with no name) (why does it have no name?) Here is how it is declared: s:autocompleter name=sportsTeam id=sportsTeam keyName=sportsTeamKey theme=ajax formId=mainForm href=%{#autosportsteam} cssStyle=width: 430px; dropdownHeight=180; loadMinimumCount=2 loadOnTextChange=true autoComplete=false showDownArrow=false delay=100 searchType=substring forceValidOption=true/ In my onbodyload() function I set the value of the field with no name and it works. However, when I try to set the focus on the one with no name it ignores it and none of the overlay fields has focus. I tried adding dataFieldName but despite the documentation it says the attribute is not recognized. Any suggestions? Thanks, Scott __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/S2%3A-Autocompleter-and-focus-tf3601635.html#a10221734 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Problem with Form Tag
Did you tried set readOnly? Are you using ajax theme? If yes, maybe this is the problem. Try the others theme. In the most of cases, this won't affect the ajax behavior of application, once submit has its theme setted to ajax. Regards, Felipe Roger Varley wrote: On 27/04/07, Felipe Rodrigues [EMAIL PROTECTED] wrote: Put disabled in the fields instead of in the form. That's no good for me. If you click on a field within a disabled form, the onclick() event is triggered, but if you leave the form active and disable each field individually the onclick() event does not fire. I need to responsd to the onclick() event to make that form the active form for the page. I can work around it by calling document.forms[].disabled=true for each form on the page in a script called from the body onload() event but I was wondering why the s:form tag doesn't appear to support the disabled attribute. Regards Roger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/-S2--Problem-with-Form-Tag-tf3657504.html#a10221951 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: s:textfield question
Well, when you're calling a method you should use %{} or #, otherwise it would print as a literal. I'm not sure about what of % or # will work. Dave Newton-4 wrote: --- meeboo [EMAIL PROTECTED] wrote: But when I write s:textfield value=getMovieCategory(category)/ it only prints out getMovieCategory(category). Does %{getMovieCategory(category)} work? d. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/%3Cs%3Atextfield%3E-question-tf3657820.html#a10222125 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Newbie Passing S2 variables to javascript functions
Once you've setted this var, you can use Plain Old EL to get it. ${indexValue} should work . A good pratice in this case is define the scope you're setting this var. Regards, Felipe Roger Varley wrote: Hi Within a s:iterator tag I have the following statement s:set name=indexValue value=#status.index/ (because status seems to disappear when the iterator exits) and I use the expression %{#indexValue} within other struts s: tags without a problem. I now need to pass this value to a javascript function i.e onclick=enableField(%{#indexValue}) but the browser complains about invalid syntax. How do I pass the value indexValue to a javascript function? Regards Roger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/-S2--Newbie-Passing-S2-variables-to-javascript-functions-tf3658057.html#a1085 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: s:textfield question
value=%{getTagsAsString(id)} works like a charm. I'm still a bit confused on whether to use the # prefix or not in certain places, but i'm glad it works now :D Thanks! Felipe Rodrigues wrote: Well, when you're calling a method you should use %{} or #, otherwise it would print as a literal. I'm not sure about what of % or # will work. Dave Newton-4 wrote: --- meeboo [EMAIL PROTECTED] wrote: But when I write s:textfield value=getMovieCategory(category)/ it only prints out getMovieCategory(category). Does %{getMovieCategory(category)} work? d. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/%3Cs%3Atextfield%3E-question-tf3657820.html#a10222430 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: s:textfield question
--- meeboo [EMAIL PROTECTED] wrote: value=%{getTagsAsString(id)} works like a charm. I'm still a bit confused on whether to use the # prefix or not in certain places, but i'm glad it works now :D The # indicates non-root OGNL stack access. When an Action is executed it's pushed on to the top of the stack; no # to access its properties. s:iterator.../ pushes each consecutive value of its collection on to the stack, so accessing it or one of its properties does not require a #. Conversely, *naming* each consecutive value using s:iterator.../'s id attribute means you can access the current object using the #name.property syntax (or just #name if it has no properties or want the actual object). d. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [BEER] Re: Books
Now that everyone has had a good whip at it... Is the book worth anything? On 4/27/07, Wendy Smoak [EMAIL PROTECTED] wrote: On 4/27/07, Harring Figueiredo [EMAIL PROTECTED] wrote: By th eway he describes the whole thing, I think he meant it literaly, even though he should have used the adjective instead (sadistic). It is indeed very funny! A former coworker once accused open source developers of changing stuff not so that it would work better, but simply so they could sell more books! -- Wendy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Very OT] [BEER] Re: [BEAN-UITLS]setting super class using bean retrospection
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Miro, I've done heavy editing to make the quoted post make sense. Forgive me if I have inaccurately portrayed the question. temp temp wrote: I want a wrapper class for an object. I do not want to write methods which calls [the superclass] method. Assume I have class. Ok, you want a wrapper class. Generally, this is done like this: public interface Wrapped { int foo(); } public class WrappedWrapper implements Wrapped { private Wrapped _wrapped; public WrappedWrapper(Wrapped wrapped) { _wrapped = wrapped; } public int foo() { return _wrapped.foo(); } } It sounds like you don't want to go through all that trouble to actually implement the methods. I have [an] interface [which includes the methods] getString(); [and] getLength(); Some class is implementing this [interface]. At runtime I want to update this object by overriding method getLength(). One way is create a new implementation. This implementation is just a wrapper to actual implementation so in this wrapper I will say getLength(){ actualImplementation.getLength(); Right... this is exactly what I have above. instead of doing this is there a way I create a class override only method getLength nad rest methods comes from super class . Thanks Regards Miro Well... that would be a subclass, not a wrapper class. Often, interfaces and wrappers are accompanied with adapters which are implementations of interfaces that don't do anything. They allow you to override some methods and leave the others unchanged. What I'd recommend in your case is a combination of a wrapper and an adapter. In fact, you don't even need another class for the adapter... just use the wrapper itself as the adapter. You can either formally subclass WrappedWrapper to include something specific, or use an anonymous class. Something like this: Wrapped a = ...; // however you want to get this instance WrappedWrapper b = new WrappedWrapper(a) { public int foo() { // overrides WrappedWrapper.foo() doSomethingElse(); } }; You could also look into using the java.lang.reflect.Proxy class, which is super cool and will blow your mind. To answer your original question: no, you cannot change the superclass of a class at runtime. You'll just have to suck it up and write classes like the rest of us. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGMjvN9CaO5/Lv0PARAuLHAJ9RAfmao1PkRu8Wh9GSuhAMPJOa+gCgkmrm ll1PFM1UDLUQASiRDw5z2Jg= =r29/ -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
TabbedPanel layout mess in Firefox
I have a TabbedPanel that works so weel in IE, but is a mess in Firefox. At each tab content (which is remote) I saw a line right up this div. This line seems to be the border of TabbedPanel, but the content is outside this line. AnyIdea? Thanks Felipe -- View this message in context: http://www.nabble.com/TabbedPanel-layout-mess-in-Firefox-tf3659227.html#a10224439 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: logic:iterate how to test the 1st and last iteration ?
Hi Try to use following code, might be helpful logic:iterate id=e name=myCollection indexId=index bean:write name=e property=name /${index}, /logic:iterate Laxmikant piloupy GOTTAPIL wrote: Hi, What I want to do is quite simple. I'd like to know how to test in a logic:iterate when I'm at the first or last iteration. My present problem is to parse a collection of String and display the results like this : ### CODE : begin ### value1, value2, value3 ### CODE : end ### And as you can see, for the last iteration, I mustn't displey the comma character. My present code is : ### CODE : begin ### logic:iterate id=e name=myCollection bean:write name=e property=name /, /logic:iterate ### CODE : end ### Thanks in advance :) piloupy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/%3Clogic%3Aiterate%3E-how-to-test-the-1st-and-last-iteration---tf3657445.html#a10224066 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [BEER] Re: Books
I never thought of it that way.. but I believe it to be true... I think that they change so that it will break previous instalation. Sometimes OS can be a pain. :-) Hf On 4/27/07, Wendy Smoak [EMAIL PROTECTED] wrote: On 4/27/07, Harring Figueiredo [EMAIL PROTECTED] wrote: By th eway he describes the whole thing, I think he meant it literaly, even though he should have used the adjective instead (sadistic). It is indeed very funny! A former coworker once accused open source developers of changing stuff not so that it would work better, but simply so they could sell more books! -- Wendy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Sincerely, Harring Figueiredo Sr. Software Engineer Email: [EMAIL PROTECTED] Telephone: 941-256-0600 We never become truly spiritual by sitting down and wishing to become so. You must undertake something so great that you cannot accomplish it unaided.
Re: logic:iterate how to test the 1st and last iteration ?
piloupy GOTTAPIL wrote: Hi, What I want to do is quite simple. I'd like to know how to test in a logic:iterate when I'm at the first or last iteration. My present problem is to parse a collection of String and display the results like this : ### CODE : begin ### value1, value2, value3 ### CODE : end ### And as you can see, for the last iteration, I mustn't displey the comma character. My present code is : ### CODE : begin ### logic:iterate id=e name=myCollection bean:write name=e property=name /, /logic:iterate ### CODE : end ### Thanks in advance :) Declare a counter variable in the loop. You can get the size of the collection in a page variable with the bean:size tag and use that to compare the current iteration. And then dont display the comma at the last iteration. HTH.
Re: [BEER] Re: Books
I have recently begun the learning curve from Struts 1 to Struts 2, and since WebWork in Action is really the only game in town, it's definitely worth the read. There is a lot of package and library conversions that you have to do to get the examples working on Struts 2, and some of the concepts have advanced since the book was written, but the information is still relevant, and at this point, I would add it to the suggested reading list of anyone starting up the Struts 2 Learning Curve. (*Chris*) P.S. Any chance of Struts 2 in Action (i.e. WWiA v2) any time soon? Seems like the time is ripe. On 4/27/07, maestro [EMAIL PROTECTED] wrote: Now that everyone has had a good whip at it... Is the book worth anything? On 4/27/07, Wendy Smoak [EMAIL PROTECTED] wrote: On 4/27/07, Harring Figueiredo [EMAIL PROTECTED] wrote: By th eway he describes the whole thing, I think he meant it literaly, even though he should have used the adjective instead (sadistic). It is indeed very funny! A former coworker once accused open source developers of changing stuff not so that it would work better, but simply so they could sell more books! -- Wendy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: TabbedPanel layout mess in Firefox
Make sure the returned html (for each div) is well formed. musachy On 4/27/07, Felipe Rodrigues [EMAIL PROTECTED] wrote: I have a TabbedPanel that works so weel in IE, but is a mess in Firefox. At each tab content (which is remote) I saw a line right up this div. This line seems to be the border of TabbedPanel, but the content is outside this line. AnyIdea? Thanks Felipe -- View this message in context: http://www.nabble.com/TabbedPanel-layout-mess-in-Firefox-tf3659227.html#a10224439 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd
Re: [S2] Type Conversion Problem in documentation
Struts2 Fan wrote: Hi all, I have a problem with this type-conversion thing. http://struts.apache.org/2.x/docs/type-conversion.html I am trying to dynamically fill a table. I have a bean Person and Person has ListHouse. What I did - step by step. 1 - I defined List House houseList in the PersonAction class. (Also Getter and Setter Methods) 2 - create a file. in the resources directory (the path is the same with the PersonAction) PersonAction-conversion.properties KeyProperty_houseList=id Element_houseList=org.tutorial.model.House CreateIfNull_houseList=true 3 - And in the jsp file I put this as it is said in link above. s:iterator value=houseList id=house s:textfield name=houseList(%{house.id}).name / /s:iterator (House has a String field name) 4 - The values are not shown in the jsp file. So I cannot get them in the action too. But when I change the name of the s:textfield to name it writes the names on the textboxes. But still I cannot get the list when I press on the update button. I expect it to fill the houseList when I go back to Action class. Is it wrong? Can you see what I am doing wrong or something missing? Thanks for reading. I'm just guessing here, but you have a suspicious looking OGNL expression: s:textfield name=houseList(%{house.id}).name / I'd start by trying these variations: s:textfield name=%{houseList(house.id).name} / s:textfield name=%{houseList(#house.id).name} / s:textfield name=%{#houseList(house.id).name} / s:textfield name=%{'houseList('+ house.id + ').name' / Try breaking that OGNL expression out into a series of s:property tags to see which bits of the expression are / are not resolving as you expect. L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2]Loop through two arrays in my JSP
Martin, This is helpful for Struts1 and I appreciate you taking some time to dig it up and post a reply, but the problem I described was for Struts 2. Dave Newton sent a nice post earlier that pointed me to the proper section in the doc that explains how to use the status property of the s:iterate tag. Skip Hollowell Martin Gainty wrote: Hi Skip http://husted.com/struts/tips/006.html from id of the iterate is then used to reference name (for the specific array value indicated by property) Does this help? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
ClassCast Exception for ExcelFile Upload
I am having problems with the FileUpload in struts. I am uploading an Excel File through browser and sending to Struts Action Class, handling it with FormFile. I am casting this FormFile to FileInputStream which is working fine. But when I am deleting some of the rows in that excel file and uploading it again its giving me a ClassCastException when converting the Form File to FileInputStream. I have no idea y its happening like this. Can any one help me with this? Thanks Here is the error I am getting root cause java.lang.ClassCastException at rcsa.struts.ExcelFileUpload.execute(ExcelFileUpload.java:48) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432) at javax.servlet.http.HttpServlet.service(HttpServlet.java:716) at javax.servlet.http.HttpServlet.service(HttpServlet.java:809) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:198) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:144) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:595) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:432) ** Here is the code import java.io.*; import javax.servlet.ServletException; import javax.servlet.http.*; import org.apache.struts.upload.FormFile; import org.apache.struts.action.*; import rcsa.poi.RcsaPOIEventListner; import rcsa.exceptions.RcsaException; import rcsa.dao.OpRiskSSheet; import rcsa.misc.ErrorHandler; public class ExcelFileUpload extends Action { // - Instance Variables String target; // - Methods /** * Method execute * @param mapping * @param form * @param request * @param response * @return ActionForward */ public ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException, RcsaException{ ActionMessages errors = new ActionMessages(); if(form != null){ ExcelFileUploadForm excelForm = (ExcelFileUploadForm) form; FormFile formFile = excelForm.getExcelFile(); InputStream in = (InputStream) formFile.getInputStream(); FileInputStream fin = (FileInputStream) in; errors.clear(); RcsaPOIEventListner.readExcelStream(fin); //errors = new ErrorHandler(opSheet, errors).checkErrors(); if(errors.isEmpty()){ target = success; }else{ target = failure; } }else{ errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(UNABLE TO LOCATE THE EXCEL FILE, false)); target = failure; } saveErrors(request, errors); return mapping.findForward(target); } } ** import org.apache.struts.validator.ValidatorForm; import org.apache.struts.upload.FormFile; /** [EMAIL PROTECTED] * */ /** *Form bean for File Upload. * */ public class ExcelFileUploadForm extends ValidatorForm{ private FormFile excelFile; /** * @return Returns the theFile. */ public FormFile getExcelFile() { return excelFile; } /** * @param theFile The FormFile to set. */ public void setExcelFile(FormFile excelFile) { this.excelFile = excelFile; } } -- View this message in context: http://www.nabble.com/ClassCast-Exception-for-ExcelFile-Upload-tf3659580.html#a10225552 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail:
Re: [S2]Loop through two arrays in my JSP
didnt see your version Me Lo Siento!!! M-- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Skip Hollowell [EMAIL PROTECTED] To: user@struts.apache.org Sent: Friday, April 27, 2007 3:53 PM Subject: Re: [S2]Loop through two arrays in my JSP Martin, This is helpful for Struts1 and I appreciate you taking some time to dig it up and post a reply, but the problem I described was for Struts 2. Dave Newton sent a nice post earlier that pointed me to the proper section in the doc that explains how to use the status property of the s:iterate tag. Skip Hollowell Martin Gainty wrote: Hi Skip http://husted.com/struts/tips/006.html from id of the iterate is then used to reference name (for the specific array value indicated by property) Does this help? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Newbie Passing S2 variables to javascript functions
Roger Varley wrote: Hi Within a s:iterator tag I have the following statement s:set name=indexValue value=#status.index/ (because status seems to disappear when the iterator exits) and I use the expression %{#indexValue} within other struts s: tags without a problem. I now need to pass this value to a javascript function i.e onclick=enableField(%{#indexValue}) but the browser complains about invalid syntax. How do I pass the value indexValue to a javascript function? Without seeing the error and the JSP code that generated it, it's hard to tell you what's wrong. However, remember that Javascript runs on the client, after the page has been generated. View the page source to see what the syntax error is. In this case, it's probably the lack of quotes around the OGNL expression. It may also be that an in-line expression like that wont work. Here's a couple of suggestions to try: ... onclick=enableField('%{#indexValue}') ... ... onclick=%{'enableField(\'' + #indexValue + '\')'} ... ... onclick=enableField('${indexValue}') ... L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ClassCast Exception for ExcelFile Upload
You didn't specify which line in the code you posted is throwing the exception, but I would guess it's this: InputStream in = (InputStream) formFile.getInputStream(); FileInputStream fin = (FileInputStream) in; It's never wise to down-cast a value from an interface type to a concrete type like this. The API contract is to return you an InputStream; it doesn't have to be any particular type of InputStream. To do this safely, use the following code instead: InputStream in = (InputStream) formFile.getInputStream(); FileInputStream fin = new (FileInputStream(in); L. Kirthi wrote: I am having problems with the FileUpload in struts. I am uploading an Excel File through browser and sending to Struts Action Class, handling it with FormFile. I am casting this FormFile to FileInputStream which is working fine. But when I am deleting some of the rows in that excel file and uploading it again its giving me a ClassCastException when converting the Form File to FileInputStream. I have no idea y its happening like this. Can any one help me with this? Thanks Here is the error I am getting root cause java.lang.ClassCastException at rcsa.struts.ExcelFileUpload.execute(ExcelFileUpload.java:48) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432) at javax.servlet.http.HttpServlet.service(HttpServlet.java:716) at javax.servlet.http.HttpServlet.service(HttpServlet.java:809) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:198) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:144) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:595) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:432) ** Here is the code import java.io.*; import javax.servlet.ServletException; import javax.servlet.http.*; import org.apache.struts.upload.FormFile; import org.apache.struts.action.*; import rcsa.poi.RcsaPOIEventListner; import rcsa.exceptions.RcsaException; import rcsa.dao.OpRiskSSheet; import rcsa.misc.ErrorHandler; public class ExcelFileUpload extends Action { // - Instance Variables String target; // - Methods /** * Method execute * @param mapping * @param form * @param request * @param response * @return ActionForward */ public ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException, RcsaException{ ActionMessages errors = new ActionMessages(); if(form != null){ ExcelFileUploadForm excelForm = (ExcelFileUploadForm) form; FormFile formFile = excelForm.getExcelFile(); InputStream in = (InputStream) formFile.getInputStream(); FileInputStream fin = (FileInputStream) in; errors.clear(); RcsaPOIEventListner.readExcelStream(fin); //errors = new ErrorHandler(opSheet, errors).checkErrors(); if(errors.isEmpty()){ target = success; }else{ target = failure; } }else{ errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(UNABLE TO LOCATE THE EXCEL FILE, false)); target = failure; } saveErrors(request, errors); return mapping.findForward(target); } } ** import org.apache.struts.validator.ValidatorForm; import org.apache.struts.upload.FormFile; /** [EMAIL PROTECTED] * */ /** *Form bean for File Upload. * */ public class ExcelFileUploadForm extends ValidatorForm{ private FormFile excelFile; /** * @return Returns the theFile. */ public
Re: [OT] [s2] web-container authorization problem
Which Servlet spec version are you targetting? I.e. what does the start of your web.xml look like? If I recall correctly, Servlet 2.4 clarifies the semantics for form-login-config elements to explicitly allow any type of resource to be referenced. Prior to that many containers, including Tomcat (again, if I recall correctly) would only allow JSPs to be referenced there. If you're already working to Servlet 2.4 (or updating your web.xml so you are) doesn't fix the problem, the correct place to follow up would be the Tomcat Users list, since this isn't a Struts-specific issue. L. Marcin Orlinski wrote: Hello all I have simple application (struts2) that works on Tomcat 5.5 with DataSourceRealm. In web.xml I have: login-config auth-methodFORM/auth-method realm-namemyRealm/realm-name form-login-config form-login-page/logon.jsp/form-login-page form-error-page/logon_error.jsp/form-error-page /form-login-config /login-config and everything works fine. But when I try use this: form-login-page/logon.do/form-login-page form-error-page/logon_error.do/form-error-page and I request the secured page (/myContext/admin/users.do), server response is: HTTP Status 404 - /myContext/logon.do When I request page /myContext/logon.do, this page works without problem. struts.xml: package name=logon namespace=/ extends=struts-default action name=logon class=example.SupportAction result/logon.jsp/result /action action name=logon_error class=example.SupportAction result/logon_error.jsp/result /action /package logon.jsp and logon_error.jsp are a simple jsp without struts tags (but I woud like use s:text tag). Can you tell me what is wrong ? Best regards Marcin Orlinski - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ClassCast Exception for ExcelFile Upload
sorry abt that Its throwing exception at this line FileInputStream fin = (FileInputStream) in; I tried new FileInputStream(in) - But this is not a valid constructor - not defined in API Is there anyother way in struts where u get FileInputStream directly from the ActionForm -Thank you Laurie Harper wrote: You didn't specify which line in the code you posted is throwing the exception, but I would guess it's this: InputStream in = (InputStream) formFile.getInputStream(); FileInputStream fin = (FileInputStream) in; It's never wise to down-cast a value from an interface type to a concrete type like this. The API contract is to return you an InputStream; it doesn't have to be any particular type of InputStream. To do this safely, use the following code instead: InputStream in = (InputStream) formFile.getInputStream(); FileInputStream fin = new (FileInputStream(in); L. Kirthi wrote: I am having problems with the FileUpload in struts. I am uploading an Excel File through browser and sending to Struts Action Class, handling it with FormFile. I am casting this FormFile to FileInputStream which is working fine. But when I am deleting some of the rows in that excel file and uploading it again its giving me a ClassCastException when converting the Form File to FileInputStream. I have no idea y its happening like this. Can any one help me with this? Thanks Here is the error I am getting root cause java.lang.ClassCastException at rcsa.struts.ExcelFileUpload.execute(ExcelFileUpload.java:48) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432) at javax.servlet.http.HttpServlet.service(HttpServlet.java:716) at javax.servlet.http.HttpServlet.service(HttpServlet.java:809) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:198) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:144) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:595) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:432) ** Here is the code import java.io.*; import javax.servlet.ServletException; import javax.servlet.http.*; import org.apache.struts.upload.FormFile; import org.apache.struts.action.*; import rcsa.poi.RcsaPOIEventListner; import rcsa.exceptions.RcsaException; import rcsa.dao.OpRiskSSheet; import rcsa.misc.ErrorHandler; public class ExcelFileUpload extends Action { //- Instance Variables String target; // - Methods /** * Method execute * @param mapping * @param form * @param request * @param response * @return ActionForward */ public ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException, RcsaException{ ActionMessages errors = new ActionMessages(); if(form != null){ ExcelFileUploadForm excelForm = (ExcelFileUploadForm) form; FormFile formFile = excelForm.getExcelFile(); InputStream in = (InputStream) formFile.getInputStream(); FileInputStream fin = (FileInputStream) in; errors.clear(); RcsaPOIEventListner.readExcelStream(fin); //errors = new ErrorHandler(opSheet, errors).checkErrors(); if(errors.isEmpty()){ target = success; }else{ target = failure; } }else{ errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(UNABLE TO LOCATE THE EXCEL FILE, false)); target = failure; } saveErrors(request, errors); return mapping.findForward(target); } } ** import
Re: TabbedPanel layout mess in Firefox
I already did this. the rendered HTML seems to be ok. I took a margin propertie out of my CSS and it is bether now. The only difference is in the border that appears in IE but don't in Firefox. So strange. It is probably something in the internal dojo's css. By the way, I have another issue in Firefox. When loading the TabbedPanel, It shows the content of all of my tabs. In IE it doesn't happen. Is there some hack to that? Thanks, Felipe Musachy Barroso wrote: Make sure the returned html (for each div) is well formed. musachy On 4/27/07, Felipe Rodrigues [EMAIL PROTECTED] wrote: I have a TabbedPanel that works so weel in IE, but is a mess in Firefox. At each tab content (which is remote) I saw a line right up this div. This line seems to be the border of TabbedPanel, but the content is outside this line. AnyIdea? Thanks Felipe -- View this message in context: http://www.nabble.com/TabbedPanel-layout-mess-in-Firefox-tf3659227.html#a10224439 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd -- View this message in context: http://www.nabble.com/TabbedPanel-layout-mess-in-Firefox-tf3659227.html#a10226348 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Beanutils.copyproerties problem
opentotech wrote: Hi techies, I have a problem with Beanutils.copyproperties. I have a jsp with a html:select multiple=true property=practices/ I know in action I will be getting an array of practices. I am using LazyValidatorForm. In my GP object I have an array of practices. Practice[] practices. I am using Beanutils.copyproperties to copy from form to GP object. But I am getting the following error: java.lang.IllegalArgumentException: Cannot invoke com.mwcs.par.Gp.setPractices - argument type mismatch [...] can anyone help me out to solve this problem. I have searched many forums and I cant find an answer for this. There's not enough information here to solve the problem. What argument type does setPractices() expect? What does your form class look like? How are you using BeanUtils.copyProperties? My guess is that you're trying to pass String-based form data into something that expects typed data -- e.g. you're trying to set a String array on something that wants a Practice array or something similar. In that case, you would need to create and register a BeanUtils converter class that knows how to go from String to Practice (or whatever the case may be). L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [s2] use remoteUser with struts tags
Well, If you're in a JSP, you can get it direct from the request, even using EL or using expressions. If you're in a action you may want take a look at the documentation. Specific in the part of FAQ - How To. You'll find that you can get the request object by implementing the interface ServletRequestAware or using the code ActionContext.getContext().getRequest(). Using the interface is a better approach. Make your choice. :-) Regards, Felipe Marcin Orlinski wrote: Hello all I have a question about struts2 tags and get information from HttServletRequest. Does simple method exist to use request.getRemoteUser() and request.isUserInRole() in (for example) s:if test= ? Best regards Marcin Orlinski -- View this message in context: http://www.nabble.com/-s2--use-remoteUser-with-struts-tags-tf3656482.html#a10226373 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: logic:iterate how to test the 1st and last iteration ?
Affan Qureshi wrote: piloupy GOTTAPIL wrote: Hi, What I want to do is quite simple. I'd like to know how to test in a logic:iterate when I'm at the first or last iteration. My present problem is to parse a collection of String and display the results like this : ### CODE : begin ### value1, value2, value3 ### CODE : end ### And as you can see, for the last iteration, I mustn't displey the comma character. My present code is : ### CODE : begin ### logic:iterate id=e name=myCollection bean:write name=e property=name /, /logic:iterate ### CODE : end ### Thanks in advance :) Declare a counter variable in the loop. You can get the size of the collection in a page variable with the bean:size tag and use that to compare the current iteration. And then dont display the comma at the last iteration. This is trivial to do with JSTL; something like this should work: c:forEach items='myCollection' var='e' varStatus='status' c:out value='e' c:if test='${not status.last}' c:out value=','/ /c:if /c:forEach Strut 1's logic:iterate tag only provides a simple integer status variable, which is why you have to jump through a few extra hoops using that. Just one of the reasons JSTL is preferred over the logic: collection :-) L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: S2: How to get namespace of currently executed action from interceptor?
Did you tried use ActionContext? Regards, Felipe Dmitriy Kuznetsov wrote: Hi. I have interceptor that logs requests to actions. In it's intercept(ActionInvocation) method i easily find the name of currently executed action using following code: public String intercept(ActionInvocation actionInvocation) { String actionName = actionInvocation.getInvocationContext().getName(); . } I believe i could get the namespace by extracting part of request URL between context name and action name. But is there any better way, like the one for action name? Thanks. -- View this message in context: http://www.nabble.com/S2%3A-How-to-get-namespace-of-currently-executed-action-from-interceptor--tf3654793.html#a10226472 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [BEER] Re: Books
i hope Ted (Husted) is reading this post ... (and several others from Struts 2 users who have expressed the need for such a book.. robin (a Struts2 fan, but waiting for some good book) - Original Message From: Chris Pratt [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Friday, April 27, 2007 2:27:00 PM Subject: Re: [BEER] Re: Books I have recently begun the learning curve from Struts 1 to Struts 2, and since WebWork in Action is really the only game in town, it's definitely worth the read. There is a lot of package and library conversions that you have to do to get the examples working on Struts 2, and some of the concepts have advanced since the book was written, but the information is still relevant, and at this point, I would add it to the suggested reading list of anyone starting up the Struts 2 Learning Curve. (*Chris*) P.S. Any chance of Struts 2 in Action (i.e. WWiA v2) any time soon? Seems like the time is ripe. On 4/27/07, maestro [EMAIL PROTECTED] wrote: Now that everyone has had a good whip at it... Is the book worth anything? On 4/27/07, Wendy Smoak [EMAIL PROTECTED] wrote: On 4/27/07, Harring Figueiredo [EMAIL PROTECTED] wrote: By th eway he describes the whole thing, I think he meant it literaly, even though he should have used the adjective instead (sadistic). It is indeed very funny! A former coworker once accused open source developers of changing stuff not so that it would work better, but simply so they could sell more books! -- Wendy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Be smarter than spam. See how smart SpamGuard is at giving junk email the boot with the All-new Yahoo! Mail at http://mrd.mail.yahoo.com/try_beta?.intl=ca
Re: [BEER] Re: Books
I don't know what information I can or can't give out, so suffice it to say you won't be waiting too much longer for books specifically on S2... and no, before anyone asks, I'm not writing one :) Frank -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com AIM/Yahoo: fzammetti MSN: [EMAIL PROTECTED] Author of Practical Ajax Projects With Java Technology (2006, Apress, ISBN 1-59059-695-1) and JavaScript, DOM Scripting and Ajax Projects (2007, Apress, ISBN 1-59059-816-4) Java Web Parts - http://javawebparts.sourceforge.net Supplying the wheel, so you don't have to reinvent it! On Fri, April 27, 2007 5:08 pm, robin bajaj wrote: i hope Ted (Husted) is reading this post ... (and several others from Struts 2 users who have expressed the need for such a book.. robin (a Struts2 fan, but waiting for some good book) - Original Message From: Chris Pratt [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Friday, April 27, 2007 2:27:00 PM Subject: Re: [BEER] Re: Books I have recently begun the learning curve from Struts 1 to Struts 2, and since WebWork in Action is really the only game in town, it's definitely worth the read. There is a lot of package and library conversions that you have to do to get the examples working on Struts 2, and some of the concepts have advanced since the book was written, but the information is still relevant, and at this point, I would add it to the suggested reading list of anyone starting up the Struts 2 Learning Curve. (*Chris*) P.S. Any chance of Struts 2 in Action (i.e. WWiA v2) any time soon? Seems like the time is ripe. On 4/27/07, maestro [EMAIL PROTECTED] wrote: Now that everyone has had a good whip at it... Is the book worth anything? On 4/27/07, Wendy Smoak [EMAIL PROTECTED] wrote: On 4/27/07, Harring Figueiredo [EMAIL PROTECTED] wrote: By th eway he describes the whole thing, I think he meant it literaly, even though he should have used the adjective instead (sadistic). It is indeed very funny! A former coworker once accused open source developers of changing stuff not so that it would work better, but simply so they could sell more books! -- Wendy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Be smarter than spam. See how smart SpamGuard is at giving junk email the boot with the All-new Yahoo! Mail at http://mrd.mail.yahoo.com/try_beta?.intl=ca - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: TabbedPanel layout mess in Firefox
FWIW I am using the tabbed panel w/ S2.0.6 under FF and it's rendering okay (well, I haven't worked on it since I installed FF2, so I suppose all bets are off). d. --- Felipe Rodrigues [EMAIL PROTECTED] wrote: I already did this. the rendered HTML seems to be ok. I took a margin propertie out of my CSS and it is bether now. The only difference is in the border that appears in IE but don't in Firefox. So strange. It is probably something in the internal dojo's css. By the way, I have another issue in Firefox. When loading the TabbedPanel, It shows the content of all of my tabs. In IE it doesn't happen. Is there some hack to that? Thanks, Felipe Musachy Barroso wrote: Make sure the returned html (for each div) is well formed. musachy On 4/27/07, Felipe Rodrigues [EMAIL PROTECTED] wrote: I have a TabbedPanel that works so weel in IE, but is a mess in Firefox. At each tab content (which is remote) I saw a line right up this div. This line seems to be the border of TabbedPanel, but the content is outside this line. AnyIdea? Thanks Felipe -- View this message in context: http://www.nabble.com/TabbedPanel-layout-mess-in-Firefox-tf3659227.html#a10224439 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd -- View this message in context: http://www.nabble.com/TabbedPanel-layout-mess-in-Firefox-tf3659227.html#a10226348 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: TabbedPanel layout mess in Firefox
I belive in you. I by myself have some tabbedPanels that works ok in Firefox. I just asked here to see if somebody have lived this same issue. And about the content that tabbedPanel shows when loading. Do you see that? Are you using a heavy content inside the first tab? By heavy you can understand a lots of remotes div and DB process. Thanks, Felipe Dave Newton-4 wrote: FWIW I am using the tabbed panel w/ S2.0.6 under FF and it's rendering okay (well, I haven't worked on it since I installed FF2, so I suppose all bets are off). d. --- Felipe Rodrigues [EMAIL PROTECTED] wrote: I already did this. the rendered HTML seems to be ok. I took a margin propertie out of my CSS and it is bether now. The only difference is in the border that appears in IE but don't in Firefox. So strange. It is probably something in the internal dojo's css. By the way, I have another issue in Firefox. When loading the TabbedPanel, It shows the content of all of my tabs. In IE it doesn't happen. Is there some hack to that? Thanks, Felipe Musachy Barroso wrote: Make sure the returned html (for each div) is well formed. musachy On 4/27/07, Felipe Rodrigues [EMAIL PROTECTED] wrote: I have a TabbedPanel that works so weel in IE, but is a mess in Firefox. At each tab content (which is remote) I saw a line right up this div. This line seems to be the border of TabbedPanel, but the content is outside this line. AnyIdea? Thanks Felipe -- View this message in context: http://www.nabble.com/TabbedPanel-layout-mess-in-Firefox-tf3659227.html#a10224439 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd -- View this message in context: http://www.nabble.com/TabbedPanel-layout-mess-in-Firefox-tf3659227.html#a10226348 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/TabbedPanel-layout-mess-in-Firefox-tf3659227.html#a10227695 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [BEER] Re: Books
On 4/27/07, maestro [EMAIL PROTECTED] wrote: Now that everyone has had a good whip at it... Is the book worth anything? Yes. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2] WebWork (Struts 2) In Action presentation by Patrick Lightbody
Patrick Lightbody does an overview of WebWork and the Struts merger, comparing to other web frameworks and explaining validation support, Ajax support, and how to achieve rapid development with WebWork/Struts 2 * http://www.infoq.com/presentations/struts-2-webwork-pat-lightbody -Ted. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: TabbedPanel layout mess in Firefox
When the div is loading it shows Loading... by default, you can change the text (loadingText) or disable it (showLoadingText), as I mentioned the other day I think it would be better to have this off in 2.1 because of problems in IE when a form is submitted. regards musachy On 4/27/07, Felipe Rodrigues [EMAIL PROTECTED] wrote: I belive in you. I by myself have some tabbedPanels that works ok in Firefox. I just asked here to see if somebody have lived this same issue. And about the content that tabbedPanel shows when loading. Do you see that? Are you using a heavy content inside the first tab? By heavy you can understand a lots of remotes div and DB process. Thanks, Felipe Dave Newton-4 wrote: FWIW I am using the tabbed panel w/ S2.0.6 under FF and it's rendering okay (well, I haven't worked on it since I installed FF2, so I suppose all bets are off). d. --- Felipe Rodrigues [EMAIL PROTECTED] wrote: I already did this. the rendered HTML seems to be ok. I took a margin propertie out of my CSS and it is bether now. The only difference is in the border that appears in IE but don't in Firefox. So strange. It is probably something in the internal dojo's css. By the way, I have another issue in Firefox. When loading the TabbedPanel, It shows the content of all of my tabs. In IE it doesn't happen. Is there some hack to that? Thanks, Felipe Musachy Barroso wrote: Make sure the returned html (for each div) is well formed. musachy On 4/27/07, Felipe Rodrigues [EMAIL PROTECTED] wrote: I have a TabbedPanel that works so weel in IE, but is a mess in Firefox. At each tab content (which is remote) I saw a line right up this div. This line seems to be the border of TabbedPanel, but the content is outside this line. AnyIdea? Thanks Felipe -- View this message in context: http://www.nabble.com/TabbedPanel-layout-mess-in-Firefox-tf3659227.html#a10224439 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd -- View this message in context: http://www.nabble.com/TabbedPanel-layout-mess-in-Firefox-tf3659227.html#a10226348 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/TabbedPanel-layout-mess-in-Firefox-tf3659227.html#a10227695 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd
Re: [BEER] Re: Books
I agree with Ted. I read the book before jumping into S2. musachy On 4/27/07, Ted Husted [EMAIL PROTECTED] wrote: On 4/27/07, maestro [EMAIL PROTECTED] wrote: Now that everyone has had a good whip at it... Is the book worth anything? Yes. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd
Re: TabbedPanel layout mess in Firefox
--- Felipe Rodrigues [EMAIL PROTECTED] wrote: And about the content that tabbedPanel shows when loading. Do you see that? Yes; while the content is loading there is visible content. That's one reason I'm actually probably going to move away from the tabbed panel (and possibly Dojo in general). d. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Using timezone with date tag
Is there a way to specify timezone in the date tag. The current behavior defaults to the timezone of the server. Regards, Rohit
Re: logic:iterate how to test the 1st and last iteration ?
piloupy GOTTAPIL [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, What I want to do is quite simple. I'd like to know how to test in a logic:iterate when I'm at the first or last iteration. My present problem is to parse a collection of String and display the results like this : ### CODE : begin ### value1, value2, value3 ### CODE : end ### And as you can see, for the last iteration, I mustn't displey the comma character. My present code is : ### CODE : begin ### logic:iterate id=e name=myCollection bean:write name=e property=name /, /logic:iterate ### CODE : end ### Thanks in advance :) piloupy how about using the length and offset attributes like so: !--display first item of list with no comma-- logic:iterate id=e name=myCollection length=1 bean:write name=e property=name / /logic:iterate !--display remaining items of list with a comma and space prepended to each-- logic:iterate id=e name=myCollection offset=1 , bean:write name=e property=name / /logic:iterate - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
jBoss java.policy file
Evening All Anyone know where I can a working java.policy file for JBoss? (No domains configured yet) Thanks M-- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you.
Fw: logic:iterate how to test the 1st and last iteration ?
Tim for 2.x use the ww:iterator ww:if test=#foo=bar http://struts.apache.org/2.x/docs/iteration-tags.html M-- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Tim B [EMAIL PROTECTED] To: user@struts.apache.org Sent: Friday, April 27, 2007 9:09 PM Subject: Re: logic:iterate how to test the 1st and last iteration ? piloupy GOTTAPIL [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, What I want to do is quite simple. I'd like to know how to test in a logic:iterate when I'm at the first or last iteration. My present problem is to parse a collection of String and display the results like this : ### CODE : begin ### value1, value2, value3 ### CODE : end ### And as you can see, for the last iteration, I mustn't displey the comma character. My present code is : ### CODE : begin ### logic:iterate id=e name=myCollection bean:write name=e property=name /, /logic:iterate ### CODE : end ### Thanks in advance :) piloupy how about using the length and offset attributes like so: !--display first item of list with no comma-- logic:iterate id=e name=myCollection length=1 bean:write name=e property=name / /logic:iterate !--display remaining items of list with a comma and space prepended to each-- logic:iterate id=e name=myCollection offset=1 , bean:write name=e property=name / /logic:iterate - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
S2 s:table going away?
Is it and is http://cwiki.apache.org/S2PLUGINS/table-tags.html the appropriate replacement? tia, Patrick (struts newb, just starting with Struts 2) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: S2 s:table going away?
Yes, the table tag will go away soon. You can try tabletags or displaytag. musachy On 4/27/07, Patrick J. Maloney [EMAIL PROTECTED] wrote: Is it and is http://cwiki.apache.org/S2PLUGINS/table-tags.html the appropriate replacement? tia, Patrick (struts newb, just starting with Struts 2) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd
Re: TabbedPanel layout mess in Firefox
But you can delay the content update until the last minute (showLoadingText=false). Or am I missing something here :)? regards musachy On 4/27/07, Dave Newton [EMAIL PROTECTED] wrote: --- Felipe Rodrigues [EMAIL PROTECTED] wrote: And about the content that tabbedPanel shows when loading. Do you see that? Yes; while the content is loading there is visible content. That's one reason I'm actually probably going to move away from the tabbed panel (and possibly Dojo in general). d. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd