[ANNOUNCE] Struts is now an Apache top level project.!
Peoples, Word has just come back from the Apache board meeting with the results of Struts' request to become a top level Apache project along side ANT and the rest... * The Apache Jakarta Struts project requested to become a top level project of the ASF. The Board definitely agreed with their request, and passed the resolution unanimously with little discussion. Craig McClanahan will be the Chair of the new Apache Struts PMC. ...I just wanted to extend the word so we can all pass thanks and kudos to the other 13 committers, and yourselves the supporting community. Many people on and off the Who we are page put a tremendous amount of work into Struts, and it really shows. It's just another one of those happy times where this comes into the spotlight. Cheers, Arron. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: unsuccessful in keyboard monkey's nesting tutorial... please help :)
He's right. And to elaborate... use the tld and classes from the struts distro, and not the tld and nested tag classes from the tutorial. All the best. Arron. The latest nested tags are already included with the Struts 1.1 distribution. --- mariel hizon [EMAIL PROTECTED] wrote: Hi! Actually, i just downloaded the nest extension tutorial war file from www.keyboardmonkey.com and tried to make it work. This jsp code (the nested:text part) is just to check if the nested-tags.tld is working. Apparently it's not, because when i changed the nested: text to html:text, i didn't get an error, so i guess it really is the nested extension that won't run. I browsed a lot of mail archives and saw that some people also had a problem with it, though their solution doesn't work for me. I'm wondering if it's possible that the nested-tags.tld and the nested_tags.jar included in the war tutorial are not compatible with the jars that i have? I hope someone can help me. Thanks! part of tutorial.jsp ... everything's fine if i just change the nested:text to html: text ... i don't know why i keep getting cannot find bean null in any scope with nested: text ... html:form action=/action-tutorial.do Monkey Name: nested:text property=monkeyName /br Monkey Age: nested:text property=monekyAge /br html:submitSubmit Form/html:submit /html:form __ Do you Yahoo!? Yahoo! Finance: Get your refund fast by filing online. http://taxes.yahoo.com/filing.html - 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: Using display/ tag with nested beans
Jerry, Try using nested:define tags to make bean references that the display tags could then get a hold of and use. Otherwise, there would be no other way unless the display tag source code was updated to recognise and use the nested context. Hope this does the trick. Arron. I'm trying to get the display/ tag library to work with my nested bean structure without much luck, and after screwing around with this for the past three days, I'm ready to throw in the towel. If anyone can see what it is I'm doing wrong, I'd appreciate it. Basically I've got the following (currently): nested:iterate property=list1 nested:iterate property=list2 nested:iterate property=list3 nested:write property=item1/ nested:write property=item2/ /nested:iterate /nested:iterate /nested:iterate This works fine, as I get the values for item1, item2, etc. I now need to replace the last nested:iterate/ with a display:table / tag with appropriate display:column /'s. I've tried several things, including: display:table list=list3 display:column property=item1/ /display:table I've also tried to set a page-scope object on the 'list2' iterate: nested:iterate id=myObject property=list2 display:table list=myObject.list3 Whatever I try I am consistently getting a JSP exception thrown of ERROR 01/19/2004:12:07:51 - Error looking up property specimenId in object type java.lang.String Exception: [.LookupUtil] Error looking up property specimenId in object type java.lang.String Cause: Unknown property 'specimenId' from org.displaytag.util.LookupUtil.getBeanProperty(LookupUtil.java:210) at org.displaytag.model.Column.getValue(Column.java:93) at org.displaytag.model.Column.createChoppedAndLinkedValue(Column.java:144) at org.displaytag.model.Column.getOpenTag(Column.java:120) at org.displaytag.tags.TableTag.getHTMLData(TableTag.java:1136)at org.displaytag.tags.TableTag.doEndTag(TableTag.java:847) Help! I'm at my wits end on this. Any ideas? Or will the display/ taglib just not work with nested beans? Thanks! Jerry Jalenak Development Manager, Web Publishing LabOne, Inc. 10101 Renner Blvd. Lenexa, KS 66219 (913) 577-1496 [EMAIL PROTECTED] This transmission (and any information attached to it) may be confidential and is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient or the person responsible for delivering the transmission to the intended recipient, be advised that you have received this transmission in error and that any use, dissemination, forwarding, printing, or copying of this information is strictly prohibited. If you have received this transmission in error, please immediately notify LabOne at the following email address: [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: getting data from form with nested beans
Never thought I'd see a flamewar on nested beans. :) Request scope beans in lists are very much possible with the help of Lazy collections... http://marc.theaimsgroup.com/?l=struts-userm=105027737732711w=2 ...it's the entire reason the lazy collections were made. Some people just can't live with computer memory filling up with session objects. The lazy solution keeps Struts happy by allowing an empty list to recieve updates on indexes not there yet (which is what happens when the form object is created for the first time when the request comes in). That said, nothing in life comes free. Nested beans in request scope is one degree harder to code for than form beans in the session. If a site has limited concurrent users (intranetty, etc etc), I vote to put the form in the session every time. :)...but the other way is more than possible. Cheers. Arron. I did not get your question clearly. When a new form(instance of ActionForm) is created, users input is not lost.The users input is still in the request Object.(Are you confusing the Form on screen with the ActionFOrm object on server side?).So after the instance of ActionForm is created, it is populated with the parameters from the request using the struts auto- population mechanism.And then you can use the same BeanList to pass to the Service layer(But after conversion may be as all the properties in String format.SO create DTO bean from correspondign stringbeans). Hope this helps. regards, Shirish -Original Message- From: Martin Sturzenegger [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 20, 2004 3:11 PM To: [EMAIL PROTECTED]; Struts Users Mailing List Subject: RE: getting data from form with nested beans hi shirish, great conceipt and many thanks for example and explanation, my fog seems to thin out slowly. one question remains: as soon as a new form is created, then, i assume, the user's inputs are lost. so how do you get hold of the user's input? usually one feeds the input data back into a database. with simple beans i copy the formdata to a new instantiated dto-bean within my action class and pass the dto- bean to my business-layer. but dealing with nested beans, where and how? sorry for pestering and thanks a lot in advance martin -- Urspruengliche Nachricht -- Von: [EMAIL PROTECTED] Antworten an: Struts Users Mailing List [EMAIL PROTECTED] Datum: Tue, 20 Jan 2004 13:54:30 +0100 yes:-)) And I am sure most of the people do have the same.I mean tieing the nested properties to the session scope does take away a lot of flexibility. Anyhow just try my sample code...It should demonstrate the concept. regards, Shirish -Original Message- From: Mark Lowe [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 20, 2004 1:44 PM To: Struts Users Mailing List Subject: Re: getting data from form with nested beans So you've had forms, with indexed properties with dynamic sizes working when scoping to request? On 20 Jan 2004, at 11:45, [EMAIL PROTECTED] wrote: Hi, Is it flaming or what?I thought we were trying to solve each others problems.Still a last try. We have a complete application(3 modules/4000 classes/15 companies live as of date) which uses all form beans just in request scope.And all over the place we have used form beans in request scope.And the application is well and running. If you go t through my mail, you will understand why it will mail.SO please read the mail carefully. I will try to explain it again. When the form is submitted(the user presses submit button on screen),the corresponding action will be called by struts.At the same time, it will look for a actionForm from the mapping.As the scope is specified as request, a new form will be created.And if you have looked at my example carefully, you will see that the nested bean list is created when the form is created.But this nested list is empty.Now when struts autopopulation tries to populate a nested bean, it should find that the nested bean list is empty.But the lazy initialization mechanism in the indexed getter will take care that the list has enough of beans.See the code below. 33 //give indexed access to the beans public Employee getEmployee(int index){ //very imp //when a jsp is submited , then while auto populating the form,this will ensure that // the form is populated properly. while(index = beanList.size()){ beanList.add(new Employee()); } *** And as explained in jsp part, as long as the property references are created properly, this will work.And with struts1.1 nested tags, you don't have to even use the script%% to create property is jsp. Hope this clarifies it.If not, try to run my example code. regards, Shirish -Original Message
Re: Nested tags not working with session-scope form
If you can simply switch nested for html or logic, then the markup isn't specifically made for the nested tags. ie: you've probably used the name attribute etc which the nested tags don't need. If you're able to use html or logic, then you may as well use the original tags. If you want to take advantage of the nested tags, you'll have to look at their specific needs in the documentation, or the tutorials at http://keyboardmonkey.com/next All the best. Arron. Hello, I have a session scope ActionForm. I have a need to use the nested tag library to iterator over some nested beans in the form. However, any use of a nested:text, nested:write, nested:iterate, etc., will not output the properties of the ActionForm. This results in a blank HTML form in my browser. If I changed the nested prefix to the original html, logic, etc. Then everything outputs fine in the HTML. I am wondering if anyone has come across this problem before, and knows what I might be doing wrong or something I can check. To check my sanity, i wrote a simple web app using session-scoped action forms and nested tags, and it worked fine. I just can't figure out why it works in one web-app and not the other. Thanks, Joe - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problems with Tomcat and nested:iterate + jsp:include
Tomcat had its JSP engine (Jasper) rewritten for version 4.1.x and is naturally a part of 5.x. It was a completely different beast, and the way the nested tags operated, well, they stopped working for new tomcats. I couldn't get them to change Jasper, so I rewrote the nested tags. This change only went into Struts at 1.1RC2. It was late, but I couldn't have the latest tomcat not working with the 1.1 release so... As a work around for you... try downloading this jar... http://keyboardmonkey.com/downloads/km-nested-v2.03.jar ...this is a jar of just the nested tags. put it into your WEB-INF/lib dir. It should load the tags from here before it finds them in the struts.jar. When there restart your app and see if it works. If it works, it means your Struts is outdated, and I recommend finding an upgrade. This jar should work fine, but there are some minor bugs that have been fixed in the latest Struts builds. And that's the state of affairs. See if it works for ya. Arron. I had experience something like this before... Try check out bug ID # 4724356 in Java Bug Parade. http://developer.java.sun.com/developer/bugParade/bugs/4724356.html I'm not sure if this is related but it sounds like it. May be Resin WSAD parse JSP differently. Lucas -Original Message- From: Rouven Gehm [mailto:[EMAIL PROTECTED] Sent: Thursday, December 11, 2003 12:18 AM To: Struts Users Mailing List Subject: Re: Problems with Tomcat and nested:iterate + jsp:include Well the WSAD build in version, which is 1.1beta2. But is it a Struts problem, cause why does it work with Resin WSAD, but not with Tomcat ??? Thanx Rouven - Original Message - From: Arron Bates [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, December 11, 2003 3:34 AM Subject: Re: Problems with Tomcat and nested:iterate + jsp:include Rouven, What Struts version are you running? Arron. Hi there, hope someone has a clue, why this doesn't work with Tomcat, but works with Resin : I have a tile, where i want to show a treelike menu based on the monkey example for the struts-nested taglibs, see my code at the bottom. On the Resin and WSAD server, the tree is shown correctly, but with tomcat (4.1.? 5.0.?), only the first children of each node is shown, and i don't know why, i assume that somehow tomcat only includes the treenode.jsp once, like on PHP where i can you have include include_once. But where can i change this behavior of Tomcat ??? Thanx in advance Rouven submenu.jsp : %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean % %@ taglib uri=/WEB-INF/struts-nested.tld prefix=nested % nested:form action=/treechange.do nested:nest property=rootNode jsp:include page=treenode.jsp / /nested:nest /nested:form --- treenode.jsp : --- [EMAIL PROTECTED] contentType=text/html% %@ taglib uri=/WEB-INF/struts-nested.tld prefix=nested % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % %-- monkey magic goes here --% nested:root img src=%=request.getContextPath()%/pix/spacer.gif width=nested:write property=nodeIndent / height=1 nested:equal property=showChildren value=true nested:notEqual property=level value=0 nested:image src=pix/km_minus.gif property=toggle / nested:equal property=active value=true nested:link styleClass=active page=/goneu.do paramId=method paramProperty=method nested:write filter=false property=nodeName / /nested:link /nested:equal nested:equal property=active value=false nested:link styleClass=notactive page=/goneu.do paramId=method paramProperty=method nested:write filter=false property=nodeName / /nested:link /nested:equal /nested:notEqual br nested:iterate property=children jsp:include page=treenode.jsp / /nested:iterate /nested:equal nested:equal property=showChildren value=false nested:equal property=hasChildren value=true nested:image src=pix/km_plus.gif property=toggle / /nested:equal nested:equal property=hasChildren value=false img src=%=request.getContextPath()%/pix/km_empty.gif /nested:equal nested:equal property=active value=true nested:link styleClass=active page=/goneu.do paramId=method paramProperty=method nested:write filter=false property=nodeName / /nested:link /nested:equal nested:equal property=active value=false nested:link styleClass=notactive page=/goneu.do paramId=method paramProperty=method nested:write filter=false property
RE: Problems with Tomcat and nested:iterate + jsp:include
Yeah!, what she said! :) Arron. PS: Christine, thanks for forcing me to go bug hopping in #17977. Terribly kind of you to re-open the bug. You know, I wouldn't mind if you fixed it yourself and just gave me the patch :P This was a known bug when usning the nested:iterate with an pre- final release of Struts 1.1. (http://issues.apache.org/bugzilla/show_bug.cgi?id=17977) As with your example, the 1.1 beta 2 worked perfectly when running on WebLogic 6.1 sp 3 and later. However, it would fail on Tomcat 4.1X. I upgraded to the Struts 1.1 final release and this error was corrected. However, it sounds as though you might want to take a look at another reported bug since you are using tiles and the nested tags. http://issues.apache.org/bugzilla/show_bug.cgi?id=20854 Hope this helps! Christine From: Lucas [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: Problems with Tomcat and nested:iterate + jsp:include Date: Thu, 11 Dec 2003 01:03:19 -1000 I had experience something like this before... Try check out bug ID # 4724356 in Java Bug Parade. http://developer.java.sun.com/developer/bugParade/bugs/4724356.html I'm not sure if this is related but it sounds like it. May be Resin WSAD parse JSP differently. Lucas -Original Message- From: Rouven Gehm [mailto:[EMAIL PROTECTED] Sent: Thursday, December 11, 2003 12:18 AM To: Struts Users Mailing List Subject: Re: Problems with Tomcat and nested:iterate + jsp:include Well the WSAD build in version, which is 1.1beta2. But is it a Struts problem, cause why does it work with Resin WSAD, but not with Tomcat ??? Thanx Rouven - Original Message - From: Arron Bates [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, December 11, 2003 3:34 AM Subject: Re: Problems with Tomcat and nested:iterate + jsp:include Rouven, What Struts version are you running? Arron. Hi there, hope someone has a clue, why this doesn't work with Tomcat, but works with Resin : I have a tile, where i want to show a treelike menu based on the monkey example for the struts-nested taglibs, see my code at the bottom. On the Resin and WSAD server, the tree is shown correctly, but with tomcat (4.1.? 5.0.?), only the first children of each node is shown, and i don't know why, i assume that somehow tomcat only includes the treenode.jsp once, like on PHP where i can you have include include_once. But where can i change this behavior of Tomcat ??? Thanx in advance Rouven submenu.jsp : %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean % %@ taglib uri=/WEB-INF/struts-nested.tld prefix=nested % nested:form action=/treechange.do nested:nest property=rootNode jsp:include page=treenode.jsp / /nested:nest /nested:form --- treenode.jsp : --- [EMAIL PROTECTED] contentType=text/html% %@ taglib uri=/WEB-INF/struts-nested.tld prefix=nested % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % %-- monkey magic goes here --% nested:root img src=%=request.getContextPath()%/pix/spacer.gif width=nested:write property=nodeIndent / height=1 nested:equal property=showChildren value=true nested:notEqual property=level value=0 nested:image src=pix/km_minus.gif property=toggle / nested:equal property=active value=true nested:link styleClass=active page=/goneu.do paramId=method paramProperty=method nested:write filter=false property=nodeName / /nested:link /nested:equal nested:equal property=active value=false nested:link styleClass=notactive page=/goneu.do paramId=method paramProperty=method nested:write filter=false property=nodeName / /nested:link /nested:equal /nested:notEqual br nested:iterate property=children jsp:include page=treenode.jsp / /nested:iterate /nested:equal nested:equal property=showChildren value=false nested:equal property=hasChildren value=true nested:image src=pix/km_plus.gif property=toggle / /nested:equal nested:equal property=hasChildren value=false img src=%=request.getContextPath()%/pix/km_empty.gif /nested:equal nested:equal property=active value=true nested:link styleClass=active page=/goneu.do paramId=method paramProperty=method nested:write filter=false property=nodeName
Re: Problems with Tomcat and nested:iterate + jsp:include
Rouven, What Struts version are you running? Arron. Hi there, hope someone has a clue, why this doesn't work with Tomcat, but works with Resin : I have a tile, where i want to show a treelike menu based on the monkey example for the struts-nested taglibs, see my code at the bottom. On the Resin and WSAD server, the tree is shown correctly, but with tomcat (4.1.? 5.0.?), only the first children of each node is shown, and i don't know why, i assume that somehow tomcat only includes the treenode.jsp once, like on PHP where i can you have include include_once. But where can i change this behavior of Tomcat ??? Thanx in advance Rouven submenu.jsp : %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean % %@ taglib uri=/WEB-INF/struts-nested.tld prefix=nested % nested:form action=/treechange.do nested:nest property=rootNode jsp:include page=treenode.jsp / /nested:nest /nested:form --- treenode.jsp : --- [EMAIL PROTECTED] contentType=text/html% %@ taglib uri=/WEB-INF/struts-nested.tld prefix=nested % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % %-- monkey magic goes here --% nested:root img src=%=request.getContextPath()%/pix/spacer.gif width=nested:write property=nodeIndent / height=1 nested:equal property=showChildren value=true nested:notEqual property=level value=0 nested:image src=pix/km_minus.gif property=toggle / nested:equal property=active value=true nested:link styleClass=active page=/goneu.do paramId=method paramProperty=method nested:write filter=false property=nodeName / /nested:link /nested:equal nested:equal property=active value=false nested:link styleClass=notactive page=/goneu.do paramId=method paramProperty=method nested:write filter=false property=nodeName / /nested:link /nested:equal /nested:notEqual br nested:iterate property=children jsp:include page=treenode.jsp / /nested:iterate /nested:equal nested:equal property=showChildren value=false nested:equal property=hasChildren value=true nested:image src=pix/km_plus.gif property=toggle / /nested:equal nested:equal property=hasChildren value=false img src=%=request.getContextPath()%/pix/km_empty.gif /nested:equal nested:equal property=active value=true nested:link styleClass=active page=/goneu.do paramId=method paramProperty=method nested:write filter=false property=nodeName / /nested:link /nested:equal nested:equal property=active value=false nested:link styleClass=notactive page=/goneu.do paramId=method paramProperty=method nested:write filter=false property=nodeName / /nested:link /nested:equal br /nested:equal /nested:root - 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: Nested tags always break
Rick, You still having this problem?... can I see the tag markup that's causing the problems?... If the root tag is picking up the name of a valid bean, and the iterate tag has it's property attribute properly set, then I assure you that you don't need the name attribute in the write tag. I'm hoping that there's more to the iterate tag than just the Id. to get foo[i].bar you'd need... nested:root name=someBean nested:iterate property=foo nested:write property=bar / /nested:write /nested:root I haven't really used the id attribute in struts apps since I built the original tags a couple of years ago. So I'm no absolute authority on whether or not the base tags are managing it correctly or what... :P Arron. PS: Love the nested tags always break subject, too. I have a situation where I can use nested:root name=ac, nested:iterate id=foo, and then *must* use nested:write name=foo property=bar, rather than omitting the name attribute. If I do, I get an exception No getter method for property foo[0].bar of bean ac. Now, this code was working fine, but I made some changes to the bean (I'm using torque). I know it's not (or at least, it shouldn't be) a problem in the beans, becuase of the fact that it works fine if I include the name attribute pointing to the id of the enclosing iterate tag. Also, why is it that I can get the struts-digest posting but can't post to the struts list? -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: nested:select - Transfering multiple values in option
Dirk, A standard problem. Many people implement some kind of lookup system to fetch things like drop down values and such. You are right, you do only get the ID, and it's going to be up to you to fetch the value from somewhere if you want to show it to the user again. Most likely the same place that got you the options in the first place. The common solution people gravitate towards is keeping such objects as singletons in memory. That way the lookups are nice and speedy. In summary I'm sorry to say that nothing in life is free :) All the best. Arron. Hello, I'm a student and new to Struts and I've got the following problem, which I have to describe textually, cause the code has not been implemented yet: I've got a form with data to ..ehm... consider a car, which is a value object. This object is stored as an attribute in an ActionForm. Every car has got a product group, which again is an value object and stored inside the car object of the ActionForm. So in the JSP-form I use nested-tags. The root tag is the ActionForm. Then nested:nest property=car And then follows a nested:select property=productgroup - box, showing the names of product groups as labels. The values are the identification codes of these product groups. It's only possible to choose one of the groups. Now, if I submit the form, the choosen product group will be stored inside the car object and the car object inside the form object. But only the id of the product group is stored, whereas the label is not. And thats my problem, because I'd like to show the name of the choosen product group on a following jsp-page before it will be saved in a database. But I only get the id, cause I can't declare more than one value for an select-box. Any idea or workaround? Thanks a lot, Dirk Liebscher - 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: Nested tags : Desperately trying to get recursion to work
Jyothi, You still having problems with this? Sorry that I haven't gotten back to you, but work's been quite busy and not enough hours inbetween. Just let me know. Arron. PS: you'll get my attention faster with this email address. :) Hi, I am very new to nested tags and I am trying to display a tree using nested tags. I followed Arron's MonkeyTree example. I have been getting 'javax.servlet.ServletException: Cannot find bean in any scope' exception (I have pasted exception trace at the end of this email) . I cannot seem to understand why it's not able to find the bean. Following is my main jsp files and struts-config.xml .. I was able to run Arron's MonkeyTree example successfully. MonkeyTreeBean class populates 'monkeyTree' (TreeNode) in it's construtor. My Form bean does not populate the tree in construtor. Instead it populates the tree in the action class and then forwards to the Tree.jsp. Can somebody suggest a pointer on how to solve this problem? Thanks in advance, Jyothi Tree.jsp PS: It has a base jsp page which inserts nested:form template:put name=contents nested:write name=deviceObjectsOMADMTreeForm property=treeName /hrnested:nest property=omaDmTree jsp:include page=omadmNode.jsp //nested:nest /template:put omadmNode.jsp [EMAIL PROTECTED] contentType=text/html% %@ taglib uri=/WEB-INF/tld/struts-nested.tld prefix=nested % nested:root nested:write property=objName / /nested:root struts-config.xml form-bean name=deviceObjectsOMADMTreeForm type=com.openwave.opm.ui.configuration.deviceobjects.TreeForm/ . . . action path=/configuration.deviceObjects.omadmTree type=com.openwave.opm.ui.configuration.deviceobjects.HSParamAction name=deviceObjectsOMADMTreeForm parameter=action scope=session validate=false forward name=omadmList path=/scripts/configuration/deviceobjects/omadmList.jsp/ /action Exception javax.servlet.ServletException: Cannot find bean in any scope at org.apache.jasper.runtime.PageContextImpl.handlePageException(Unknown Source) at org.apache.jsp.omadmNode$jsp._jspService(omadmNode$jsp.java:370) at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(Unknown Source) at org.apache.jasper.servlet.JspServlet.serviceJspFile(Unknown Source) at org.apache.jasper.servlet.JspServlet.service(Unknown Source) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationDispatcher.invoke(Unknown Source) at org.apache.catalina.core.ApplicationDispatcher.doInclude(Unknown Source) at org.apache.catalina.core.ApplicationDispatcher.include(Unknown Source) at org.apache.jasper.runtime.JspRuntimeLibrary.include(Unknown Source) at org.apache.jsp.omadmList$jsp._jspService(omadmList$jsp.java:498) at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(Unknown Source) at org.apache.jasper.servlet.JspServlet.serviceJspFile(Unknown Source) at org.apache.jasper.servlet.JspServlet.service(Unknown Source) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationDispatcher.invoke(Unknown Source) at org.apache.catalina.core.ApplicationDispatcher.doForward(Unknown Source) at org.apache.catalina.core.ApplicationDispatcher.forward(Unknown Source) at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:10 69) at com.openwave.cdp.ui.CdpRequestProcessor.doForward(CdpRequestProcessor.java:7 6) at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProces sor.java:455) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279) at com.openwave.cdp.ui.CdpRequestProcessor.process(CdpRequestProcessor.java:85) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown Source) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown Source) at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown Source) at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source) at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source
Re: form submit - nested property problem
I think that the mix of original Struts tags and nested tags is getting you a little confused. Using the nested:text tags and such inside a basic iterate tag will yield no benefit, may as well use the plain logic and html tags. Try this nested tag markup... nested:root name=fagtypeform nested:iterate property=fags nested:text property=fagDetail.navn / nested:checkbox property=fagDetail.ekstraTekst / /nested:iterate /nested:root ...it's much simpler. Don't have to worry about having indexed=true and other such mess, the nested tags will work it out. Basically, when using the nested tags, just use the nested tags and most of your worrys will be over. All the best. Arron. Great! On 08/28/2003 02:19 PM Heather Buch wrote: OK. I worked it out. It was necessary that the id in my iterate tag (and thus the page scope bean referenced by html:checkbox) have the same name as the getters/setters in my form bean. In other words, if my form bean has: getFag() setFag(int index, Fag whatever) my iterate tag has to look like this: logic:iterate name=fagtypeform property=fags id=fags indexId=ctr and not like this: logic:iterate name=fagtypeform property=fags id=mickeymouse indexId=ctr That was it! Heather --- Hi Adam, Thanks for the reply. I tried setting the form to request scope and doing this: public void reset(ActionMapping mapping, HttpServletRequest request) { logger.info(calling reset, Fags has + _fags.size() + elements ); for(int i = 0; i 106; i++) { Fag myfag = new Fag(); FagDTO myfagdetail = new FagDTO(); myfag.setFagDetail(myfagdetail); _fags.add(myfag); } } But now, the form just submits blank fags. If I set my form to session scope and override reset, it keeps my list of fags intact, but does not change their properties according to the changes I make in the form one bit. I am wondering, with this jsp code: logic:iterate name=fagtypeform property=fags id=fager indexId=ctr nested:text indexed=true name=fager property=fagDetail.navn / nested:checkbox indexed=true name=fager property=fagDetail.ekstraTekst / /logic:iterate which (if any) of these methods from FagTypeForm is being called when I hit submit: public void setFags(List fags) { _fags = fags; } public void setFags(Fag[] fags) { for (int i = 0; i fags.length; i++) { _fags.add(i, fags[i]); } } public void setFags(int n, Fag fag) { _fags.add(n, fag); } And I am wondering, CAN I even update a member of a bean directly via a form? Or do need to set Strings in my ActionForm, and then use my Action to pull the Strings out of the ActionForm and then set them into the beans. But it seems like other people have updated beans directly from their ActionForm. I grew further confused when I read about The Wrinkle with Indexed Tags at http://jakarta.apache.org/struts/faqs/indexedprops.html. Perhaps the name in my checkbox needs to refer to the form, instead of the page scope bean (the id from my iterate tag). Geez I am confused! Heather Hi Heather, it sounds like you are not instantiating any nested beans to store the request parameters in. You should do this in your reset method. Adam On 08/27/2003 08:31 PM Heather Buch wrote: I am trying to figure out what happens to the value of my nested checkbox when I submit my form. I have a bean: public class FagDTO { with setter/getter methods for a boolean: //for fagtypeform public void setEkstraTekst ( boolean ekstra_tekst ){ logger.info(setting ekstra tekst to + ekstra_tekst + for + this.getEkskode()); _ekstra_tekst = ekstra_tekst; } public boolean getEkstraTekst (){ return _ekstra_tekst; } I have an ActionForm with setters/getters which return a collection of Fag beans (The above FagDTO beans are nested one-to-one in the Fag beans. Fag means class in Danish BTW): public class FagTypeForm extends ActionForm { protected List _fags = new ArrayList(); public void setFags(Fag[] fags) { for (int i = 0; i fags.length; i++) { logger.info(setting fag property + fags[i].getFagDetail().getEkstraTekst() + for fag + fags[i].getFagDetail().getNavn()); _fags.add(i, fags[i]); } } public void setFags(int n, Fag fag) { logger.info(setting fag at + n); _fags.add(n, fag); } public List getFags() { return _fags; } public void reset(ActionMapping mapping, HttpServletRequest request) { logger.info
RE: Nested Tags
The nested tags are simply different. The advantages of using them is not replicated in the JSTL/EL or any other tag system. The nested tags directly extend the Struts html, bean and logic tag library and add the nested context. Because they are different, they have never been on the recommendation list of many developers on this list, but those that do use them think that they're the duck's nuts because it is quicker and easier to develop more complex views. All in all, you'd have to take a look and see if it's a good fit for you personally. Take a walk through the primer here... http://keyboardmonkey.com/next ...if all you want to do is stay in vogue technology, you'll probably turn to the JSTL. Arron. Thank you all, I just wanted to see if there are going to be phased out in favor of something else... like in the case of bean and logic tags in favor of JSTL ones. Thanks again, Erez -Original Message- From: Andrew Hill [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 26, 2003 3:43 PM To: Struts Users Mailing List Subject: RE: Nested Tags The power of nested tags cannot be understated. Id advise you to use them (where applicable) for they are really useful, they make simple a lot of things that would otherwise be a nightmare to implement. -Original Message- From: Erez Efrati [mailto:[EMAIL PROTECTED] Sent: Tuesday, 26 August 2003 22:12 To: 'Struts Users Mailing List' Subject: Nested Tags Hi all, What is the status with nested:xxx tags? Should I use them or should I avoid using them? Thanks, Erez - 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: [FRIDAY] Struts 1.1 votes passes, but, sadly, my cat died
You're talking of one of the greatest books of all time... Red Dwarf. Lister bought the cat to annoy Rimmer. Cat dies eventually of old age in the cargo hold before starting the race of cats which brought on the Cat character we all know and really dig. If you say it's not, you're lying or you haven't read the book. If not, do so. too funny. :P The Cat is mentioned on the dust jacket, but his mum, who dies, isn't. I think you're lying to the user group and should come clean. :) Arron. I'm pleased to report that a unanimous majority of the Struts Committers have voted to release Struts 1.1 on or after Sunday June 29, 2003. =:) !!! But, sadly, my elderly cat has died of liver failure. =:( Unsurprisingly, this news is a thinly veiled segue to ... [Yet Another Quote Trivia Contest] Which of our favorite Science Fiction authors wrote a novel in which a key character was a cat that, sadly, died? A signed Struts in Action goes to the first lucky subscriber to email the corrected title and author to me directly at [EMAIL PROTECTED] -Ted. -- Ted Husted, Struts in Action http://husted.com/struts/book.html - 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: Nested recursion does not recurse!
All the markup seems fine. This is very indicative of the older Struts on the newer tomcat. Double check the version of Struts. 4.1.x was broken with recursion and such things, but it's fixed for RC2. As a last resort, try this jar... keyboardmonkey.com/downloads/km-nested-v2.03.jar ...throw it into the WEB-INF/lib directory. It has just the new nested tags, should show if it's the tag version being out of whack. Sandeep: The new version of the tags above, doesn't need a nested:root for included pages. Now all the tags now use the request object to hold their references, all the nested tags just look for that rather than look at the current JSP's tag layout. It just means that as long as the nested structure is started (nested:form, nested:root, any nested parent tag), any include file can just mark up child tags like normal and it should work. I probably wouldn't have done this on purpose, but using the request object use was the only way I could get the new tomcat working for some reason. Arron. Are you sure you want to include a page that has a form in it? nested:form, nested:nest and nested:iterate all start a new root element that nested will use. Whenever you do a jsp:include always do a nested:root at the beginning if you are using nested tags. sandeep --- Chris Hatton [EMAIL PROTECTED] wrote: Hi, everyone, Am I crazy? I have been trying to get recursion to work using Arron's examples at keyboardmonkey and it absolutely will not recurse. It just repeats the very first element. Here's what I get displayed in my HTML results: -- USA - productTree ALABAMA - productTree.treeNodes[0] ALABAMA - productTree.treeNodes[0] ALABAMA - productTree.treeNodes[0] ALABAMA - productTree.treeNodes[0] -- Why is the same nested level repeated over and over? Note: my Form class returns Object arrays (i.e. TreeNode[] getTreeNodes()). Here's productNode.jsp: -- %@ taglib uri=/WEB-INF/tld/struts-nested.tld prefix=nested % nested:root nested:write property=label / - nested:writeNesting/br nested:equal property=isExpanded value=true nested:iterate id=node property=treeNodes jsp:include page=productNode.jsp / /nested:iterate /nested:equal /nested:root -- And the relevant code from product.jsp: -- nested:form action=submitJob.do method=POST . !-- Begin Product Tree -- nested:nest property=productTree jsp:include page=../product/productNode.jsp/ /nested:nest !-- End Product Tree -- /nested:form -- I should note that I set isExpanded (i.e. showChildren) to true for the very top-level element. I do have other (non-nested) Struts tags included in this page outside the ProductTree code. I'm on Tomcat 4.1.18, RedHat 8.0, Struts 1.1 rc2, jdk 1.3.1_07. Thanks! Chris Hatton Tobin International -- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.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: StrutsMonkey
The MonkeyStruts example initiates everything in the constructor of the beans, and because they're in session memory, there's no issue with having to manage anything with regards to request scope and bean population. Result: nasty code in the constructors that shouldn't be duplicated in a real system. The code is found in the beans themselves. The beans of a nested structure should be built and managed from actions like all other good Struts objects. All the beans in the nested structure shouldn't know how they're built, and are basic beans like all good form beans. Any business logic in the beans will make things messy very quick. The MonkeyStruts example is mainly geared to be an example of how easy and powerful the tags are, rather than a good example of bean management. In this respect the example needs a rework. This the info you're after?... Arron. attention mr. aaron bates and for those who saw the StrutsMonkey example in the keymonkey site, could you please help me out hereim tracing through the source code of it but i cant see where the BananaBunch and BananaBean were instantiated for them to be used in the jsp. as i understood, when the form was populated, the monkeyteambean is been populated with the monkeyworkers right? and then the connection of the beans stops there, but where is the realizations of the bananabean and bananabunch? and in the jsp there is a pickedBunches property, where did you get that? i find your example very neat and very helpful in what im doing right now, so that's why i have to understand it very well, thanks. -- Frances Aleah Z. De Guzman SA/Programmer Ingenium Technology, Inc. http://www.ingenium.com.ph Disclaimer : This message is intended only for the named recipient. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: nested:link with multiple parameters
Usually, I have a Map property in my bean which makes the links for that given object. For example, my links tend to go something like... nested:link action=/testAction property=linkParams / ...bean code for the getLinkParams getter for the property looking like... public Map getLinkParams() { Map m = new HashMap(); m.put(key, key); m.put(name, name); return m; } ...that way my bean objects typically know what it takes to link them to another page, and they can hack the mapping of name values as much as required when called. Works a treat for me. All the best. Arron. Could someone please provide a simple example showing the use of nested:link with multiple parameters? According to the documentation: This tag is an extension of the html:link tag. Please consult its documentation for information on tag attributes and usage details. According to one book on Struts: To pass multiple values to ... [an html:link tag] ... you must use a map.. Basically, I just want to created a link to an action and pass the action two name/value pairs. Thanks. Mike - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: nested tags
The nested tags extend the Struts html and logic tags. So to use an OO analogy, the nested tags is to the logic tags the same way that a Ferrari is to a car. :P Nested tags organise two things. The bean reference (the name attribute), and the property property. The property property is the most important, as it's what gets everything mixed up. You could always have in the original tags... html:text name=myBean property=one.two[1].three(key).prop / ...the above being the translation of a nested bean down, an indexed list and a mapped list. But you have to do this for every tag, and it's very messy. Getting it all to happen quick and easy is another story. The nested tags mean you can simply go... nested:root name=myBean nested:nest property=myBean nested:iterate property=two nested:iterate property=two nested:text property=prop / /nested:iterate /nested:iterate /nested:nest ...and have the complex property property figured out for you. The rest of the logic tags simply allow other logic to happen against the current nested object, like value comparisions etc. If you use nested tags for the html input, the logic tags will also simplify managing around them. When it all comes down to it, the nested tags figure out the name and the property of the current object, and call the super class which is the original Struts html or logic tag and let them do all the grunt work or writing Html etc. The keyboardmonkey site has a walk-through/tutorial on them if you want to start playing. Arron. Nested tags rock whereas logic tags, while perhaps doing the same thing are more cumbersome. Scoping is much more intuitive - instead of having to talk about 'myForm.myContainer.myObject, you can just use nested:iterate and nested:nest to make your code much easier to read. And, since you can write snippets to the more localized scope, they can be reused on multiple pages. And, if that wasn't enough, you can do recursion with nested. See the www.keyboardmonkey.com site for examples, etc. -jeff On Monday, June 9, 2003, at 08:56 PM, Frances Aleah Z. de Guzman wrote: what is the difference between nested tags and html tags? -- Frances Aleah Z. De Guzman SA/Programmer Ingenium Technology, Inc. http://www.ingenium.com.ph Disclaimer : This message is intended only for the named recipient. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: nested tags
My questions are : 1. Does the nested tag lib require struts to be used ? I have nested-tag.jar and struts.jar in the WEB-INF/lib but the application is not based on struts framework. It is an MVC app but with our own controller servlet and mapping(like struts-config). When I tried, I got this dreaded error : Cannot find message resources under key org.apache.struts.action.MESSAGE' javax.servlet.ServletException: Cannot find message resources under key org.apache.struts.action.MESSAGE at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:494) This makes me wonder if struts framework is actually needed for nested tags. Any help would be appreciated.. They extend the Struts tags, so to that end they need the struts library on hand to even run. As for a set-up and running Struts app, it would depend on what tag you're using. The above seems a little fuzzy and trying to get a hold of the ApplicationResources.properties messages, which does need the Struts Servlet fired up. While the theory is sound about using beans and properties etc etc, The Struts tags were geared for nothing but Struts apps, so you could be in for anything with regards to implementation problems. It would be easy to get the nested paradigm working without the Struts tags, but they do all the grunt work with regard to making Html etc. 2. I can't do a nested:define in my included JSP as I get a null pointer exception. Main jsp : nested:root name=docs nested:nest property=treeNode nested:iterate property=childCollection jsp:include page=docnode.jsp / /nested:iterate /nested:nest /nested:root docnode.jsp (this recurses): nested:root nested:equal property=showChildren value=true nested:define id=imgState value=open18x16.gif / /nested:equal !-- restof html code-- nested:iterate property=childCollection jsp:include page=docnode.jsp / /nested:iterate /nested:equal /nested:root What am i doing wrong? The nested:define in this case doesn't seem to be related to a bean property. nested:define is about making a variable out of a property which is relative to the current nested object. Struts' original bean:define may be the answer, as the nested tags only care about one thing... nesting (and can't forgive them for that :P ). You may even want to consider a... *cough*... scriptlet to get at the string value. Arron. thanks arvind --- Jeff Kyser [EMAIL PROTECTED] wrote: Nested tags rock whereas logic tags, while perhaps doing the same thing are more cumbersome. Scoping is much more intuitive - instead of having to talk about 'myForm.myContainer.myObject, you can just use nested:iterate and nested:nest to make your code much easier to read. And, since you can write snippets to the more localized scope, they can be reused on multiple pages. And, if that wasn't enough, you can do recursion with nested. See the www.keyboardmonkey.com site for examples, etc. -jeff On Monday, June 9, 2003, at 08:56 PM, Frances Aleah Z. de Guzman wrote: what is the difference between nested tags and html tags? -- Frances Aleah Z. De Guzman SA/Programmer Ingenium Technology, Inc. http://www.ingenium.com.ph Disclaimer : This message is intended only for the named recipient. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. - 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] __ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.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: Nested indexed reference problem
BeanUtils inside Struts can't deal with the two indexes back to back ([i][k]). The reason why the original logic:iterate works, is because it cheats (yes, it cheats). Because it doesn't care about its children, all it does is get the collection using childs[1] and then makes a bean. It's this bean you're using in the write methods. Whereas, the nested tags simply organise the properties and then pass it to where it's being used, in this case the write tags, with property groups.childs[1][0].name. But as I mentioned, bean utils can't handle it. To get it working, you'll need to wrap the second collection in a simple bean so you can get at it with another property like groups.childs[1]another[0].name. Hopefully it wont be too much of a refactor, but beanUtils can't play with it as-is. All the best. Arron. Hi all ! My jsp contain the following code : nested:form action=/admin.gp?ACTION=getGroups type=gaston.project.struts.user.AdminAction name=SESSIONUSER nested:nest property=groups nested:write property=root.name/br (A) nested:iterate property=childs[1] (B) nested:write property=name/br /nested:iterate /nested:nest /nested:form the error related to the line (B) is : javax.servlet.ServletException: No getter method for property groups.childs[1][0].name of bean SESSIONUSER at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:471) I've several hypothesis according to this but nevertheless I can't go further :-( for info, the following code works well : logic:iterate id=thegroups name=SESSIONUSER property=groups.childs[1] bean:write name=thegroups property=name/ br /logic:iterate and ... I need nested tags for recursion and I don't want to change the implementation of my bean wich uses an hashtable to record the child node/parent node relations ... and an another simple related question (wich, I guess, doesn't need a new thread for it) : how do I write childs[id] instead of childs[1] ? ... property=%='child['+id+']'% doesn't work and I don't know how to manage this with nested:define's tag thanks for help JM ps : I've already take a look at www.keyboardmonkey.com ;-) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Branch Too Large Exception with Nested Iterator
Hi, 1) I am using Nested Iterator to display the content as text boxes. In each row I have 10 fields, If the rows are increasing I am getting the Branch Too Large Exception. I have 3 types of grids in a page, If I kept 2 Grids it is working fine, If I kpet 3 Grids then it is giving error. jsp converted java file size is 384KB (5500 lines). Their is any limitation for J2EE container w.r.t jsp size ? 2) To over come above problem I tried to include as separate jsps (each grid as separete jsp), It is asking form tag in that jsps. My requirement is I need to submit 3 Grids at a time when the user Clicks the update button. Any suggestions on this. Their is any other way to display the nested:iterator Grids with out using form tag (like logic:iterator by using id). Thanks in Advance, Ashok.D There is a limit to the size of a single method in a Java class (62K), and there's tricks that JSP compilers use to get around it. Obviously you container has gotten around it to a point. You're already starting to make some includes which should alleviate the pain. Regarding losing the form tag, the nested tags can use the nested:root tag to start things off with a bean reference outside of an action. Also, if you can, try using a recent nightly, or latest update of the nested tags themselves (just throw the following jar into the WEB-INF/lib directory)... http://keyboardmonkey.com/downloads/km-nested-v2.03.jar ...only saying this because it will help carve things up into include files, as they use the request object to pass the nested properties and bean reference, meaning you can literally just cut the JSP into includes and include them without worry that the tags in the includes will get the reference. Arron. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts In A Distributed\Clustered Environment.
Struts is the least of your teams performance concerns. It would do you good service to simply take Struts as heling you organise servlets jsp's and go chasing bigger problems like persistence and selection of architecture app server. Struts doesn't change the Servlet model. It doesn't change the approach to servlet threading. Servlets are singletons, so are Actions, for all the same good reasons. Struts just helps you keep a tidy house on the interface tier. Trust us when we say that all the stuff to worry about happens out the back. These bigger picture things are better asked to forums like... http://www.theserverside.com ...you'll even get opinions of those using Struts to front large applications. You can even get opinions down to the design pattern level. TheServerSide.com itself runs on a cluster of app servers from four different vendors. I'm pretty sure TheServerSide is exactly what you're looking for. Arron. Hi, Has anybody successfully managed to use Struts in a distributed\clustered environment? If so with what setup? And did you have any Struts related difficulties? Thanks, Tin - 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: Indexed Deep Properties
Working... And here's a little note: html:form action=registrationWizardStep2 nested:nest property=user nested:iterate property=addresses nested:text property=street1 / nested:text property=street1 indexed=true/ /nested:iterate /nested:nest /html:form The line without the index produces: user.addresses[0].street1 The line with the index produces: registrationWizardForm[0].user.addresses[0].zip I find that a little unexpected and bizarre. I'm not sure if it's an issue with the nested:iterate or nested:text tag... Or whether it's just expected functionality that I wasn't expecting. Any opinions on that? Like I said, remove the indexed=true part. It doesn't keep everything in order, and would only confuse things internally. The nested tags take care of all that stuff for you. It's transparent. You only have to supply the property and things like the text fields maxlength etc etc. It's working now, which is sweet. All the best, Arron. Still, it's working, so thanks for the help. -jdr On 5/22/03 4:26 PM, Arron Bates [EMAIL PROTECTED] wrote: I have no idea why you're not getting an indexed property for the user part of that nested property. The only nested tag which has logic to assemble an indexed property is the iterate tag, and this is coming out of the root tag. There is a minor thing though, here you're trying to use a nested:root like a nested:nest. Easy mistake. The difference is that the root tag is there to provide the reference to the bean, where as the nested:nest tag is there to allow for a simple property nest down one level. For your markup, try this... html:form action=registrationWizardStep2 nested:nest property=user nested:iterate property=addresses nested:text property=street1 / /nested:iterate /nested:nest /html:form ...you also had the indexed=true set for the text tag. such things aren't needed for the nested tags, as they sort out all the business with the specifics of where to get down to the bean they're at. In the above code, they'll use whatever bean is set for the name formbean attribute in your Struts-config.xml file. Give that a bash, hopefully it'll get you going. Arron. I'm starting to think this may be a bug with the nested tags and indexed properties. I tried: html:form action=registrationWizardStep2 c:set var=user value=${registrationWizardForm.user}/ nested:root name=user nested:iterate id=address indexId=addressStatus property=addresses nested:text property=street1 indexed=true/ /nested:iterate /nested:root /html:form And now get: input type=text name=user[0].addresses[0].street1 value=100 My Street Anyone know why it's trying to index my parent bean (user) ? Anyone know how I can make it stop? -jdr On 5/22/03 12:14 PM, Jordan Reed [EMAIL PROTECTED] wrote: Better! Okay I've got: html:form action=registrationWizardStep2 nested:nest property=user nested:iterate id=address indexId=addressStatus property=addresses nested:text property=street1 indexed=true/ /nested:iterate /nested:nest /html:form But the HTML it's generating looks like: input type=text name=registrationWizardForm[0].user.addresses[0].street1 value=100 My Street Still wrong... It should the name needs to be: user.addresses[0].street1. Suggestions? -jdr - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Invalid indexed property ?!
Instead of this tag... html-el:multibox property=selectedDrinks[${drinkType}] ...try this one... html-el:multibox property=selectedDrinks(${drinkType}) ...basically the square breaces are for indexed properties. The round ones are for maps. You're trying to drive a map based property, so use the round ones instead. The JavaBean specification defines how these things should be done... http://java.sun.com/products/javabeans/ Arron. c:forEach var=drinkType items=${drinksList.keySet} !-- there is wrapper method for .keySet() -- h3bean:write name=drinkType//h3 c:forEach var=drinkItem items=${drinksList[drinkType]} html-el:multibox property=selectedDrinks[${drinkType}] bean:write name=drinkItem/ /html-el:multibox bean:write name=drinkItem/ /c:forEach /c:forEach I posted this before, but I didn't even get a response saying it was a dumb question, not worth answering, so I'll ask again because I am desperate. I've got to finish this up soon, and I am stumped. Again, sorry for the length - I just want to be clear. I have a form that need to collect some information about a user, using checkbox groups like so: Bourbon [] Jim Beam [] Makers Mark [] Blantons Scotch [] Johnnie Walker [] Macallan [] Lagavulin Beer [] Budweiser [] Heineken [] Duvel Users can select 0 or more from each category, and I would like to use multibox to create the checkbox groups. I created a HashMap of String[]s like so: public HashMap getDrinksList() { drinks = new HashMap(); drinks.put(Bourbon, new String[]{Jim Beam,Makers Mark,Blantons}); drinks.put(Scotch, new String[]{Johnnie Walker,Macallan,Lagavulin}); drinks.put(Beer,new String[]{Budweiser,Heineken,Duvel}); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JAXB vs Digester
Subject: JAXB vs Digester Hi, From what I have seen of JAXB and Digester, both fecilitate xml- java class/object conversion and vice-versa. So what is the difference? When to use what? A couple of very incomplete thoughts: * Digester is one way (XML-Java), JAXB is two way (XML-Java and Java-XML). * Digester is nice for pulling just a few things out of an XML document, JAXB typically wants you to process the whole thing. * Digester rules can be calculated and constructed on the fly as you configure the Digester, and include some interesting matching rules that mean you don't always need to understand the entire document structure. JAXB is more like DOM, giving you a tree structure to process. * Digester lets you deal with dynamic sets of attributes gracefully (i.e. the SetPropertiesRule, for example); JAXB wants you to know them ahead of time. As with most things, it's kind of hard to say that one approach is always going to be better or worse; thinking through both approaches for each use case is probably the best approach -- in particular, I'd implement a couple of simple use cases both ways to see which one appeals to you more. From the horse's mouth. (Not that Craig's a horse, very nice chap. But I have heard that he has a salt lick in his cubicle :). Anyways... If you're comfy with XMLSchema, JAXB's a truly handy thing. Configure all the element types into the xsd, and if the inbound XML is only one of those types, then it will return that object. Very handy. As it stands, digester's only drawback is it's inbound XMl only, and JAXB's strength is that it goes both ways. That said, digester's spiffy for config XML files. Where I find JAXB indispensible, is with VO objects between application layers. If bound objects are used as the only means of communicating with the business tier, it means that the server is ready to dance as an XMl service, all that has to happen is the simple marshaller to get the XMl into Java objects. Naturally, your own application can just go in the tradesman's entrance and pass it the java objects directly. I really dig it. I wish Castor would change ever so slightly to conform to the spec as I like the internals of its generated objects slightly better, but it's all good. I've been using the JAXB since the public was able to get at it, and I'm a happy customer. Enough rant from me... Arron. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] JAXB vs Digester
I don't know why this discussion is happening here but I'll throw in my two cents. Hands down the best one or two way xml-java system is Castor. Wont argue with that. Very fine piece of work. But the JAXB r.i. is quite comparable. Only thing Castor does much better is that you can get the enumeration options. Which is awesome for automatic population of drop-down boxes among other things. With the JAXB RI it's just a validation rule. That's my only gripe so far. I'm just hoping the Castor team makes it JAXB compliant some time in the future. Would be really cool. Arron. -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED] Sent: Friday, April 04, 2003 7:15 PM To: Struts Users Mailing List Subject: Re: JAXB vs Digester On Fri, 4 Apr 2003, Dhulipala, Kris (SCI TW) wrote: Date: Fri, 4 Apr 2003 10:51:50 -0500 From: Dhulipala, Kris (SCI TW) [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: '[EMAIL PROTECTED]' [EMAIL PROTECTED] Subject: JAXB vs Digester Hi, From what I have seen of JAXB and Digester, both fecilitate xml- java class/object conversion and vice-versa. So what is the difference? When to use what? A couple of very incomplete thoughts: * Digester is one way (XML-Java), JAXB is two way (XML-Java and Java-XML). * Digester is nice for pulling just a few things out of an XML document, JAXB typically wants you to process the whole thing. * Digester rules can be calculated and constructed on the fly as you configure the Digester, and include some interesting matching rules that mean you don't always need to understand the entire document structure. JAXB is more like DOM, giving you a tree structure to process. * Digester lets you deal with dynamic sets of attributes gracefully (i.e. the SetPropertiesRule, for example); JAXB wants you to know them ahead of time. As with most things, it's kind of hard to say that one approach is always going to be better or worse; thinking through both approaches for each use case is probably the best approach -- in particular, I'd implement a couple of simple use cases both ways to see which one appeals to you more. Thanks, Kris Craig - 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: [OT] My Struts webapp and hosting
Yeah, well *I've* been using KGB for longer! :D Seriously, the service is very good. In all the curly ones I've thrown him, I've never had an issue not resolved. Including having X service support for dynamically generated images wasn't a problem. And if you take on more sites, he'll also thrown them into your tomcat instance (rather than a different communal one) and charge the shared rate (lower price of the shared rate, but you still get control of the VM). Is good, I'm a happy customer. Arron. I *highly* recommend KGB Internet. I've been using them for almost a year and they've got the best customer support I've ever seen from an ISP. Keith responds within 5 minutes (via e-mail) usually to requests. They also give you your own Tomcat instance that you can stop/restart and do whatever you want with - even upgrade! Matt -Original Message- From: Steve Armstrong [mailto:[EMAIL PROTECTED] Sent: Saturday, April 05, 2003 8:59 AM To: Struts Users Mailing List Subject: RE: [OT] My Struts webapp and hosting Quick plug for inexpensive Java web app hosting: http://www.kgbinternet.com/ Cheers, -Steve -Original Message- From: Guido [mailto:[EMAIL PROTECTED] Sent: Saturday, April 05, 2003 7:19 AM To: [EMAIL PROTECTED] Subject: [OT] My Struts webapp and hosting ... Now the application is in my PC with Tomcat because I have not found any very cheep_ Struts hosting. - 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: Does a degree matter?
Brandon, If you can do the deed (which it sounds like you can), I would hazard offering my opinion in thinking that it wouldn't be the best use of your time. By education I'm a graphic designer, not a computer scientist. First job was web design, programmer ever since. Results... I've only had two places not take me on because it's not a computer degree. Two interviews of hundreds. Not having the comp sci degree hasn't been a thorn in my side. People just worry that you can get the job done. I've worked along side people with masters, and some rock, other's aren't fit to fetch me my coffee... :P ...most employers recognise that (and as a result, get better people to fetch me my coffee). If you're thinking about spending time to put yourself out there... I reckon the best thing I ever did was while away some hours eventually becomming a participant in an open source project. Followed with a tiny site with some tutorials, helping a few people out along the way. It's been a good thing. I'd just tend to say, pick a project that scratches and itch, write something for it, and put it out there. The big plus is that in an interview, if the topic comes up that touches on the topic that your thing works against, you can spiel about it with great enthusiasm which is hard to ignore. But, if there's something at uni that you want to scratch an itch, I'd probably go ahead with it. I'd love to go to uni to do 3D graphics, but it's hard for me to be pragmatic when the end result is still just looking for work. Then you add to the mix that getting a job is more than just your quals. It's interview technique (spielability skills), are you confident, communicate, etc etc. Which is another entirely depressing rant all together. Anyways, it's all just my opinion. All the best mate. Arron. Hey all, I'm trying to make a decision as to what I am going to do. I am sucking wind on profitable work. So, I was thinking about going to school and getting a BA in Comp Science to make myself more attractive in the job market. Is it really worth doing? I've been doing development for 5 years professionaly. 2 years Perl and ASP, 3 years Java. Prior to that I was hobbying in those languages on my own. My knowledge is competitive with anyone else in my realm of experience. Anyways, I was just wondering how important you all think a BA in Computer Science is for a family man trying to give his career a boost. Brandon Goodin - 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: [OT] tree control
Dan, Using the Struts nested tags, you can get JSP's to go recursive, allowing all the freedom in markup that you're used to without having to wade through code that most tree controls work within. It's so simple, some sod's even made a tutorial... http://keyboardmonkey.com/pilotlight ...the part which says JSP Recursion and TREES!!!. If you want to plug and play, the milestones of the tutorial's downloadable (minus Struts distro). If you're running Tomcat 4.1.x, you'll want to put the following jar into the WEB-INF/lib directory (its in Struts core for the upcoming RC2, but missed the RC1 boat)... http://keyboardmonkey.com/downloads/km-nested-v2.03.jar Anyways, it should scratch the itch, give it a bash. Arron. Folks, I am looking into using a tree control in my web app. I noticed that the tomcat admin app is struts based and uses a control.tld tag library , a org.apache.webapp.admin.TreeControlTestAction class and a org.apache.webapp.admin.SetUpTreeAction class. Any pointers, docs, lessons learned, etc. from anyone adopting a similar tree control for their project? Pardon if this is a repeat... tia, Dan McGowan - 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: working with a team
Stephen Smithstone ([EMAIL PROTECTED]) wrote: Have u tried sharing the drive as a network drive with permissions on it ?? then get the jsp developer to map the network to a drive on his computer We aren't even in the same county, so this will be a little hard. I guess a good question to ask would be, can an ant script build on a remote computer? I think the answer to this is yes, but of course I have to figure out how to do it ;( I guess CVS is the way to go...sure would be nice if someone wrote an article on this though. Sometimes the hardest part is just setting everything up. If the main thing that you're after is JSP's, just have your markup dude FTP the JSP's directly into the web app, and have the servlet container reload them automatically without restart?... Static resources like images will be naturally handled. If you run Resin, it'll recompile the java classes on the fly too. Arron. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: nl2br taglib
Nice piece of work, it looks familiar... http://www.mail-archive.com/[EMAIL PROTECTED]/msg63442.html ...never thought feedback on the solution would be like this, but each to their own. For those interested, the link contains code which can be used for any such filter operation. Arron. I truly believe that nl2br would be a most excellent taglib. Already my web developer has thanked me 10 times for making this tag for him. Here is why. Often times the jsp developer needs to include a large about of descriptive text with paragraph breaks. Normally he/she would have to flood the document with br / tags to get the formatting (or p tags or whatever). By using this tag, the jsp developer can just type filter:nl2brThis is a lot of text But I need to have breaks in the text But I want to just copy from the text editor and not have to do further work./filter:nl2br I am thinking the filter could do other things, such as wordwrap, perhaps nl2p for p tags around the line break sections, and a horde of other options. Any one think a filter taglib set would be a good idea? If we are out to save the jsp developers time, this seems like a viable solution to me. I will post the code if anyone is interested, but it wanted that complex. Dan -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Daniel Allen, [EMAIL PROTECTED] http://www.mojavelinux.com/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Real programmers just hate to get up in the morning, and contrary to Ordinary People, they're in better shape as it gets closer to nighttime. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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 tag addition proposal
David Graham ([EMAIL PROTECTED]) wrote: This kind of logic is better done in an Action, not in the view layer. David I disagree in this case. Assets should only be the concern of the view and sometimes, the view has to make sure that a certain state exists before it can display the asset. For instance, if the view expects a background graphic to be setup in the action, it might need to verify it exists to ensure that it does not break what it is displaying. To me this makes perfect sense as a precaution against a bad view component. The direct path shouldn't be checked in the action because the action wouldn't necessarily know the base location for the asset. An action would have to take the upload of the file, and copy it just so it's ${menbername}.jpg, and then put it in the right directoy. An action knows how to do this, why wouldn't the application then know how to find it?... If the image is able to be changed by the client, the Action would have to know where it is to find it and replace it. Actions have to know where the image is. Arron. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] suggestion for getting properties
Dan, What's wrong with simply using a List then?... Sounds like all you want to do is get at things in an order, and the amount and what they are aren't the semantics by which you'll be managing the list. Another way is to yield the map/list getters setters to the same thing and manage it internally. String getPhoneByKey(String key) void setPhoneByKey(String key, String phone) String getPhoneByIndex(int index) void setPhoneByIndex(int index, String phone) ...or... Map getPhoneMap() List getPhoneList() ...second options is easiest, but will be harder to manage the content. Another way would be to make your own Collection object (which is just a thin wrapper around an internal ArrayList HashMap) that implements Map and List, and does everything you need storing things against keys and indexes, and makes sure that when things are managed in one collection it's reflected in the other. Just an option. Arron. I don't think this would give the result you are looking for. A map will map a key to a value, and so in the above example, no mattery how many numbers you add to the map, there will only be 2 numbers in the end: the one mapped to phone and the one mapped to fax. I don't think you quite understood my question, so let me rephrase. For a single company, I want to get a map of the variety of phone numbers. There are many different types of phone numbers these days and when displaying on the jsp page, it is messy to have so many checks for empty numbers to find the type the company actually uses. My goal was, for a single company, to get a map of the phone number varieties to iterate on. The problem was, when I used the type as the key and the number as the value, the map would reorder the number arbitrarily, so when I display them fax would come first and phone would come last. Now do you see where I am going? Dan -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Daniel Allen, [EMAIL PROTECTED] http://www.mojavelinux.com/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Real programmers just hate to get up in the morning, and contrary to Ordinary People, they're in better shape as it gets closer to nighttime. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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: [Q] Hierarchy display taglib?
No taglib itself, but nested tags will allow the recursion to happen and thus make the tree. Try this... http://keyboardmonkey.com/pilotlight ...the JSP Recursion Trees! part. It should do the trick. Arron. Is there a taglib for presenting hierarchically defined content in a JSP that contains open/close icons etc? Jefficus - 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: nl2br taglib
Dan, I think that you may have better luck in a tag that doesn't actually extend or particularly work around the write tag, but simply filters the results of body content. That way your not just restricted to filering the content of a bean property. Markup would be like... mylib:nl2br whatever nested:write property=something //mylib:nl2br ...And in this would could get the advantages of nested tags or whatever form you wanted. It also means you don't have to worry about blocking/supporting the logic of any underlying tag. The tag class itself would look like... // import whatever public class NL2BR extends BodyTagSupport { public int doAfterBody() throws JspException { if (bodyContent != null) { String filteredContent = bodyContent.getString(); // filter here... ResponseUtils.writePrevious(pageContext, filteredContent); bodyContent.clearBody(); } } } ...this should, in theory, do the trick. No properties or anything, simply filter whatever comes through in the body content. Arron. PS: get my mail the other day?... email client plays funny buggers at times, so I don't know what's sent and what's not. ...see, I'm fading here...trial #2 Dan [WriteTag.java] package net.creativerge.struts.taglib.bean; import javax.servlet.jsp.JspException; import org.apache.struts.util.RequestUtils; import org.apache.struts.util.ResponseUtils; public class WriteTag extends org.apache.struts.taglib.bean.WriteTag { protected boolean nl2br = false; public boolean getNl2br() { return nl2br; } public void setNl2br(boolean nl2br) { this.nl2br = nl2br; } public int doStartTag() throws JspException { // Look up the requested bean and skip if ignoring and it does not exist if (ignore (RequestUtils.lookup(pageContext, name, scope) == null)) { return (SKIP_BODY); } // Look up the requested property value Object value = RequestUtils.lookup(pageContext, name, property, scope); if (value == null) { return (SKIP_BODY); } // Convert value to the String with some formatting String output = formatValue(value); // filter xml characters if requested if (filter) { output = ResponseUtils.filter(output); } // convert endlines to br / tags if requested if (nl2br) { output = output.replaceAll(\n, br /); } // Print this property value to our output writer ResponseUtils.write(pageContext, output); // Continue processing this page return (SKIP_BODY); } } -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Daniel Allen, [EMAIL PROTECTED] http://www.mojavelinux.com/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - There is no such thing as a casual knowledge of xslt, either you know everything about it or you are sitting in the creek. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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: Question about NestedIterateTag (also: nested:iterate nested:root)
Have you tried the latest and greatest nested tags?... An update changing all the internals that would affect this have changed. It went in after RC1, so either fetch a nightly, or simply download... http://keyboardmonkey.com/downloads/km-nested-v2.03.jar ...and pop it into your WEB-INF/lib directory and spin your container again. If the problem persists, please get back to me. Arron. I've also attached all test files to the bug report at: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17977 Personally, I'm seeing more of a problem with the actual names re: the nesting level rather than the actual objects, but your problem could be a symptom of the same issue too. chris -Original Message- From: Bhamani, Nizar A TL56E [mailto:[EMAIL PROTECTED] Sent: Thursday, March 13, 2003 4:31 PM To: 'Struts Users Mailing List' Cc: Chris Butler Subject: RE: Question about NestedIterateTag (also: nested:iterate nested:root) Didn't get the attachment. May be the discussion group filtered it out. Can you send it to me in an email separately. Thanks, -Original Message- From: Chris Butler [mailto:[EMAIL PROTECTED] Sent: Thursday, March 13, 2003 4:28 PM To: Struts Users Mailing List Subject: RE: Question about NestedIterateTag (also: nested:iterate nested:root) I seem to be having a very similarly related problem with respect to nested:iterate and jsp:include. I've found that the index is lost and it always finds the name for the first element in the collection only. A simple test that I've done - I've attached. Chris -Original Message- From: Bhamani, Nizar A TL56E [mailto:[EMAIL PROTECTED] Sent: Thursday, March 13, 2003 4:01 PM To: 'Struts Users Mailing List' Subject: Question about NestedIterateTag We have written our own tag to print a bunch of fields read from an XML file. I am using various NestedTextTag, NestedRadioTag, NestedSelectTag, NestedOptionsTag and it all works fine. I had to enhance this to use iterations of a list of fields and am using NestedIterateTag. However using NestedIterateTag dosen't seem to iterate over the collection As expected. It just prints prints out the first object from the collection. Has anybody has experience using the NestedIterateTag ??? Here is the logic in short: public class MyTag extends NestedWriteTag implements NestedNameSupport { public int doStartTag() throws JspException { // Some stuff removed NestedIterateTag iterateTag = new NestedIterateTag(); iterateTag.setParent(this); iterateTag.setPageContext(pageContext); // theCollectionProperty is of ArrayList type. iterateTag.setProperty(theCollectionProperty); iterateTag.doStartTag(); // Do some stuff to use NestedTextTag, NestedRadioTag etc and // set their parent as iterateTag. iterateTag.doEndTag(); return (SKIP_BODY); } } Again, the iteration works only for the first element in the collection. Doesn't work for all the elements in the collection. Any help would be appreciated. Thanks, Nizar. - 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: nested:iterate jsp:include, nesting reference incorrect?
Have you tried the latest and greatest nested tags?... An update changing all the internals that would affect this have changed. It went in after RC1, so either fetch a nightly, or simply download... http://keyboardmonkey.com/downloads/km-nested-v2.03.jar ...and pop it into your WEB-INF/lib directory and spin your container again. If the problem persists, please get back to me. Arron. In my http request scope, I'm seeing nested-includes-key/ losing my iterate index when passing the nesting context to an included jsp. I've been using struts-1.1RC1. I've dumped out the request attributes, pre and post jsp include to see what's in there... *** external.jsp nested:iterate property=someObjects nested:writeNesting / jsp:include page=included.jsp / /nested:iterate *** included.jsp nested:root nested:writeNesting / /nested:root In this example, I would get a nesting of: In the external jsp: someObject[0] someObject[1] In the included jsp: someObject[0] someObject[0] Within any one jsp, the nested iterate seems to manage things just fine, including collections in an included jsp, just not the nested:root of the included jsp. Also, I notice that the NestedReference.getNestedProperty() appears to yield the correct string *prior* to setting the nested:root and it is set to an empty string (or null?) immediately afterwards. Thus it appears that the setting of nested:root is either where the bug is, or this is desired behavior... or I've gotten this entirely wrong. :-) chris - 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: Question about NestedIterateTag (also: nested:iterate nested:root)
Whoops, replied to the wrong mail witht he wrong content. I think you're asking Where's the iteration!?... It's in the super class of the NestedIterateTag, in IterateTag in the logic taglib packagage. The nested variant simply allows it to relate to other nested tags. So all the logic you're after is in... org.apache.struts.taglib.logic.IterateTag ...but the actual iteration is by setting the current iteration index bean, and then when doEndTag() is called, it increments and re-evaluates the body content effectively making it iterate. I think this is the information you're after. Arron. Have you tried the latest and greatest nested tags?... An update changing all the internals that would affect this have changed. It went in after RC1, so either fetch a nightly, or simply download... http://keyboardmonkey.com/downloads/km-nested-v2.03.jar ...and pop it into your WEB-INF/lib directory and spin your container again. If the problem persists, please get back to me. Arron. I've also attached all test files to the bug report at: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17977 Personally, I'm seeing more of a problem with the actual names re: the nesting level rather than the actual objects, but your problem could be a symptom of the same issue too. chris -Original Message- From: Bhamani, Nizar A TL56E [mailto:[EMAIL PROTECTED] Sent: Thursday, March 13, 2003 4:31 PM To: 'Struts Users Mailing List' Cc: Chris Butler Subject: RE: Question about NestedIterateTag (also: nested:iterate nested:root) Didn't get the attachment. May be the discussion group filtered it out. Can you send it to me in an email separately. Thanks, -Original Message- From: Chris Butler [mailto:[EMAIL PROTECTED] Sent: Thursday, March 13, 2003 4:28 PM To: Struts Users Mailing List Subject: RE: Question about NestedIterateTag (also: nested:iterate nested:root) I seem to be having a very similarly related problem with respect to nested:iterate and jsp:include. I've found that the index is lost and it always finds the name for the first element in the collection only. A simple test that I've done - I've attached. Chris -Original Message- From: Bhamani, Nizar A TL56E [mailto:[EMAIL PROTECTED] Sent: Thursday, March 13, 2003 4:01 PM To: 'Struts Users Mailing List' Subject: Question about NestedIterateTag We have written our own tag to print a bunch of fields read from an XML file. I am using various NestedTextTag, NestedRadioTag, NestedSelectTag, NestedOptionsTag and it all works fine. I had to enhance this to use iterations of a list of fields and am using NestedIterateTag. However using NestedIterateTag dosen't seem to iterate over the collection As expected. It just prints prints out the first object from the collection. Has anybody has experience using the NestedIterateTag ??? Here is the logic in short: public class MyTag extends NestedWriteTag implements NestedNameSupport { public int doStartTag() throws JspException { // Some stuff removed NestedIterateTag iterateTag = new NestedIterateTag(); iterateTag.setParent(this); iterateTag.setPageContext(pageContext); // theCollectionProperty is of ArrayList type. iterateTag.setProperty(theCollectionProperty); iterateTag.doStartTag(); // Do some stuff to use NestedTextTag, NestedRadioTag etc and // set their parent as iterateTag. iterateTag.doEndTag(); return (SKIP_BODY); } } Again, the iteration works only for the first element in the collection. Doesn't work for all the elements in the collection. Any help would be appreciated. Thanks, Nizar. - 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: nested:form parent scope
Try swapping the nested:form with html:form. I'd be surprised if it didn't start working. Each tag sets a reference. nested:form tag is special in that it's a root tag that defines the start of a nested structure. Your example is nesting fine until you hit the form tag. I can see your logic in using ../ to get around the tag, but the relative properties (../ /myProp et al) are against the bean reference itself not the tag markup. It is possible, but would take some implementing without what I see as a real gain, as most nested forms are relative to the root form bean. Arbitrarily putting a form around an arbitrary level would be confusing, as the names wouldn't match the form going back to the server to be set by Struts anyways. I'd evaluate what it is you're trying to get back out of the form, and the use of a FormBean as the root bean. Or the quick answer is use the html:form tag as it won't modify the nested context that all the child tags are using. All the best. Arron. I'm using RC1, playing around with nested tag support, and ran into an unexpected behavior. I'm not sure if this is by design and I'm using it incorrectly, or a bug. I'm iterating over a list of users, and want to create a short form for each user, containing their username and a submit button. However, I can't seem to refer to the bean created by the nested:iterate tag from within the nested:form scope. Jsp source code below. How, from a nested:form, can I refer to a bean in the parent scope? As demonstrated below, ../ does not seem to work in this situation. Any suggestions? Workarounds? Help? Thanks in advance, --Scott Severtson %@ page language=java % %@ taglib uri=/WEB-INF/struts-nested.tld prefix=nested % jsp:useBean id=factory scope=application class=org.edutech.users.Factory/ html body table nested:iterate name=factory property=users tr td !-- Outputs username as expected -- nested:write property=userName/ /td td !-- Action references a form-bean named UserEditForm, who's implementation contains a userName property and get/setUserName methods -- nested:form action=/user/delete !--Output is empty, and refers to the UserEditForm, as expected -- nested:write property=userName/ !-- Output is empty, and still seems to refer to the UserEditForm -- nested:write property=../userName/ !-- Output produces a JspException when uncommented: -- !-- No getter method for property ../userName of bean UserEditForm -- !--nested:write property=../../userName/-- nested:submit property=submit/ /nested:form /td /tr /nested:iterate /table /body /html - 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: Nested and Tiles taglibs together
Chris, et al, As of my last update to the nested tags, they use the request scope to store their reference information. They used to browse the tree of tags on a page which kept them in page scope, but now they're independent. If a nested tag is run anywhere inbetween the start and end of a nested parent tag, it can get the reference out of the request. This should allow all manner of include methods, including Tiles. The ability to do this is in the nightlies, you can wait for RC2, or download just the nested tag update (and just throw it into your WEB-INF/lib) from... http://keyboardmonkey.com/downloads/km-nested-v2.03.jar ...hopefully this is the answer you're looking for. Arron. Cedric (and others), Thanks for the response and insight. I'll cast my vote on the bugfix. I'd definitely like to see the behavior I described below. As for nested/tiles interaction and potential to allow for request scoping of variables, hopefully I can contact the fellow who does the nested tags and see if that's a possibility. It makes sense to allow for an option to push nested tags to the request scope since many of the original struts tags support it. Chris Re: struts and jsp 1.2 2.0, etc. Apologies for the misnaming of 2.0 as 1.3 - I haven't kept up with that particular spec for a long while. -Original Message- From: Cedric Dumoulin [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 12, 2003 12:43 PM To: Struts Users Mailing List Subject: Re: Nested and Tiles taglibs together Hi Chris, Chris Butler wrote: So, I've been using struts for a while... even back when Tiles used to be called Components. :-) I'm pretty impressed with how far things have come and how useful the framework is... Anyway, I'm new to using nested tags and am trying to use them in combination with Tiles. The goal I have is to iterate over a bunch of questions, each question which has its own layout. For now, ignore how the layout switch is handled - I'm more concerned about passing nested context between tiles if it's possible. (I've actually accomplished the switch via a logic:equals sort of hack for the time being rather than pre-loading any data in a tiles controller. Why this works with a tiles:insert, I'm not sure since one would think it would have flush-from-within-a custom-tile issues as well.) First pass (without swapped layout): nested:iterate property=questions scope=request nested:nest property=question nested:write property=questionText /br / nested:hidden property=questionId /br / !-- insert answers here later -- /nested:nest /nested:iterate What I would like to do in concept: *** questions.jsp nested:iterate property=questions scope=request tiles:insert attribute=questionLayout flush=false/ /nested:iterate *** questionLayout.jsp nested:nest property=question nested:write property=questionText /br / nested:hidden property=questionId /br / !-- insert answers here later -- /nested:nest Problems I've had: 1. Tiles flush = false I'm using JBoss 3.2.0RC1 w/Jetty - the Tiles flush tag doesn't seem to work or Jetty mishandles it. I know we're fighting against the JSP 1.1 spec. Symptom: The flushed tile HTML appears first, the containing JSP HTML after There is a ticket opened in bugzilla for this issue.You can try the proposed patch, and vote for it. 2. Losing nested context Once I do the tiles:insert, I lose the nested context. I need to be able to generate the problem index for each question in the form. This should look something like: questions[0].question.questionId= questions[1].question.questionId= I don't know how nested is implemented, but it looks like it store its context in the page scope. Need to be in the request scope to work with Tiles Thoughts: 1. When will Struts move to support JSP 1.2? It's been around for a long time now. In fact, isn't JSP 1.3 out there as well? It is jsp1.2 2. Is there any good documentation on Tiles and Nested in combination? So far, I've been to a lot of the struts resources without much luck. I don't know about any documentation for Tiles/nested. Any help is welcome. Cedric 3. I love the concept of Tiles controllers. These are fantastic for moving a Tile around a webapp solely by referencing it via the JSP/tiles defs. Is there anyway to leverage this concept in relation to my desired objectives? Thanks loads - any tips or even possible approaches would be fantastic. Chris - 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
Re: Making a Tree
Sloan, See if this is what you'rs looking for (tutorial etc)... http://www.keyboardmonkey.com/pilotlight/index.jsp ...scroll down to the JSP Recursion TREES!!! part. Have fun. Arron. Are there any struts/jsp tags that help in making a tree structure? Not a JavaScript one but one that will expand when you click each link from doing a call to an Action? I could do nested logic tags over returned Collections, but I was wondering if there was a better way? -- Sloan yeah.. I know... Only God can make a tree - 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: MonkeyTree problem - In RC1
Dan, You are my hero well... i didn't want to be the one to say it. :P Can't wait to see RC2. Is the fix in the nightly built yet? Yup. If you can promptly report any problems you may have so when next release day comes around we can have it nice and stable. Happy nesting. Arron. -Dan - Original Message - From: Arron Bates [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, March 07, 2003 11:20 PM Subject: Re: MonkeyTree problem - In RC1 Dan, I'm presuming Tomcat 4.1.18?... Get this jar... http://keyboardmonkey.com/downloads/km-nested-v2.03.jar ...and throw it into the WEB-INF/lib directory, and restart the app. With any luck it should work. Nested tags were only fixed in new Tomcat 4.1.X after RC1, it'll be in the RC2 release. Arron. Hi is there anyone successfully got MonkeyTree example to work in RC1. I have tree displayed like this Root SubDir1 SubDir1 - instead of SubDir2 SubDir1 ---instead of SubDir3 Any help is greatly appreciated. -Dan - 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: MonkeyTree problem - In RC1
Dan, I'm presuming Tomcat 4.1.18?... Get this jar... http://keyboardmonkey.com/downloads/km-nested-v2.03.jar ...and throw it into the WEB-INF/lib directory, and restart the app. With any luck it should work. Nested tags were only fixed in new Tomcat 4.1.X after RC1, it'll be in the RC2 release. Arron. Hi is there anyone successfully got MonkeyTree example to work in RC1. I have tree displayed like this Root SubDir1 SubDir1 - instead of SubDir2 SubDir1 ---instead of SubDir3 Any help is greatly appreciated. -Dan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [NESTED-TAGS]Anyone using nested tags with the latest nightly build?
-- IMG Tag - [..cut..] My only issue: The release of the nested tags from 1.1b2 let you get away with some nested tag mis-use [..cut..] The reason why it stopped working in the recent nightly is that the nested tags have been gutted, and remade to allow them more flexible use, including the use of Tomcat 4.1.18 as a servlet container. I've attempted to closely support previous proper use of the nested tags, but I think that trying to support the same level of mis-use would be a very pragmatic target and really hard. As for the errors you're getting the nested tags are having those errors speak from the internals of the tags they extend. They are a _very_ thin wrapper around the original tags, and I'd like them kept that way really. Mandating properties which can and cannot be set would make the job harder of having them adapt to changes in the underlying tags. Mis-use of the tags would always be at your own peril, but this big change has obviously changed the way in which they can be mis-used. So I supose my response is terribly sorry for now, but the internals probably won't change again, but once again mis-use at your own risk. -- Radio Tag --- [..cut..] Nothing outwardly obvious. Thanks for the code snippets, I'll have to get in and do some testing and get back to you. Thanks again. Arron. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: editable list using nested:iterate and lazyList
Alex, The JSP wasn't shown probably because it's like all other Struts table creation using the iterate tag. Example JSP... table nested:iterate property=studentList tr tdnested:text property=studentId //td tdnested:text property=firstName //td tdnested:text property=lastName //td /tr /nested:iterate /table ...when submitted, if you're student bean is in a LazyList, then it'll populate correctly, and all the data will be there for your action for processing. This what you're after?... Arron. (Monkey Boy?...) Is this an example of an editable list (ie. a table like structure)? Based on your student example, I am trying to edit a list of students all on one page. ie. I could change five students names with one submit. Maybe I didn't fully understand your example, but it sounds like your example is list/detail page setup where one page has a list (non editable) and from that list page you can select a single student which is displayed in a detail page from which you can edit that one student's info. I am using a LazyList because the only example of an editable list that I have every seen was given by Arron Bates (monkey boy) and that is what he did, but he did not show how the jsp page was done. [EMAIL PROTECTED] 03/05/03 05:11PM I give a sample is use when I need to populate an view : I got an ActionForm : public class StudentForm extends ActionForm { private String formationSelected = Analyste Programmeur; private Collection formationList = null; private Collection formationListID = null; private Collection groupList = null; private Collection groupListID = null; private String group = cycle 1a; .. .. /** * Get the formationList. * @return Collection. */ public Collection getFormationList () { formationList = Formation.getFormations(); return formationList; } /** * Get the formationListID. * @return Collection. */ public Collection getFormationListID () { formationListID = Formation.getFormationsID(); return formationListID; } /** * Get the groupList. * @return Collection. */ public Collection getGroupList () { groupList = Groupe.getGroupsOfStudent(); return groupList; } /** * Get the groupList. * @return Collection. */ public Collection getGroupListID () { groupListID = Groupe.getGroupID(); return groupListID; } .. I got an viewstudent action : public ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { Collection students = null; StudentForm studentForm = (StudentForm) form; students = getStudents (); HttpSession session = request.getSession(); session.setAttribute(students, students); return mapping.findForward(viewstudent); } /** * Get all students. */ protected ArrayList getStudents () { return Student.getStudents(); } And my jsp view for studentview is : %@ page session=true % %@ page import=org.apache.taglibs.display.test.TestList, org.apache.taglibs.display.test.ListHolder, java.util.List% %@ taglib uri=http://jakarta.apache.org/taglibs/display; prefix=display % %@ taglib uri=/WEB-INF/struts-menu.tld prefix=menu% html head /head body script language=JavaScript1.2 src=./scripts/coolmenus3.js /script script src=./scripts/coolmenu-config.js /script menu:useMenuDisplayer name=CoolMenu bundle=org.apache.struts.action.MESSAGE menu:displayMenu name=ToDoListMenuFile/ menu:displayMenu name=ToDoListMenuEdit/ menu:displayMenu name=CaseDetailMenuCase/ /menu:useMenuDisplayer p pnbsp;/p pnbsp;/p pnbsp;/p pnbsp;/p pnbsp;/p pnbsp;/p display:table width=85%align=left name=students scope=session pagesize=5 requestURI=/ibmss/form/viewstudent.jsp export=true decorator=org.apache.taglibs.display.test.Wrapper display:column property=idPersonne title=ID href=/ibmss/getstudent.do paramId=idPersonne paramProperty=idPersonne / display:column property=name title=Nom/ display:column property=firstName title=Prinom/ display:column property=adress title=Adresse/ display:column property=city title=Ville/ display:column property=npa title=Npa/ display:column property=phoneNumber title=Telephone/ display:column property=email title=Email autolink=true/ display:column property=insuranceName title=Assurance/ display:column property=insuranceNumber title=No assure/ display:column property=formationSelected title=Formation/ display:column property=group title=Groupe/ /display:table /body /html The getstudent action serve me to get the student an user who whant to edit him I got an getstudentaction who
Re: [NESTED-TAGS]Anyone using nested tags with the latest nightly build?
Jeff, I can fix the first problem with the nested:img tag... don't use it. :P Use the html:image tag instead. The error's coming through because of the old nested mantra that if you don't want the property property to be managed and set, then use the original tags. You're using pageKey instead of the name/property duo, and internally the nested tags are evaluating the property property to an empty string, and the attempting to dance. As for the radio tag in the include file... it will depend on the context of where it's included in the parent file. Can I get a snippet of the tag layout that it's nesting against in the parent JSP?... it holds the key to the problem. Once I have that detail, I may be able to get somewhere. And there's nothing wrong with long emails. :) Arron* * ...somewhere in the back of my head was the possibility I'd get out of this update without a bug being raised. what fools these monkeys be... I Had read that Arron had submitted patches to the nested tags to allow the upgrade to tomcat 4.1.x. (I assume that the zip jakarta-struts-20030306 contains the nested fixes) We are currently developing on TC4.04 with 1.1b2. I dropped that latest binaries in and got several problems (compile errors) on many pages that work fine other wise. If I understand the upgrade.I just replace the JARS, *.tld, and the *.dtd 's...? This is not all the problems but two main ones are the nested:img tag and the nested:radio tag With a usage such as: nested:img pageKey=calendar.logo / I get: javax.servlet.jsp.JspException: No getter method for property of bean taskListForm at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:881) at org.apache.struts.taglib.html.ImgTag.url(ImgTag.java:622) at org.apache.struts.taglib.html.ImgTag.doEndTag(ImgTag.java:410) at org.apache.struts.taglib.nested.html.NestedImgTag.doEndTag(NestedImgTag.java:106) at org.apache.jsp.TaskListMainForm$jsp._jspService(TaskListMainForm$jsp.java:390) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) .. If I replace it with: html:img pageKey=calendar.logo / It will work Fine. The nested:radio tag gives me this: javax.servlet.jsp.JspException: Cannot find bean under name at org.apache.struts.taglib.html.RadioTag.doStartTag(RadioTag.java:229) at org.apache.struts.taglib.nested.html.NestedRadioTag.doStartTag(NestedRadioTag.java:94) at org.apache.jsp.InvOnDemandFilterTable$jsp._jspService(InvOnDemandFilterTable$jsp.java:126) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473) with a usage of: inside a jsp:include nested:root table tr td All/td td nested:radio property=status value=%= Integer.toString(ArConstants.TRANSACTION_STATUS_ALL) %//td td Open/td td nested:radio property=status value=%= Integer.toString(ArConstants.TRANSACTION_STATUS_OPEN) %//td /tr /table /nested:root sorry for the long email.. Jeff - 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: [update] nested tags...
(I tried replying to this yesterday but the cheque was lost in the mail) Dropped connection or something must have killed the last jar. It's updated, give it another bash... http://www.keyboardmonkey.com/downloads/km-nested-v2.03.jar Arron. Arron: Can you please re-build the jar? Tomcat 4.1.18 throws a java.util.zip.ZipException: invalid END header (bad central directory offset) Error. Methinks, well I'll just unzip it and put it in WEB-INF/classes; unfortunately, Winzip too has problems with it. not.lazy I don't want to change too many things at once and so am trying to stick with Struts 1.1b3 than move to the nightly. /not.lazy Sri -Original Message- From: Arron Bates [mailto:[EMAIL PROTECTED] Sent: Friday, February 28, 2003 12:53 AM To: [EMAIL PROTECTED] Subject: [update] nested tags... Peoples, Important changes just committed into CVS for the nested tags. 1) Copyright date in the header license is updated to include 2003! 2) The internal changes to get them dancing with Tomcat 4.1.18 more. For those too lazy to get the entire distrib of the next nightly, you can get just the nested tags from... http://www.keyboardmonkey.com/downloads/km-nested-v2.03.jar ...the ony diff between this and the last jar I posted, is it's more reliable in using more than one root tag on the same page, using different root tags within the nesting itself (docco on this to come), and a bug fix for the two tags which like to play differently (nested:options nested:link). If people were just about to raise bugs on my last jar of these tags which have anything to do with what's just mentioned (multiple root tags, link and options tags), can you have another run with this jar to see if they go away. Docco on the additional stuff this rejig of the tags can do is in the works. For those who care, enjoy. For those who don't, as you were. Thanks again. Arron. - 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: [update] nested tags...
Sri, Don't know how the other one clapped out, but i made another one, tested out okay (JDK Jar tool). Try this one (link for convenience)... http://www.keyboardmonkey.com/downloads/km-nested-v2.03.jar not lazy I understand that people aren't lazy, just pragmatic. :) /not lazy Arron. Can you please re-build the jar? Tomcat 4.1.18 throws a java.util.zip.ZipException: invalid END header (bad central directory offset) Error. Methinks, well I'll just unzip it and put it in WEB-INF/classes; unfortunately, Winzip too has problems with it. not.lazy I don't want to change too many things at once and so am trying to stick with Struts 1.1b3 than move to the nightly. /not.lazy Sri - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[update] nested tags...
Peoples, Important changes just committed into CVS for the nested tags. 1) Copyright date in the header license is updated to include 2003! 2) The internal changes to get them dancing with Tomcat 4.1.18 more. For those too lazy to get the entire distrib of the next nightly, you can get just the nested tags from... http://www.keyboardmonkey.com/downloads/km-nested-v2.03.jar ...the ony diff between this and the last jar I posted, is it's more reliable in using more than one root tag on the same page, using different root tags within the nesting itself (docco on this to come), and a bug fix for the two tags which like to play differently (nested:options nested:link). If people were just about to raise bugs on my last jar of these tags which have anything to do with what's just mentioned (multiple root tags, link and options tags), can you have another run with this jar to see if they go away. Docco on the additional stuff this rejig of the tags can do is in the works. For those who care, enjoy. For those who don't, as you were. Thanks again. Arron. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Nested:Checkbox
nested tags don't like the name attribute, becuase they're getting the bean from their parent. In the example, the check is working off the product of the iterate tag anyway. I'm betting the following is what you're after... nested:iterate property=associates nested:checkbox property=selected / /nested:iterate ...(there was also the closing slash in the checkbox tag, as well as the closing tag, may have been the issue too). The process of making a bean with the id property, and then the child using that, is more or less what the nested tags do for free. Hope this gets you working. Happy nesting... Arron. Nothing obvious jumps out. However, have you tried the updated nested jar that Arron made available a few days ago? See http://marc.theaimsgroup.com/?l=struts-userm=104600916205585w=2. Sri -Original Message- From: Chen, Gin [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 26, 2003 8:11 PM To: 'Struts Users Mailing List' Subject: Nested:Checkbox 1.1b3 Bug? I have nested:iterate id=assoc property=associates nested:checkbox name=assoc property=selected/ /nested:checkbox /nested:iterate Where associates is the collection in my formbean with each bean in something like: //interface only AssociateVO private boolean selected; public boolean getSelected(); public void setSelected( boolean selected ); And I keep getting this. [ServletException in:/jsps/selectAssociates.jsp] No getter method for property associates[0].selected of bean assoc' I had it as isSelected but I thought the error was related to that so I changed it to get. Yet when I simply do: nested:iterate id=assoc property=associates html:checkbox name=assoc property=selected/ /html:checkbox /nested:iterate It works just fine. Is something wrong with my nested setup? I've used the before in older versions so I don't think thats what it is but its getting late and I might be blind. _ -Tim - 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: monkey tree - must be session-based?
I have been using Nested tags to create pretty complicated nested structures in a flash. But I have a problem when the user opens multiple windows and the session values can get messed up and the trees throw ArrrayIndexOutOfBound Exceptions. Has anyone come across the same? How to resolve it? Can we make the html:form to pick up a ActionForm bean from the session dynamically? I mean instead of using the name defined in struts-config.xml, can we specify a name of formbean to use at runtime? This way we can create 'N' no. of independent trees and store in session under different names and and the user can work with them simultaneously. If you're just after a way to share objects, instead of using the html:form bean, make any bean and put it into request, session, or application scope, and get the nested tags to look at it with the nested:root tag using the name attribute to point to the bean. Example... html:form action=/myaction nested:root name=myBeanName [ heap'o'nested-markup ] /nested:root /html:form ...this way, you get the explicitly named bean, and the properties will still align with the root of the form bean if required. If you want to remove the dependency on the session scope all together, you can use the commons collections class made from the ListUtils.lazyList(...) method, which will grow to expand to whatever input automatically, be it a list of indexes or whatever. If you're building trees, then it's likely that they will need some more complex building logic, so the overhead of building will be up to you. Hope this helps some. If not, ask more questions :) Arron. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [ANN?] New Nested Tags -or- Nesters, lend me your containers...
Sri, It's sweet to see it's working. Regarding the html:form v nested:form, there is a difference in that the nested variant is putting the reference into the request and all the child tags pick up directly. The html:form on the other hand, the child nesting tags are looking for the reference in the request, not finding it, and then attempting to walk the tag hierarchy to find a html:form tag to get the bean/reference from. The old tags did the tree walking thing for everything, but now they're only doing it for backward compatibility, which seems to have failed. I think that this could be the issue with the new tomcat. The tag hierarchy walking isn't reliable, and the old nested tags relied on it. Definitely the easiest thing to do is to simply use the nested:form tag. I'll look again at nesting inside html:form for the various containers. Arron. Alrighty, I know how to make it crash (don't fret Arron, I don't believe 'tis a nested issue) When I went a-sleuthing I noticed that the usage in my real app is slightly different from the two nested:root sections in my demo; instead, it is like this: nested:root name=x nested:write property=something-from-x/ /nested:root html:form action=foo nested:write property=something-from-the-form-bean/ /html:form When I plugged modified my demo app to use this format lo-and-behold it blew chunks. That's when I noticed that I was using an html:form and not a nested:form which is what I needed for the stuff inside the form. I changed it to use nested:form and now both the demo and the real app are humming mellifluously. Woohoo! So, in summary, the above format will not work. Haven't looked at the innards of nested:write to see how it interprets things when it is inside an html:form. Sri -Original Message- From: Arron Bates [mailto:[EMAIL PROTECTED] Sent: Sunday, February 23, 2003 6:39 PM To: Struts Users Mailing List Subject: RE: [ANN?] New Nested Tags -or- Nesters, lend me your containers... You had me going there for a bit. Even made another test war to do exactly what your snippet prescribed, but as long as it's working. Hope the other app turns out to be not my issue too... :P Waitin for the word... Arron. Never mind... I had updated the WEB-INF/lib of ap-1 and tested ap-2 My test app works with the new nested jar in place. However I am still having problems with the real application; I will take a closer look at it 'morrow and keep you posted. Sri - 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: need to display a tree struture in JSP
I may be bias, but I've never seen a more flexible tree solution than this... http://www.keyboardmonkey.com/pilotlight ...scroll down and do the turorials under JSP Recursion TREES!. I've made a lot of trees, but this is the least clumsy solution, as the markup is simply Html and the nested Struts tags, and not embedded markup in java logic. The tutorial will walk you through to making a tree of directories on the server's hard drive. Give it a bash. Arron. If you need to display a tree in html using JSP, I don't think struts will help you out too much there. You can have struts hold the data in some form or other but the difficulty may lie in the displaying of data as there is no standard html tree and expanding/collapsing tree branches could be complex. I've created the html tree in java code with recursion and that was a fast, allbeit not flexible solution. I've also represented my tree data in xml and used xslt to transform it into an html tree structure consisting of ul and li tags. That worked nicely (not too fast though) and was a very flexible solution. Used javascript to expand/collapse. Steve -Original Message- From: Pani Ramasami [mailto:[EMAIL PROTECTED] Sent: Monday, February 24, 2003 5:53 PM To: 'Struts Users Mailing List' Subject: need to display a tree struture in JSP Hi: I have a object which contains all the necessary data. Now, I need to display the data in a Tree structure in my JSP. Iam using Stuts 1.1b3. (may be irrelavant) If any of you have done this succesfully, kindly guide me on how to proceed. Thanks, Pani. _ Get 25MB, POP3, Spam Filtering with LYCOS MAIL PLUS for $19.95/year. http://login.mail.lycos.com/brandPage.shtml?pageId=plusref=lmtplus - 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]
[ANN?] New Nested Tags -or- Nesters, lend me your containers...
Avid Nesters, (you know who you are, no need to lie to yourself) Tomcat 4.1.18 is now on the radar!... The nested tags internals have been re-written primarily to fix the problem with them not working in the new tomcat 4.1.18 jasper engine. It also allows them to be a little more flexible (can define other tags in the nesting), but more on that later... For now, I need to know that they work on all your current nested apps which are working. I've run my own tests, but according to feedback, some of you guys have a different take on using the nested tags than I do, so I need your help. It's also important for those of you using other containers, possibly never intending to use tomcat, to try them out, as it is intended to get merged into the Struts main line as soon as possible to help out those with the can only use released product woes, or just trying to get onto a faster JSP engine that's free (gotta love the economics, but the new jasper engine does move. The recursive tree app example now hums along akin to the speed of Resin. sweet). To get the new classes, there's a jar at... http://www.keyboardmonkey.com/downloads/km-nested-v2.jar ...just throw it into the WEB-INF/lib directory, your classloader should pick them up before struts.jar. If not, delete the tags from struts.jar and give it another bash. Anyways, I'm really seeking your feedback on this update (email direct or to the list, I'm not fussed). The source is in the Jar if you want to simply say my code's badly formatted (which it isn't, but anyways :P )... Thanks again, and happy nesting. Arron. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [ANN?] New Nested Tags -or- Nesters, lend me your containers...
You had me going there for a bit. Even made another test war to do exactly what your snippet prescribed, but as long as it's working. Hope the other app turns out to be not my issue too... :P Waitin for the word... Arron. Never mind... I had updated the WEB-INF/lib of ap-1 and tested ap-2 My test app works with the new nested jar in place. However I am still having problems with the real application; I will take a closer look at it 'morrow and keep you posted. Sri - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [Nested Tags] Frustration..Should this work?
A really subtle problem. Remind me to make this advice available some place else when I'm done (like a mail archive?)... :) Trap one: It sounds like the bean reference is a collection itself. A little more background clarity... The nested tags never actually define references, they simply construct the nested property property for when a tag really needs it, like a nested text tag or whatever. So, with this root tag being the collection, it will actually try and make a property that looks like [0] rather than myProperty[0]. Basically, when BeanUtils tries to apply the property it's having issues. To get around this, have the collection one level down in a really simple bean, and make the bean reference to that. This will kick everything off with a proper name in front of that index value, eg: listProperty[5] All in all, nested properties must have at least one substantial named property. They can't just go this/ against the root bean, as there's no name for BeanUtils to play with, even for children as their evaluation will be .something, the dot on the front assumes a nesting level and it all falls down. Trap two: This is actually because of the first problem. When the child tags are trying to do their thing, they're simply appending to the index. From above you can see that the follow-on for a child will be [5].somethingProperty. Once again, the property is just BeanUtils having an issue. Summary: Just keep in mind that the nested tags are all about managing the property property so BeanUtils can do its thing. We need that meaningful property to start off with. nested:iterate property=somethingMeaningful I'm quite sure that putting a bean around that top collection will make things easier. Using this/ and such is really just a helper for when you need the the object itself in a collection. Without a properly set up parent, it all falls down. On a completely different note... I just want to thank Sri for really putting in some effort to help people get around the nature of the nested tags. When all the list comes down into my email client and there's a nested problem, one from Sri usually follows smartly. The nested tags have an esoteric following (that I know of), no-one on this list goes out the their way to recommend them outside of the old list in lists problem, whatever (I'm curious to see if they even get a mention in any of these spiffy new books... :). They mostly snag new users who haven't had an old die-hard bend their ear about best (not necessarily pragmatic) practices :) It is a fact however, that they can truly make life easier. I can't watch the list as often as I'd like, and it's been a big reassurance than the users have somewhere to turn with issues. Sri's one of the peoples that make this list a great [ot] Impact with wall resource. How many people apologise for a not leading to the answer?... Thanks again Sri. Arron. On Thu, 2002-11-28 at 03:07, [EMAIL PROTECTED] wrote: Thank you for reminding me of that link. I tried ./value and this/value without success. Even though I use the nested:form as the root..for this iterate tag I want to tell it to look to an object in page scope instead of the form bean. That is what I thought the combinations of name and property were all about.From docs: ** The collection to be iterated over must be specified in one of the following ways: As a runtime expression specified as the value of the collection attribute. As a JSP bean specified by the name attribute. As the property, specified by the property, of the JSP bean specified by the name attribute. I understand that the name is not needed by the nested tags (thats why I use them so much :-) ), but the nested docs simply point to the docs for the standard logic tags. The nested:iterate seems to work as expected, but the nested equal and write either do not see the current object exposed by nested:iterate OR the nested:iterate is not exposing the current object. I guess my original question still is: should this code work? nested:define id=collectionCode name=%= WebConstants.COLLECTIONCODE_KEY % property=list/ nested:define id=col property=collectionCode type =java.lang.String/ nested:iterate name=collectionCode nested:equal property=value value=%= col % nested:write property=label/ /nested:equal /nested:iterate Thanks for the help.. Sri Sankaran [EMAIL PROTECTED] on 11/27/2002 09:09:59 AM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To:Struts Users Mailing List [EMAIL PROTECTED] cc: Subject:RE: [Nested Tags] Frustration..Should this work? I suspected a problem to be with the iterate since that's what your stack trace suggests. Also, look at Arron's reply to an earlier post (by you, in fact!) http://marc.theaimsgroup.com/?l=struts-userm=103584892423199w=2. He states that the name attribute is ignored. Given that I don't know how
Re: Complicated Web Interfaces?
I've also looked at the monkey-struts example as well but that seems to lack the creation of objects in these lists, which doesn't look to be a problem to implement but that might be an oversight on my part : ) please let me know if I'm wrong. Have another play, click on new banana... :) http://www.keyboardmonkey.com/StrutMonkey/MonkeyStruts_v2.jsp KB-Monkey-example uses a fixed object model (i.e it knows what fields are there in each object). However I think if you want the tree to be dynamic you can use the same technique with your own object model (which seems to be dynamic in content). The key to adding and deleting the nodes is the way the button clicks of Add and Delete are handled in a nested environment. Nested tags enable you to remember the context of added and deleted objects/nodes. You can use Map-backed properties for dynamic form-fields. But one issue with the monkey example is that it refreshes the page if I want to add/delete an object/node. Wouldn't it be more efficient to use JavaScript for the purpose? I mean why resend the request back to the server if you only want to add blank fields? If anybody has accomplished this I would be glad to know. It's all up to watever you want to code. The fact that the monkey example trips to the server has nothing to do with the nested tags. To write the monkey example in Struts without the nested tags is verging on impossible, at the very least a truly large headache, it was really quite easy. If the nested tags are guilty of anything, they make it very easy (and even fun?... maybe I'm wired differently) to add more and more complexity to the structure. The nested tags have made some truly unwieldy applications, including the reason for their creation. You just have to ask yourself one question... Red or Blue pill? :P Arron. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Complicated Web Interfaces?
It solves my problem in theory at least : ) all I have to work out now is how to maintain a tree in Struts :( I don't think the applet way is a very nice way of doing it. Mate, here at the keyboard of monkeys, we aim to please... http://www.keyboardmonkey.com/pilotlight ... and scroll to the part where it says... JSP Recursion TREES!!! ...it's about the most flexible tree generation method there is, and I'm actually being modest. :P Requires a JSP 1.2 container (Tomcat3). Enjoy. Arron. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Struts: a Graphic Artist blessing or curse?
It's up to your designers. I've had designers that throw their hands up at anything under the bonnet at all. Being a graphic designer myself, I don't mind cutting code at any level. :) The trick with anything like this is find the middle ground for your team. For some, it's just having them cut just the HTML face and working a process that allows flexibility with changes. But the fact is, you can pick the difference of professional design. You just have to ask yourself as to how much you want to pay for it. I wish you luck. Arron. On Tue, 2002-11-26 at 00:49, [EMAIL PROTECTED] wrote: Haha! This whole idea of J2EE where we have seperation of roles hasn't quite happened has it. The idea that there are business process programmers, database programmers, front end guys etc. In the end it's always the same person fulfilling all the roles. On the projects that I have been on in the past Graphic designers have been comissioned to make up the pages, which are done statically. Then the programmers have gone through the pains of making these pages dynamic. Regards IV from:Foong Tzer [EMAIL PROTECTED] date:Mon, 25 Nov 2002 13:31:26 to: [EMAIL PROTECTED], [EMAIL PROTECTED] subject: Re: Struts: a Graphic Artist blessing or curse? Dear Struts supporter, There seems to be a real world problem with using Struts (well, not really Struts, but JSP Tag Libraries). It seems despite zero java coding on the JSP pages, those 'funny' tags are still not digest-able by average graphic designers. I mean, if they were to use Macromedia DreamWeaver, it would not've rendered the look and feel if the tags were something like this: - html:img page=/nice.gif altKey=Nice/ html:html locale=true /html:html html:link page=/another.jspbean:message key=another.title//html:link As opposed to the native standard HTML tags? I'm really not sure whether Macromedia or any other popular graphic artiste tool would render these Struts JSP pages properly. Anybody here has any experience solving this real world problem? Thanks. Any help would be much appreciated. Regards, Tzer [EMAIL PROTECTED] Is J2EE messing up your mind? http://www.see-consulting.com -- http://fastmail.fm - Or how I learned to stop worrying and love email again -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] http://www.amazon.co.uk/exec/obidos/redirect-home?tag=velloscouk-21placement=home_multi.gifsite=amazon -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Why doesnt logic:iterate use the formBean from the html:form
html:form action=/helpMe logic:iterate property=infoItems /logic:iterate /html:form I assumed that iterate tag would look for a property infoItems on the formBean for the html:form But it doesnt? The nested tags work in exactly this fashion, picking up on the form bean and then having all the name attributes more or less taken care of as you've asked. And as martin says, assumptions shouldn't be made about the html/form nature, so if you find yourself wanting to make WML, there's a nested:root tag you can use to point at an arbitrary bean reference. There's docco on the nested tags on the Struts site, but there's a primer and a tutorial to get you started on... http://www.keyboardmonkey.com/next ...I'm quite sure you'll find them a good fit. Arron. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: nested:iterate in an included page
I did not have any nested tags in the top page so I added one and now my code looks like this: (Your example referenced nested:property and I assume you meant nested:nest) That'd be the one... :) I am still getting the null reference on the first nested tag in the included jsp. I am using Struts 1.1B2. 1.1 is what we need. I must admit to not totally understanding your explanation of what property to reference in the nested parent tag Doesn't really matter, but a parent nested tag (root, iterate, nest etc) put the reference to the root bean and the current nested property into the request object. This is so included pages can get a reference to the root bean the the correct nested property by fetching it back out of the request object. -- I am referencing my form object (which is, in fact, the parent I want). I am also still a bit confused on whether I need a nested root tag or not. This is where I have to apologise. You'll need an empty (no properties are set at all) nested:root tag in the included page, this will then look to the request object for the bean/property reference. Sorry about the hassle. If you have any trouble, rather than wait for replies from the list to run over the start of the tutorial I wrote about nesting through includes to make a tree structure... http://www.keyboardmonkey.com/pilotlight ...and click on the first link in the JSP Reursion TREES tutorial. Arron. -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: nested:iterate in an included page
You need at least one nested parent tag on the top page with the html:form tag. This will allow the nested tags to put their parent reference into the request object, from which the nested tags in the included page can pick it up. eg: html:form action=/Time/SaveTimesheet styleId=GridForm nested:property property=someProperty jsp:include page=TimesheetGrid1View.jsp / /nested:property /html:form ...and no, you can't use ./ or this/, but can be a fake property (a named property which just returns a reference to the same bean). If there's already a nested level like this, then it's a case of versioning. What version of Struts are you using?... Arron. Thanks Drew... thanks for your response. I know the code will work if the form tag is on the same page -- I have code like that in other places. The reason for the inlcude is to reuse pieces of the page and putting the form in the included file would defeat that purpose in this case. Chris -Original Message- From: Drew Zimber [mailto:drew.zimber;shaws.com] Sent: Thursday, November 14, 2002 1:12 PM To: 'Struts Users Mailing List' Subject: RE: nested:iterate in an included page just ran into this yesterday. From what i can tell, the nested tags NEED the html:form tags on that very page, or else it cant seem to resolve the form object. If anyone knows a way around this, i'd like to hear it as this seems to defeat the purpose of templating... try putting the form tags just on that included page and see if you get the errors. dz -Original Message- From: Chris Sargent [mailto:csargent;aerisinc.com] Sent: Thursday, November 14, 2002 4:07 PM To: Struts Mail List Subject: nested:iterate in an included page I am having trouble using the nested:iterate tag in a page that I am including using jsp:include. I am probably doing something silly, but could someone provide some help? My main page looks like this: ... html:form action=/Time/SaveTimesheet styleId=GridForm ... jsp:include page=TimesheetGrid1View.jsp / ... And the included page looks like this: nested:root name=timesheetForm / nested:iterate indexId=index id=entry property=timesheet.line[0].entry type=TimesheetLineEntry I get a null ref error on the nested:iterate tag in the included page. Any help is much appreciated! Chris -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:struts-user- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: 2D Collection and nested:iterate
Thanks for the reply, appreciate it. From what I understand, I have to do something like : firstList --eachElementIs-- simpleBean --contains-- secondList In other words, wrap the 2nd list inside a bean. However, if that's the cast, I would imagine it will drag down the performance of our application by quite a bit due to Objects instantiation. (the 2D collection get used a lot and the collections are quite large). Is there anyway around it so that I can still use the original data structure ? Again, thanks for the input. :) If performance is that much of an issue, I'd square up the use of the lists. If it's all random acces (like accessing through the BeanUtils system) then ArrayLists are sweet, but if your processing is running through linearly then the LinkedList is the better bet. Just thought I'd mention it. As for the problem at hand... there's not all that much you can do really. One option, if you know that the model is thread safe (like, only one user will be on it at a time ie: request scope/everything but application scope), then you can fake it by making a bean that turns in on itself. By this I mean to make a bean that holds these multi-dimensioned arrays and takes note of the indexes requested. When the child array is sought after, return a reference to itself noting the index. The child index will come in, do the same, store the index and then return the same object. Throw in an extra stage (using the nested:property tag to put in a fake level). We know that when this is called it needs a real object, from which you can offer up the multi-dimmed object. eg:... start crappy code private int parentIndex; private int childIndex; private ArrayList myData; public Object getParentList(int i) { this.parentIndex = i; return this; } public Object getChildList(int i) { this.childIndex = i; return this; } public Object getFakeProperty() { return ((ArrayList)myData.get(parentIndex)).get(childIndex); } /end crappy code ...catch my drift? I've done a fake properties like this, and they work sweet. I haven't done it for two sequential lists, but the theory is sound. It's the fake property brings it all back together telling the object that it has to pull its finger out and actually fetch the object you're after. The above will remove the overhead of all the object creation. It has to be thread safe because if another thread gets in there inbetween a thread reading the first index and the second, it'll all be out of whack. If the list is build for a particular user, there shouldn't be any issues. ...explanation fuzzy at all?... outside of this, there's no option that comes to mind. Note: if you want to access a property of the object of the first list (the bean theoretically holding the other list), you'll have to make another fake property to identify you want that object. eg: public Object getFirstLevelFake() { return (ArrayList)myData.get(parentIndex); } ...outside of all the stuff spieled on above, ie: once you've broken through that second list or have reference to the parent list object, you can keep nesting as usual. Hopefully I've said all that clear enough for you to move forward :) Arron. -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: 2D Collection and nested:iterate
The problem is the use of this/ as the property of the second iterate. Basically, it's basically saying don't append anything more to the property reference, my parent's reference will do. ie: you're probably after myProperty[5][6] but the this/ is telling it to leave it at myProperty[5] never getting that next index. Truly multi-dimensional workings to the property constructors isn't an ability of BeanUtils as yet. It's interesting and may work its way into things in the future, but for now it's not there. So... what you'll have to do now is make the simplest of beans hold onto the second ArrayList and access it via a property so it has the full... firstList[5].secondList[6] ..nested property. The bean doesn't have to do anything special, just hold onto that array list so BeanUtils can get at the nested bean properly. Arron. On Wed, 2002-11-13 at 08:20, Louis Leung wrote: Hi all, In my action form there is a 2D collection, both used ArrayList. (i.e. An ArrayList whose elements are ArrayList also) I want to retrieve data (which are all String) from the 2nd layer of the 2D collection using nested:text ... tag so that it can populate the value back automatically. However, it is not working. Code in jsp : nested:form ... nested:iterate id=row property=A tr nested:iterate id=column property=this/ td % System.out.println(column); % nested:text property=this/ indexed=yes/ !-putting indexed=yes or not doesn't change the result abit-- /td /nested:iterate /tr /nested:iterate /nested:form Result (assume a 2X2 collection with elements A1, A2, B1, B2 in them already) 4 textboxes, the top 2 with [A1, A2] for both, and bottom 2 with [B1, B2] System.out prints out A1, A2, B1, B2 separately It seems like the 2nd iterate tag is indeed iterating thru the 2nd layer of the collection from the System.out statement. But the nested:text .../ tag is not retrieving each element of the 2nd layer collection. Rather, it is using the whole of the 2nd collection itself. Anyone has any idea why and possibly solution ? I would really like to use the nested:text .../ tag so that the values can be automatically populated back by Struts after the user input. Thanks in advance. Louis -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: nested:hidden body to set value?
This is one of those fun times where I get to say it's not in the original tag, therefore it's not in the nested one... :) should the tag body be the value?... yes, probably. But I doubt such additions will be made to the tags before the next Struts release. El nested tags... apparently it's a simple addition to the original tags like the nested addition, only problem would be that it's yet another library, unless we just leave the functionality in there as a default. Spare cycles of clustered dead brain cells are also trying to get around the ability to get a general use of the nesting concept so it can get into JSTL or whatever, but it's hard to see a general application. Anyways, that's another story... Arron. On Wed, 2002-11-13 at 06:45, Phase Web and Multimedia wrote: I just recently tried to set up a nested:hidden form element (as an experiment) to use its body to specify the value of the form element. Of course it failed, i assume because this is not possible. Here is an example code: tag sample: nested:hidden property=fooIt would be cool if this would be the form value/nested:hidden output sample: input type=hidden value=It would be cool if this would be the form value My inquiry is... why isn't this possible? It would be very convenient. Especially if i want to populate the value with a dynamic value produced by a jstl tag like c:out. Either that or when are nested tags going to be el (expression language) enabled. Nested Tags have made my coding dreams come true. But el enabled nested tags would be blissful. But please don't forget my first question of Shoudn't the tag body be the form value?. Brandon Goodin Phase Web and Multimedia P (406) 862-2245 F (406) 862-0354 [EMAIL PROTECTED] http://www.phase.ws -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: [Nested Tags] Nested vs logic tags..
Just a hunch-- have you tried specifying a 'name' for the nested:iterate tag? The nested tags don't need it, and if it's provided they will ignore it. Why?... because all the tags are working off the same bean structure, and this is defined for us by the form tag. The nested tags will fetch this bean. Because of this, all the nested tags within the form bean don't need the name property to be set. From: [EMAIL PROTECTED] [mailto:Jeff_Mychasiw;nlgroup.ca] Greetings: I am almost exclusively using nested tags. Every now and then I run into a problem and have to switch over the corresponding logic or bean version. Can anyony tell me if this is a bug? I am using 1.1b2 I tried this with nested:equal but got a NullPointerException (listed below) nested:iterate property=meshList indexId=listIndex tr td %-- Show this only for the first item--% nested:equal name=listIndex value=0 /nested:equal Try remove the name property (for reasons explained above), and try aiming the property property at it. It looks like you're trying to get the current object of the iterate tag, so this may work... nested:iterate property=meshList tr td nested:equal property=this/ value=0 [...] /nested:equal /td /tr /nested:iterate ...the this/ or ./ simply refers to the current parent object level just like using ./ on a command line. If it's not the current object you're after, point the property at one of it's relative properties. See if that works. Arron. -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: nested:iterate recursion inverts tree
So you ran the directory tree war (the end of the monkey-tree example), and the directory tree came out upside down?... If it did, I'd have to say it's how your container is evaluating the JSP. I would think that it's compiling all the objects and evaluating their output. But in doing so, it's committing their content to the response stream in the wrong order. The directory tutorial's been tried in many containers and comes out sweet. What JSP spec version is that version of WebLogic?... It's probably amazing that it can compile the true recursion at all. Most containers have to be on the later JSP spec. Arron. On Sat, 2002-10-26 at 04:28, Steve Hall wrote: I'm new to using nested tags. I've worked through the keyboard monkey tutorial and started experimenting with the nested tags on my own. I've run into something that perplexes me. My tree's are inverted when I use recursive calls to a jsp that iterates over the nested nodes. i.e.: - nested.jsp ... nested:root nested:iterate property=nodes nested:write property=nodeName/br jsp:include page=nested.jsp / /nested:iterate /nested:root ... - I would expect the page to display: root node1 node1.1 node1.2 node2 node2.1 node2.1.1 etc... The monkey tree tutorial and my experimentation displays the tree as: node2.1.1 node2.1 node2 node1.2 node1.1 node1 root Is this the expected behavior of the nested iterate tag when recursively displaying a Composite (tree)? Am I using the tags incorrectly? How do I get the JSP to display the tree root down? Is there something in my environment that is causing the JSP iteration to run before any printing to the outputstream is executed? Do I have to hard code all the iteration levels into my JSP to get the tree to display root down? Environment: Struts 1.1 b2 Weblogic 5.1 sp11 (don't ask :-/ ) jdk 1.3.1 sdk 1.2.1 Thanks for any light you can shed on the subject. Steve Hall Programmer Analyst Alterra Healthcare (414) 918 5636 [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: Proper Syntax of Nested logic:iterate
use nested:iterate ... see docs http://jakarta.apache.org/struts/struts-nested.html There's not too many examples there however. More complete tutorial and examples here... http://www.keyboardmonkey.com/next Arron. -Original Message- From: C. Struts [mailto:struts;cmbsystems.com] Sent: Friday, October 25, 2002 2:05 PM To: Struts Users Mailing List Subject: Proper Syntax of Nested logic:iterate Can anyone please provide a pointer to some documentation or samples that use nested logic:iterate. I have two beans that contain related data, aggregate and detail, and each bean has its own list. But when I nest iterate tags I get all rows from the detail bean under each aggregate row. Do I need just one bean with two lists? Please help. Thanks. -c -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: nested:iterate building columns
On Tue, 2002-10-22 at 01:02, Adam Sherman wrote: Arron Bates wrote: What about a Set? List and Map implementations only. Only because the properties for getting at an item in a collection needs a key. int's for lists and arrays, and objects (strings) for the mapped collections. Set is just a bunch, and there's no way in an iteration for the system to be able to get a specific item. This is in relation to updating from a request, and in the nested tags case, drawing the output in the first place. Since a Set has an iterator() method, and logic:iterate supports using an Iterator, souldn't it be modified to automatically get an iterator for Collections that are Sets? In all truth, this is out of my hands. The original iterate tag can use a collection, or an iterator or whatever. Why?... because when looping, the tag pulls the next object out of the iterator and stores it for the iteration. All the child tags have this artificial lookup of the current object when evaluating. It doesn't use a proper property lookup of the bean using BeanUtils. The nested tags... Nothing is actually stored or used by the nested:iterate tag. The child tags takes the nested property reference set by the iterate tag, and evaluates the resulting property using BeanUtils. This is exactly how the Struts controller servlet sets the incoming beans. Result of all this, nested tags can only use arrays, Lists and Maps for iterations, but on the other hand they can be set properly when going back to the server via a form. The original tags on the other hand can show content in a collection, but this imformation will never be updated when hitting the server again. Arron. -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: nested references and javascript
or even... document.forms[myForm][foo.bar].value The .elements bit is optional. Arron. On Fri, 2002-10-11 at 15:23, Steve Widmar wrote: D'oh! (as in 'Doh yeah') no wonder it wasn't in the archives; well, it is now (or should be soon). Thanks, James. [EMAIL PROTECTED] 10/10/02 09:27PM You can use an alternate sytax. Example: Number(document.forms[myForm].elements[foo.bar].value); or Number(document.forms[0].elements[foo.bar].value); James Mitchell Software Engineer/Struts Evangelist http://www.open-tools.org -Original Message- From: Steve Widmar [mailto:[EMAIL PROTECTED]] Sent: Friday, October 11, 2002 12:22 AM To: [EMAIL PROTECTED] Subject: nested references and javascript I've got a question about this subject that's probably obvious to experienced users. I've searched the mail archives on the subject and haven't found any joy, so here's my puzzler: I'm starting to use nested references in 1.0.2... for example: html:text property=foo.bar / The framework is working fine, as I've got a getFoo() on the named bean with a getBar() and it shows in the html form in the browser. When i try to update existing javascript to match the new nest-compliant name, it dont work :-( for example: Number(document.forms[0].foo.bar.value); generates the following error message: document.forms[0].foo has no properties. So the $.64 question: - am i doing it wrong, or is it undoable? I guess it's more of a 'javascript-users' issue, but i figgered someone here has hit this already (Why 1.0.2? The app's been in production for a while on 1.0.2... (BTW, thanks struts-dev)). Thanks, Steve -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Pop-up from with Nested loop
On Wed, 2002-10-09 at 07:55, Rea, Ron wrote: Has anyone ever used a pop-up form to fill data with a nested:iterate section? Many times. Good for me, huh? :P I am displaying several rows of data using a JSP and the nested:iterate tag. On each row, I want to create a link or button that, when clicked, pops up a small page containing a textarea. The user fills out the text area, hits the close button, and that textarea data is transferred back to the parent form and placed in the correct property iteration within the nested tag. Any ideas??? It's quite easy without scripting popups. With scripting it's a little more clumsy. The important parts you'll need is the nested property (the indexing, mappings and whatever else) and it's value. These are quite easy to get if you use a button or some type of input type. With an onclick like... onClick=myFunc(this) ...on the button, and a funciton like this... function myFunc(ipt) { var url = myfunkysite.com?+ ipt.name +'='+ ipt.value } ...you can see how it's going to be able to make a URL with the right details of the nested element. The URL can then call an action and serve your edit form. As for updating the list, you'll have to take the form submit, submit it to the server, and force the parent page to reload. On the parent page this is easily done with... document.location = document.location; Then, of course you could drive the entire thing with script. Give the table cells an ID, create the popup, draw the document into it, and populate it with the content of the table cell. Update it, and replace the table cell's content with the values from the form. Some people may hate this solution as there's no Struts or Server interaction at all and is 100% script dependent. But it'd work, work well, and faster than any server call could ever be. It wouldn't work for non DOM compliant browsers (but covers IE5+ NS6+ Moz1+ Konq. possibly more) Hope that somewhere in all that is a little more light for your problem. Arron. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: nested tags - version problem
Do you mean the nested_tags_10.jar from my site?... I just checked the tld, there's no mention of the EmptyTag or the NestedEmptyTag that extends from it. It is in the Jar, but if it's not in the tld file, it's not going to get called. Other people are running off weblogic on the old jars also. Arron. On Tue, 2002-09-17 at 20:31, Lister, Tom (ANTS) wrote: we are using the nested tags library that is compatable with struts 1.0 but it depends on but it still contains references to the 'EmptyTag', which I think is 1.1 this has only become apparent when moving from development using tomcat to deployment on web-logic has anyone got this problem. If it time for 1.1, then is it straight forward to run up our current application under 1.1 and what are the pitfalls. we're coming to the end of a large development and don't really have time for major reworking of the application :-) Tom Lister * 020 7612 3030 * [EMAIL PROTECTED] *** This communication (including any attachments) contains confidential information. If you are not the intended recipient and you have received this communication in error, you should destroy it without copying, disclosing or otherwise using its contents. Please notify the sender immediately of the error. Internet communications are not necessarily secure and may be intercepted or changed after they are sent. Abbey National Treasury Services plc does not accept liability for any loss you may suffer as a result of interception or any liability for such changes. If you wish to confirm the origin or content of this communication, please contact the sender by using an alternative means of communication. This communication does not create or modify any contract and, unless otherwise stated, is not intended to be contractually binding. Abbey National Treasury Services plc. Registered Office: Abbey National House, 2 Triton Square, Regents Place, London NW1 3AN. Registered in England under Company Registration Number: 2338548. Regulated by the Financial Services Authority (FSA). *** -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Nested tagscomplete example for Table (with check-box, hyperlink) Help, help help
On Tue, 2002-09-17 at 20:53, Lister, Tom (ANTS) wrote: see http://www.keyboardmonkey.com/next/index.jsp they work a treat for master/detail type forms although I'm finding I may have to upgrade to form Struts 1.0 to 1.1 to get them working on Web logic You wont be sorry for going through the upgrade though. :) Arron. :-) Tom Lister * 020 7612 3030 * [EMAIL PROTECTED] -Original Message- From: Heligon Sandra [mailto:[EMAIL PROTECTED]] Sent: 17 September 2002 11:43 To: '[EMAIL PROTECTED]' Subject: Nested tagscomplete example for Table (with check-box, hyperlink) Help, help help Importance: High I am searching JSP example with Struts tags (probably nested tags) to display a table with multiple rows and columns. I have to follow a minimum well-defined format: - one column has to offer hyperlink; - one column is composed of check-box; - each column of the table can be sorted by ascending or decreasing order; I must produce this model very quickly and I hope that a person will have done something of similar and will be able to help me to hold my time. Thank you very much in advance. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] *** This communication (including any attachments) contains confidential information. If you are not the intended recipient and you have received this communication in error, you should destroy it without copying, disclosing or otherwise using its contents. Please notify the sender immediately of the error. Internet communications are not necessarily secure and may be intercepted or changed after they are sent. Abbey National Treasury Services plc does not accept liability for any loss you may suffer as a result of interception or any liability for such changes. If you wish to confirm the origin or content of this communication, please contact the sender by using an alternative means of communication. This communication does not create or modify any contract and, unless otherwise stated, is not intended to be contractually binding. Abbey National Treasury Services plc. Registered Office: Abbey National House, 2 Triton Square, Regents Place, London NW1 3AN. Registered in England under Company Registration Number: 2338548. Regulated by the Financial Services Authority (FSA). *** -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: SAP DB
On Sat, 2002-09-07 at 08:35, John Nicholas wrote: Ferran Parra wrote: Hi is the SAP DB open source database a good DBMS?? why not is popular than mysql?? thanks --- Ferran Parra [EMAIL PROTECTED] http://www.mubimedia.com MUBIMEDIA S.L. C/ Mallorca, 275, 1r 2a 08008 BCN Tel: 93 215 21 91 / Fax: 93 215 41 21 --- 1) hasn't been open as long 2) mysql is good enough for most people 3) reputation for being difficult to install 4) more people know mysql so it's easier to get help if you get stuck John 1) Since Oct 2000. Has been around for a very long time as a commercial enterprise database. 2) Why settle for good enough when something which rivals Oracle's feature-set is available. 3) Specify three directories prompted by a script is not hard. 4) Hard to dispute that one. However I had linux issue, got to the bottom of it with lengthy mail list archives. there's an example script in the install which build a frsh databse, creates uses tables, and another to drop the entire instance. There's more than enough there to play with. Some more $0.02 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Additional logic:iterate helper tags wanted
On Sat, 2002-09-07 at 16:53, Michaël wrote: If you're using a JSP 1.2 container (e.g. Tomcat 4.x, Resin 2.x), you can do this (and many other cool things) using the JSTL c:forEach tag: c:forEach items=items var=item varStatus=status c:out value=${item}/ c:if test=${!status.last} ...is followed by... /c:if /c:forEach This is a great reason to start getting familiar with JSTL. :-) Does JSTL support nested collections? I'm currently using the nested taglib more than the logic taglib. While I'm sure it will allow you to view the nested collection structure as each bean is offered up by the last tag. updates from fields in a nested structure is another deal, as the JSTL wont know how to assemble the property strcture that Struts will correctly map through to the right bean. The JSTL tags don't relate to each other the way the nested tags do. There's no obvious way to make the functionality handy to the JSTL or I'd put it forward for a spec improvement. It's just that Struts had the need to get the dot notation property under control. Those people which take on that only JSTL is a good policy is simply going to miss out on what the nested tags will dor for them. Shame, but a reality. Arron. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: SAP DB
SAPDB is simply awesome. I've been ramping up a personal project which needs a complete DB arsenal, and I was worried until I met SAPDB. MySQL slows for inserts hand has a lack of SQL support. PostgreSQL has more SQL but it's slower. Both have issues over page size, data limitations. SAPDB... I went to the site, filled out some details and they mailed me the CD for free (that's Germany to Australia, for free). It's easy to install and comes with enough tools to rival Oracle out of the box. On the CD is all the implementations for all platforms (Win, Linux and all them unix's) Data limitations... is a 2GB long varchar a limitation?... Docco is also excellent. Including a document which mentions all the Oracle SQL syntax and if it supports it or not, and if it does but in a different way. The database is amazing, and I have no idea why more people aren't using it. You can download whatever you want, but my modem has a hard time of the 45MB or so. Just get the CD. I take my hat off to SAP for opening it up with the realisation that it's not where their money comes from. I'm converted. Every time I play and dig deeper I'm impressed all over. Comes with a little web server for web based administration. You wont be disappointed. Arron. On Fri, 2002-09-06 at 02:20, Ferran Parra wrote: Hi is the SAP DB open source database a good DBMS?? why not is popular than mysql?? thanks --- Ferran Parra [EMAIL PROTECTED] http://www.mubimedia.com MUBIMEDIA S.L. C/ Mallorca, 275, 1r 2a 08008 BCN Tel: 93 215 21 91 / Fax: 93 215 41 21 --- -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: problems with nested tag examples
Sorry to report that your container is out of data, and will not be able to do the true recursion that the monkey tree example uses to do it's thing. You'll have two options... update your container, or use what I'll call faux recursion. Have your page use static includes and arbitrarily mark them up. So it's either the hassle of upgrading the server (Tomcat 4, Resin 2.5.x, Weblogic 6.1 have all worked spiffy for me. Any JSP 1.2 compliant container), or only go a certain amount of levels (upgrading the container will give you potentially infinite levels). Arron. On Fri, 2002-08-02 at 00:33, Fred Livingston wrote: Hello fellow struts users; I have been looking at the nested tags example from the keyboard monkey, but can't get them to work. With jsp:include page=treenode.jsp / I get the following error: org.apache.jasper.JasperException: JSPG0080E: Invalid jsp:include tag With jsp:include page=treenode.jsp fluch=true/ I get the following error: I get the following error: java.io.IOException: Illegal to flush within a custom tag When I instead use %@ include file=treenode.jsp % I get the following error. org.apache.jasper.compiler.ParseException: JSPG0066E: Seen file \treenode.jsp already, maybe this is a recursive include?! I am using struts 1.02 with Websphere Application Studio 4.02 My eventual goal is to make a nested set of radio buttons that returns just ONE element: X --x1 x1a --x1a1 --x2 Y --y1 --y2 Z Thanks for you help, Fred Livingston -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Wrapping Collections in LazyList to auto-populate form on Submit
The seed beans would be child beans to the banana beans. You'd ask the monkey bean for the collection of bananas, and once you have a banana, you'd ask the banana for the list of it's seeds. So, the list becomes a member of the banana. Looking a little like this... public class BananaBean { public String getFlavour() { return flav; } public void setFlavour(String str) { flav = str; } public List getSeeds() { return seedList; } private List seedList = LazyCollections.lazyList(new ArrayList(), SeedBean.class); private String flav; } Nested beans are all about composition. Each nesting level will be composed of that beneath it. Monkey's don't manage seeds, they manage bananas. Seed management is up to the Banana. If there's another level, then the seed bean will take care of that. The Monkey examples of my site are an example of all this. What may be confusing is that they build objects and at times their children for sake of convenience. But the member collections themselves are always attached to the object they're concerned with. So when the request comes in, it will make the monkey object for the form. It'll then ask for the banana at the index. When the banana's made it will make the lazy wrapped list of seeds. so when an update for a seed comes in, then it will make the seed object for the banana. Once you have one level going, the rest are just as easy. From one to a hundred list levels, it's all the same. Other things come to light too... you don't have to always have the model start with monkey. Say another form which is banana specific, you can use the same banana object in another model, and it'll work just as well. Gotta love OOP :) Arron. On Wed, 2002-07-24 at 23:43, hemant wrote: Arron, Thanks for responding. Things seem to be clearer now. I have a question to ask though. We all know Bananas have seeds. (So a BananaBean can have a collection of seeds.) Now I have a situation where I have to set the property of the seed bean via the JSP on submit. Lets have a seed bean public class SeedBean { public String getColor() { return color; } public void setColor(String str) { color= str; } private String color; } Now in the MonkeyBean (Which is the formbean ) can I say the following? public class MonkeyBean { public List getBananas() { return bananas; } private List bananas = LazyCollections.lazyList(new ArrayList(LazyCollections.lazyList(new ArrayList(), SeedBean.class)), BananaBean.class); } I tried doing the same but it didnt work :( Thanks for your time hemant - Original Message - From: Arron Bates [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, July 23, 2002 10:19 AM Subject: Re: Wrapping Collections in LazyList to auto-populate form on Submit Hemant, Sorry about the issues you're having, but at face value it seems that you're almost trying too hard. Without seeing the rest of your code, it's hard to see what your generateWrappedCollection() method is trying to acheive, so I'll try to answer with code... With the collection wrapping, it's a simple one liner in the bean. For example, in all my monkey examples, they all return the collection as the indexed property type (because it's a valid indexed getter and the iterate tags can use the collection to get their thing going). All you need to do is wrap that collection directly. For example, two complete beans... public class MonkeyBean { public List getBananas() { return bananas; } private List bananas = LazyCollections.lazyList(new ArrayList(), BananaBean.class); } public class BananaBean { public String getFlavour() { return flav; } public void setFlavour(String str) { flav = str; } private String flav; } The MonkeyBean is the parent class that hold the collection. It has immediately wrapped the ArrayList in the LazyCollection, and passed it the class of the BananaBean object. You may want to keep a reference to the wrapped ArrayList, generally I don't have the need to. These classes are all but ready to rock. In the action class, query the database or whatever and populate the MonkeyBean with the BananaBean data. Serve the result to the JSP. JSP write out a list of text boxes using iterate tags. Submit this, and after the monkeybean is built, the lazy collection will grow the banana list with banana beans as the indexed requests come in. When it gets back to your action class, you'll have your collection of banana beans. Hope this helps, you know where we are if it doesn't. Arron. On Mon, 2002-07-22 at 22:59, hemant wrote: Comrades, Objective: To autopopulate forms on submit. The formbean has a collection of collections of ValueObjects. Each valueObject contains a pair
Re: Wrapping Collections in LazyList to auto-populate form on Submit
Hemant, Sorry about the issues you're having, but at face value it seems that you're almost trying too hard. Without seeing the rest of your code, it's hard to see what your generateWrappedCollection() method is trying to acheive, so I'll try to answer with code... With the collection wrapping, it's a simple one liner in the bean. For example, in all my monkey examples, they all return the collection as the indexed property type (because it's a valid indexed getter and the iterate tags can use the collection to get their thing going). All you need to do is wrap that collection directly. For example, two complete beans... public class MonkeyBean { public List getBananas() { return bananas; } private List bananas = LazyCollections.lazyList(new ArrayList(), BananaBean.class); } public class BananaBean { public String getFlavour() { return flav; } public void setFlavour(String str) { flav = str; } private String flav; } The MonkeyBean is the parent class that hold the collection. It has immediately wrapped the ArrayList in the LazyCollection, and passed it the class of the BananaBean object. You may want to keep a reference to the wrapped ArrayList, generally I don't have the need to. These classes are all but ready to rock. In the action class, query the database or whatever and populate the MonkeyBean with the BananaBean data. Serve the result to the JSP. JSP write out a list of text boxes using iterate tags. Submit this, and after the monkeybean is built, the lazy collection will grow the banana list with banana beans as the indexed requests come in. When it gets back to your action class, you'll have your collection of banana beans. Hope this helps, you know where we are if it doesn't. Arron. On Mon, 2002-07-22 at 22:59, hemant wrote: Comrades, Objective: To autopopulate forms on submit. The formbean has a collection of collections of ValueObjects. Each valueObject contains a pair of other Value Objects. Before people beat me up, The following possibilities have been dealt with: 1 No, this is not a case of reset() I have the collections initialized and things are fine. 2 It is not a case of bean being in request scope. By default the bean is in session scope (Unless we explicitly mention the action attribute that it is request scope.) [ ...cut...] I am about to give up on form auto populate as I am out of time. I will be populating them by hand but anyway... one last attempt. We dont like to lose... do we? Thanks In Advance hemant -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: getting nested tags to work with DynaActionForm???
We want the form beans to stay in session, so it has to be able to be populated when build from an empty constructor (the way beans do). Enter lists of nested objects. In the constructor you have to instantiate the list, new ArrayList() or whatever. So, new request comes in for monkey number five. But our list is only just built, no objects waiting at index number five to take the items, information is lost forever. One way you can track it, is to store the information someplace as to how many are in the list, and build the list in the reset method or whatever. Not easy unless you give the bean access to the request object... which is bad. Enter lazy lists. When you build your array list, wrap it in the lazy list, when you do so, you pass it the definition/means to build objects for the lists. Your definition. Three options, pass it a class definition and it'll simply do a newInstance() on it, the class definition and argument details so it can call a constructor with arguments, or for the most complex, you can define a factory impl against an interface. 99% of the time the class def is all you'll need. For lists within lists... all you can to do is wrap the lists in the child objects and they'll grow just fine too. Why all this?... because from very simple beans you can just forget them, leave the scope as request, and rest assured all the lists or whatever are all built and ready to go. It's just another one of those things that Struts can do for you. I'm going to work them into DynaBeans for my own use at least, because then it's all marked up... don't have to touch anything, nothing has to be explicitly handled for collections. It's not mandatory... can easily specify a build-lists=true in the definition of the property. Specs are great for defining minimum involvement. It is true that a half complete spec implementation isn't a good thing at all, but I'm of the belief that for projects like this a spec should never define the limit of a product. Must admit Craig baffles me on this topic at times. Stuff like this lazy list thing because it's not in the bean spec, but yet I don't see nested dot notation properties and mapped properties in the bean spec either. :) The bean spec has aged a bit, mapped properties and whatever. Not that lazy lists should ever be in it. But... Struts is in the business of providing a cohesive, productive framework for creating applications defined by excellence in design. It does so many things correctly and automatically for you. Excellent. Wrapping my collections in lazy lists to my beans was one more step in me knowing my forms beans are happening correctly, the definition, request scope, the whole deal... one more thing I don't have to code any longer. Less code doing the right stuff is a good thing, hang any spec, IMHO :) Arron. On Fri, 2002-07-19 at 06:04, Adam Hardy wrote: Arron, I wonder how your lazy initialisation works. I'm afraid I didn't look at the code - since you said you wanted to explain it to the masses anyway, perhaps you won't mind explaining, rather than telling me not to be so lazy myself. Basically, if you have your example: In the request parameters: monkey[1].bunch[2].banana[3].color how does your collection wrapper know what class to instantiate for monkey, bunch, etc etc? Is this something that you configure in xml somewhere? Presumably an extension to dynaform configuration? Adam Arron Bates wrote: Craig, wouldn't this be fixed by getting the collections in the DynaForm to be wrapped by the lazy lists I commited a few weeks ago to commons?... then when they're being created when the request comes in, it'll all grow as needed and it'd just happen. Been missing the past couple of weeks due to bad flu among other things. Love to get in there and code it, but time is hard to find at the moment and there's other things I need to get on to, but the above feels like a good marriage. One of the things I have to do is describe the lazy collections to the masses. Seems a few have had list constrcution issues with request scope beens in the last fortnight. On Wed, 2002-07-17 at 12:45, Craig R. McClanahan wrote: On Tue, 16 Jul 2002, Rick Reumann wrote: Date: Tue, 16 Jul 2002 22:04:54 -0400 From: Rick Reumann [EMAIL PROTECTED] To: Craig R. McClanahan [EMAIL PROTECTED] Cc: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re[2]: getting nested tags to work with DynaActionForm??? On Tuesday, July 16, 2002, 9:04:04 PM, Craig R. McClanahan wrote: CRM Setting stuff like this up in the reset() method is the standard approach. CRM Arrays have to exist already for either standard JavaBean-based CRM ActionForms, as well as DynaActionForms. I'm still a bit confused by this. When I use a standard ActionForm I don't have to do anything special with my ArrayList in the ActionForm. A page that uses this ArrayList works fine. However
Re: Setter Methods not being called in nested:iterate scenario :+(
FYI This isn't a nested tags issue at all, but a nested bean-in-a-list issue which Struts had a long time before I wrote the nested tags. They're only guilty of making something quite complex very easy to do. :) Wrap your collections in org.apache.commons.collections.LazyList, provide a class definition of your child bean and it'll be sweet and ready to do without any other effort, even in the reset() method. Arron. On Fri, 2002-07-19 at 18:24, Adam Hardy wrote: Wrong! I'll eat my hat if you haven't been gotcha'd by the nested tags gotcha. If your form is in the request, it (and its beans content) will have disappeared after displaying your page, and the new form bean on instantiation for a new request (incoming submit) will not contain the beans, because it ain't been thro' your Action yet. You need to do it in your reset() or put your form in the session scope. Everybody on the list has heard this once a week since the invention of nested tags, I reckon - sorry folks. You can apologise too Hemant, unless you ain't been gotcha'd. Coz it's all in the archives. hemant wrote: Adam Thanks for responding.. The Actionform (rangesform) itself is my root and I have a collection reference collectionOfPairs in rangesform, replete with getter/setter methods. The collectionOfPairs is instantiated and populated. If not, I would not be seeing the page with the correct data. right? As I said earlier, the getters work, the setters do not work. All this inspite of having the bean in the form. Thanks hemant - Original Message - From: Adam Hardy [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, July 18, 2002 4:39 PM Subject: Re: Setter Methods not being called in nested:iterate scenario :+( nested tags / indexed properties / nested beans gotcha. You have to instantiate the beans yourself in the form reset() if you want to capture the indexed properties. [this answer was automated, virtually] hemant wrote: Comrades, I am trying to Iterate over a Collection of Collections of ValueObjects and after some real painful experimentation (With VA 3.5.3 + Apache Tomcat + Poolman ), I got the page to come up properly :). So far so good. I went out and celebrated for a few minutes... The getter methods seem to work fine. But the user data is not being captured on Submit :( Please throw some light on this... Here is the snippet from my JSP. !--bean:define id=collectionOfPairs name = ldmservice property=ranges type=java.util.Collection scope=session/-- nested:root name=rangesform !--logic:iterate id=pairs name=collectionOfPairs type=java.util.Collection-- nested:iterate property=collectionOfRanges nested:iterate id=vopair property=this/ type=com.xxx.operations.mplanning.mpi.util.ValueObjectPair nested:root name=vopair ... ... tr td width=10%Description/td td width=90%nested:write name=vopair property=twVo.description//td /tr For some reason, the setter Method of setDescription(String xyz) is not being called. Please help... Many Thanks for Your Time Regards hemant -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Resin 2.1.1 and Struts
Pretty much performs as required. Quite tidy. Absolutely boots as it has a very optimised JSP compiler, to the letter of a spec. Makes writing tags harder because of the level of tag object reuse, but it all pays off. Because it moves faster than tomcat it's quicker to code with, kick it over an restart in a flash. Also may have to look out for the fact it likes to compile source in the classes directory. But that speeds dev work too, as just like JSP, you can simply change the code in your source and hit reload in the browser, and it'll all recompile and stuff automagically. Most cool. Arron. On Fri, 2002-07-19 at 22:33, Galbreath, Mark wrote: I'm getting prepared to build a web app using Struts on (yet) another platform - Resin. If anyone has done this, are there any Resin-specific issues involved or is it as simple as adding struts.jar to the class path and putting struts-config in WEB-INF? Thanks...and I like the beaver (nature's engineer) as the cover for Chuck's book, Mark -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Re[2]: getting nested tags to work with DynaActionForm???
Craig, wouldn't this be fixed by getting the collections in the DynaForm to be wrapped by the lazy lists I commited a few weeks ago to commons?... then when they're being created when the request comes in, it'll all grow as needed and it'd just happen. Been missing the past couple of weeks due to bad flu among other things. Love to get in there and code it, but time is hard to find at the moment and there's other things I need to get on to, but the above feels like a good marriage. One of the things I have to do is describe the lazy collections to the masses. Seems a few have had list constrcution issues with request scope beens in the last fortnight. On Wed, 2002-07-17 at 12:45, Craig R. McClanahan wrote: On Tue, 16 Jul 2002, Rick Reumann wrote: Date: Tue, 16 Jul 2002 22:04:54 -0400 From: Rick Reumann [EMAIL PROTECTED] To: Craig R. McClanahan [EMAIL PROTECTED] Cc: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re[2]: getting nested tags to work with DynaActionForm??? On Tuesday, July 16, 2002, 9:04:04 PM, Craig R. McClanahan wrote: CRM Setting stuff like this up in the reset() method is the standard approach. CRM Arrays have to exist already for either standard JavaBean-based CRM ActionForms, as well as DynaActionForms. I'm still a bit confused by this. When I use a standard ActionForm I don't have to do anything special with my ArrayList in the ActionForm. A page that uses this ArrayList works fine. However as soon as I try to use this ArrayList as property in a DynaActionForm I run into problems trying to submit a jsp page that was populated with the ArrayList info (the display works fine, it's just upon submission). If you're using request scope beans, a new instance gets created on every request. And I will bet that you probably have an initialization of this array happening in your constructor, or in an initialization expression, right? For DynaActionForm instances, the default initialization of all non-primitives in null. That's why you still need to initialize in reset(), or use the new initial property described below. CRM In recent nightly builds, we added support for an additional mechanism -- CRM you can declare an intiialization expression for arrays in the CRM form-property for a DynaActionForm bean, using the initial attribute. CRM The syntax is basically like what you use in Java to initialize an array CRM to a set of values in a variable declaration -- for example: CRM form-bean name=myform CRM type=org.apache.struts.action.DynaActionForm CRM form-property name=intArray type=int[] CRM initial={ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }/ CRM /form-bean What if the information in an ArrayList of beans that you want in a DynaActionForm is to first be populated by some database info. Do you need to first initialize it like a above to a bunch of nulls? If so what if the list size fluctuates (hence use of ArrayList) how do you know how many to initialize the ArrayList with? That's definitely a place where loading the arrays in the reset() method makes sense. Having an intArray property of type int[] on a DynaBean is very much like having the following method signatures on a standard JavaBean: public int[] getIntArray(); public void setIntArray(int intArray[]); so you don't have to pre-initialze the array to nulls or anything. Just set up the array you want as a local variable (of any desired length), populate its values, and call: int intArray[] = ...; dynaform.set(intArray, intArray); One really common scenario is that you don't know ahead of time how many items you're going to read from the database. An approach I use a lot is to use an ArrayList to accumulate the values, then convert them to an array. Something like this (assuming you have a labels property of type java.lang.String[]): ArrayList temp = new ArrayList(); Connection conn = ...; Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery(select label from customer_types); while (rs.next()) { temp.add(rs.getString(1)); } String labels[] = (String[]) temp.toArray(new String[temp.size()]); dynaFormBean.set(labels, labels); Alternatively, you could set your property type to java.util.List instead -- all the Struts tags that support indexed access against arrays work perfectly well against a List as well. Thanks for any more thoughts. -- Rick mailto:[EMAIL PROTECTED] Craig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: nested:image, image src, nested:write
On Wed, 2002-06-26 at 03:11, Barbara Post wrote: Well, this scriplet does not work, it throws an error (com.sun.tools.javac.Main deprecated), because the name attribute is not set. So here we go : what is the name of the current bean using nested tags ? ahem. nested:root %-- here the right image, use scriptlet since one cannot do else --% nested:define property=nodePix name= id=imgUrl/ nested:image src=%=imgURL%/ name attibute?... take out the name=. Nested tags set this internally, which leads me to believe that the tags are having a hard time getting a hold of the bean name from the root tag. What's the root tag look like?... (the empty root tag in this snippet is used for nesting through includes, need to figure out the bean which the tags of the other JSP is using). Remove these tags, does it all work fine?... Another thing you could try is to put a property property into the image tag. You'll need this to match up the clicks coming out of the list. If you don't need the property property, use the original html:image in its place. Arron. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: off topic ( about java mail api)
Nothing's going to happen without access to a working SMTP server. If there's a hole in your firewall for the SMTP port (25 at last check), then you can use someone else's smtp server which doesn't have an security checks. Many ISP's restrict use to IP's from their dial-up servers and/or unsername password. But, many don't. There was a big fiasco in china because they have lacking security, and people were sending mail using their servers so the US blocked their IP's. Can read about it on slashdot.org. Forum for JavaMail specifically... http://forum.java.sun.com/forum.jsp?forum=43 Arron. On Tue, 2002-06-25 at 17:42, [EMAIL PROTECTED] wrote: wanted to ask you all just one thing, we are using lotus notes as default mail client and lotus notes server , there is no pop3 or smtp server as far as the intranet mailing goes, i am developing an application in which i have a form which the users will fill in if they forget their logging in passwords, as soon as they submit the form they will get an autogenerated email which will send them their passwords. considering the above scenario can i use java mail api for this. i have already posted in the java mail api forum but did not get a reply.please could some one suggest some thing. any suggestions will be appreciated, you could mail them to my mail id [EMAIL PROTECTED] regards, amit malhotra -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: MonkeyBean and JSP
The Struts 1.0 part is fine, but Tomcat 3.x cannot do the recursive JSP stuff. A limitation of the earlier JSP 1.1 spec around the use of custom tags and the inclusion of other JSP evaluation. Something that the true recursive nature of the tutorial requires. You'll have to upgrade to Tomcat 4, or some other JSP 1.2 container. Sorry for the inconvenience. I have to propagate through my site that it requires an up to date container. Arron. On Wed, 2002-06-26 at 00:34, Alan Halley wrote: Hi, I'm trying to run the tutorial examples on Tomcat 3.2.3 and Struts 1.0. I keep getting include requires flush=true compiler error when compiling MonkeyTree.jsp. When I put flush=true I get Illegal to flush in custom Tags. Any help or advice would be gratefully received. TIA Alan Halley -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: nested:image, image src, nested:write
!-- here nesting will build menu -- nested:root nested:nest property=buildMenu jsp:include page=buildmenu.jsp / /nested:nest /nested:root jsp:include page=footer.jsp flush=true/ m... recursive nesting through includes, cutting edge :) nested:equal property=showChildren value=true !-- here the right image -- nested:image src=nested:write property=nodePix/ / !-- miss some formatting depending on level-- nested:write property=nodeValue/br !-- iterate -- nested:iterate property=childCollection jsp:include page=buildmenu.jsp / /nested:iterate /nested:equal The embedding of the nested:write tag inside the nested:image tag is illegal, because it's bad XML, which means the JSP page will have issues with it. Closest you'll get to doing exactly this is... nested:define property=nodePix id=imgUrl / nested:image src=%= imgURL% property=myImageProperty / The smallest of snippets to get the value out and into the tag, but any programmer who has issues with it is simply not the pragmatic variety :) Enjoy. Arron. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: off topic ( about java mail api)
Another option would be to write your own JavaMail Transport implementation that talked to Lotus Notes. Craig, you do this kind of thing often?... how many RFC's have you coded an impl of?... round it off if the number's too large :) Notes does have plugins to get the POP/IMAP/SMTP working. Probably pricey. Mail could be another enterprise's department all together. Love politics. Arron. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: If you haven't seen this yet.
Got mandinga from Ace Ventura. Just sounds cool especially the way Carey says it. As to what it means, the closest I've heard is that it's a south american term for the devil, which seems to fit. On Sat, 2002-06-22 at 15:53, micael wrote: Not quite sure what you are saying here, Aaron? If we are not talking about Flash, then guess you are right. If we are, then that is a different matter. My apologies if the topic was not Flash. I took it that was Mark's topic, since he said Flash scripters. Maybe I am being too literal. If so, I guess I should not be so detail-oriented, and there you go? Mandinga, like the art of self-defense? Or is that also an aussie word of some different meaning? At 02:58 PM 6/22/2002 +1000, you wrote: Haven't done anything serious in Flash?... the scripting inside it is quite excellent (now. Not thier first ireatation with v4). Mark was probably (hopefully?) talking about this scripting ability. Used not unlike another image format?... wow. You need to take a more serious look, mandinga. On Sat, 2002-06-22 at 02:30, micael wrote: Calling the use of Flash script[ing] is like calling the use of gif or jpeg images scripting. Don't confuse the superficialities of the plugin-html with the real product. Using Flash is not really unlike using a pgeg or a gif image, except that it has a lot more to offer. In images, Flash is to a jpeg what object-oriented programming is to procedural programming. A class is a data type that can be used to manipulate data. Flash, similarly, is an image type that can be used to manipulate images. It is what can be inside the Flash that is exciting. The script is unimportant. To think of Flash as scripting is akin to thinking of object-oriented programming as the stuff inside main. By the way, not that it matters, but a somewhat ironic detail of English grammar is that attention-to-detail is not correct. I personally would prefer a coder who knew what Flash was, as opposed to a coder who is intimate with Dalmations. ///;-) At 07:04 AM 6/21/2002 -0400, you wrote: I guess Flash scripters don't know the difference between a Dalmation and a Black Lab, huh? That's the kind of attention-to-detail I'd be looking for! ;-) -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED]] Sent: Friday, June 21, 2002 12:38 AM To: Struts Users Mailing List Subject: If you haven't seen this yet. Mark, I thought you'd like this one :-) http://www.theserverside.com/home/thread.jsp?thread_id=14080 James Mitchell Software Engineer\Struts Evangelist Struts-Atlanta, the Open Minded Developer Network http://struts-atlanta.open-tools.org -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: If you haven't seen this yet.
Haven't done anything serious in Flash?... the scripting inside it is quite excellent (now. Not thier first ireatation with v4). Mark was probably (hopefully?) talking about this scripting ability. Used not unlike another image format?... wow. You need to take a more serious look, mandinga. On Sat, 2002-06-22 at 02:30, micael wrote: Calling the use of Flash script[ing] is like calling the use of gif or jpeg images scripting. Don't confuse the superficialities of the plugin-html with the real product. Using Flash is not really unlike using a pgeg or a gif image, except that it has a lot more to offer. In images, Flash is to a jpeg what object-oriented programming is to procedural programming. A class is a data type that can be used to manipulate data. Flash, similarly, is an image type that can be used to manipulate images. It is what can be inside the Flash that is exciting. The script is unimportant. To think of Flash as scripting is akin to thinking of object-oriented programming as the stuff inside main. By the way, not that it matters, but a somewhat ironic detail of English grammar is that attention-to-detail is not correct. I personally would prefer a coder who knew what Flash was, as opposed to a coder who is intimate with Dalmations. ///;-) At 07:04 AM 6/21/2002 -0400, you wrote: I guess Flash scripters don't know the difference between a Dalmation and a Black Lab, huh? That's the kind of attention-to-detail I'd be looking for! ;-) -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED]] Sent: Friday, June 21, 2002 12:38 AM To: Struts Users Mailing List Subject: If you haven't seen this yet. Mark, I thought you'd like this one :-) http://www.theserverside.com/home/thread.jsp?thread_id=14080 James Mitchell Software Engineer\Struts Evangelist Struts-Atlanta, the Open Minded Developer Network http://struts-atlanta.open-tools.org -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: logic:iterate id?
Seems that you're trying to write out a property instead of the bean. Try this... logic:iterate id=mc name=entries property=mcEntries type=com.moog,us.eos.beans.MCEntry bean:write name=mc property=oldDept / bean:write name=mc property=oldMatch / bean:write name=mc property=newDept / bean:write name=mc property=newMatch / bean:write name=mc property=pivotDept / bean:write name=mc property=pivotMatch / /logic:iterate ...should get you back on the road. Arron. On Fri, 2002-06-21 at 04:59, Kamholz, Keith (corp-staff) USX wrote: When you use the logic:iterate tag, do you have to define the id that stores the result of the iteration before the tag? My code is: logic:present name=entries property=mcEntries logic:iterate id=mc name=entries property=mcEntries type=com.moog.us.eos.beans.MCentry bean:write name=mc.oldDept/br bean:write name=mc.oldMach/br bean:write name=mc.newDept/br bean:write name=mc.newMach/br bean:write name=mc.pivotDept/br bean:write name=mc.pivotMach/br /logic:iterate /logic:present logic:notPresent name=entries property=mcEntries biNO ENTRIES/i/bbr /logic:notPresent If I don't define the id before the iterate tag, I get a runtime error that says: Cannot find bean mc.oldDept in scope null: However, if I do define the id, then I get a compile time error that complains about a duplicate variable. Maybe the cannot find bean error is referring to the oldDept part rather than the mc, but I dont' know. What's going on? ~ Keith -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: how to solve a problem of fetchin' HUGE collection into form
Dare I say it... better info design. The most I've had was 500. From the user's point of view, this is not good. The freezing will most likely not be the server side, but your browser slowly rolling over and having a cardiac arrest. :) Take the lower end of 100,000 options. If eack option had only one letter, one byte, the dowload is already 1MB. Take that to an average of say 15 bytes per record up to 300,000 and the result is one impressive drop-down box. Try getting the text that would be rendered into Html, get it into flat Html, and then test it on the browser. I'm quite sure that you'll be changing your mind and making it a free-text field real quick. Arron. On Fri, 2002-06-21 at 10:48, Slava_L wrote: I have a form with several fields. And one of them is SELECT field - 4xmpl streets names. All streets names are stored in database, amount 100-300 thousands records And the problem is that when this field renders on the page, app is freezing for a long time. how am i suppose to solve kinda problem ? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Are there any Java Graphics gurus out there?
I don't mean to sound harsh, but if your post starts off with Wy off topic... then it really shouldn't be posted. A page on the Sun site about handling images of all kinds, and there's a code sample for TIFF... http://java.sun.com/products/java-media/jai/iio.html It will get you to an Image object, and then from there you can pass it to the JPEGImageEncoder or whatever. As I said before (off the list), the information is already out there, you just have to go get it. I found this by searching java reading tiff image files on www.google.com and it was the third link down. But I hope you get the solution you need. I already know that the answer wont be from this list... Arron. Jerry Jalenak wrote: Michael, Thanks for the reply. My problem is fairly basic, but I can't seem to figure it out. Here goes From my webapp I capture a 'control number' that I then pass over to an image server through a socket connection (port 4177). The image server then responds with the number of images related to the control number along with the file names. This much work fine. I then pass each file name back to the image server through a different socket connection (port 4178). The image server responds with the file size, then streams the file back to me. The file is a TIFF image. What I am struggling with is how to capture this TIFF image, and convert it to JPEG. I've looked at the ImageIO classes, but they don't natively support TIFF (yet). I read someplace this morning that you can register the JAI TIFF class for use with ImageIO, but can't figure out how to do that. JAI might be the answer, but again, I can't figure out how to do a JAI.create where the source is a socket and not a file. I know there's got to be an easier way to do this, but with my limited background in Java (only been coding in this for a few months now), I am at a total loss. Any help is greatly appreciated. Thanks. Jerry -Original Message- From: Michael Mehrle [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 18, 2002 5:46 PM To: Struts Users Mailing List Subject: Re: Are there any Java Graphics gurus out there? Java Guru I don't know, but I have done a lot of Java graphics in the past what do you need? - Original Message - From: Jerry Jalenak [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 18, 2002 6:33 AM Subject: Are there any Java Graphics gurus out there? Way off topic, but I'm desparate. If any of you have any experience with working with graphics, could you please contact me off-list at [EMAIL PROTECTED]? Thanks. Jerry This transmission (and any information attached to it) may be confidential and is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient or the person responsible for delivering the transmission to the intended recipient, be advised that you have received this transmission in error and that any use, dissemination, forwarding, printing, or copying of this information is strictly prohibited. If you have received this transmission in error, please immediately notify LabOne at (800)388-4675. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Nested Tags question
As far as the problem goes concerning setting against valid indices, my code does that simply enough using a check against ArrayList.size() and the index from the request parameter - if the size is too small, I just add new objects - 3 lines of code. This is all in a for loop, which could recurse - presumably what your commons wrapper does. Guess I'll find out. That's pretty much what it does. Only thing is it's tackled at the collection level so that you only need to use the properties which return and set the collection itself. You have to provide one of these to the iterate tags anyways. Means you don't have to manage the collections yourself. It's all of a muchness, so I'll just say it's less to be concerned with on a regular basis as a wrapper :) Arron. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Nested Tags question
Adam, Back to the old want lists, but no session objects issue. It's a common problem these days. It's hard to get the list model working nicely without knowing how big the list is going to be so that objects can be set against valid indexes. The post you speek of in the archives is that I've made a collections wrapps in the commons project which will wrap collections so that they can expand by definition when the request comes in with indexed or mapped properties. I'm cutting a short tutorial on it (how to make funky complex form models leaving the session object in the closet), should be finished in the next few days. It should help a lot of people. Most people end up with indexed lists, but it's hard to get them working properly on the back end. It's not just a nested tags thing. If you don't mind wading through code and having a go at the collections wrapper with nothing but javadoc (good javadoc though :)... http://cvs.apache.org/viewcvs/jakarta-commons/collections/src/java/org/apache/commons/collections/LazyCollections.java Arron. Adam Hardy wrote: Hi Down Under, thanks for the reply. I figured that the form properties setting thing must be struts, after checking out the JSP spec. JSP does do a certain amount of it though, since you can specify a tag in your jsp and say parameters=* - and JSP will match any parameters in the request to methods on the tag's bean. Anyway sorry for sounding like such a dumbass but I've been through your tutorials. For the display, I've got the nested tags sussed - it's for the save on submit that I'm having problems. It's one of those aggravating problems that I can't pin down so it's difficult to ask the right questions. I've actually hacked out some code to stuff the request parameters into the bean structure by hand in the form's validate method. Obviously I'd like to do it automatically but I had to get the app working. To try to sort out what I've done wrong, I'll strip it back to the simplest bare bones and take it from there. What I can't work out from playing with your SavingMonkey demo is how struts gets the request parameters into beans inside each other inside the formbean. Is it necessary to instantiate the right amount of empty beans first? I see SavingMonkey instantiates everything on construction. When saving request parameters to the beans in the formbean, does struts call the beans' getter methods to get the ArrayLists and beans? I can't see how else it would get access the setter methods on the deeper nested beans. Thanks for your help. I did see a message in the archives here but I can't find it again, where you were talking about changes awaiting acceptance in CVS - is that just stuff that is now incorporated into struts 1.1? I'm using 1.0.2 All the best, Adam -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Nested Tags question
try... document.forms[0][mailingAddress.city] ...works a treat. Arron. Jayaraman Dorai wrote: When I use nested tags, I am not able to access it through java scripts since the name is mailingAddress.city. Does anyone have a work around or am I missing something? Jayaraman -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 13, 2002 12:23 PM To: Struts Users Mailing List Subject: Re: Re: Nested Tags question On Thu, 13 Jun 2002 [EMAIL PROTECTED] wrote: Date: Thu, 13 Jun 2002 11:43:59 +0200 From: [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: Re: Nested Tags question So Craig, does the process work at submit time (when the request parameters are being put into the nested beans) via calls to the getter methods to get the beans on which the parameters have to be set? I can't see how else it would work. It depends on what context you are using the expressions in. For example: !-- Assume the form bean name is customerForm -- html:form action=/editCustomer ... html:text property=mailingAddress.city/ ... /html:form will, in effect, do a call to: customerForm.getMailingAddress().getCity() when the page is displayed, and a call to: customerForm.getMailingAddress().setCity() when the request parameters are being copied in to the form bean. Adam Craig Craig R. McClanahan [EMAIL PROTECTED] schrieb am 13.06.2002, 08:22:43: On Thu, 13 Jun 2002, Arron Bates wrote: Date: Thu, 13 Jun 2002 14:14:13 +1000 From: Arron Bates Reply-To: Struts Users Mailing List To: Struts Users Mailing List Subject: Re: Nested Tags question I know JSP will automatically save parameters to a javabean with the correctly named getters and setters, but there's obviously a gap in my knowledge because all my attempts to recreate the situation above have failed. Setting form properties against beans is a Struts thing, not a JSP thing. The property thing is a Bean thin and can be looked up in the JavaBean spec. The example you quote... monkeyTeamAlpha.monkeyWorkers[0].salary ...is a nested property. An invention implemented within Struts (Craig?). Yep, although in Struts 1.1 it is really a commons-beanutils thing because we abstracted out this generally useful code into a separate package. What it basically is, is a string of calls rather than the single property method. Here, it will get a hold of the form bean, get a hold of the bean returned from the monkeyTeamAlphaproperty. On this bean, it will invoke the indexed property monkeyWorkers[0] which will pluck a bean from a collection or index provided, from this last bean it will will get a hold of its salary property, and set the value. At each stage, you also get the benefit of some intelligence that is built in to the underlying PropertyUtils class. For example, the JavaBeans spec defines two ways to define an indexed property -- you can use getter and setter methods that take a value and a subscript, or you can use getter and setter methods that return the entire array. PropertyUtils makes the expression listed above work for either (or even for a property whose value is a java.util.List, which is an extension to the JavaBeans spec). All this boils down to, is that you can compose objects a little cleaner, rather than have truly enormous beans for everything. Having the indexed properties allows for lists and whatever else. The ability for nesting beans has been in Struts for a long time. The nested tags just make it much easier. There's a primer and tutorial for nested beans here... http://www.keyboardmonkey.com/next ...it should take you over creating and using such a construct. Hope this gets you on th path you're after. Another area of useful learning for the future is the JSP Standard Tag Library (JSTL). Although the expression language syntax supported by JSTL is different from the one in Struts, it is well worth learning about -- this expression language will be supported anywhere in a JSP page in JSP 1.3, and (in the mean time) we will likely adapt Struts tags to be able to use it as well. Arron. Craig -- To unsubscribe, e-mail: For additional commands, e-mail: -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Nested Tags question
Adam, Should say that the monkey example's not the mos simple example. It's more of a what's possible than a learners tool. I just posted the link to the tute's and primer. The Tute's walk through from a plain, non-nested bean, to the initial nesting, to the lists, and lists within lists... I'd recommend going that way. For convenience, that link again... http://www.keyboardmonkey.com/next A couple of people have had a stumbling start because they found the monkey example first and love to hack that than take the walking tour. I'm considering removing it from the nesting-newbie eye. If you have any more issues or questiong, you know where we are... Arron. [EMAIL PROTECTED] wrote: Hi All, I am trying to save a list created with the nested:iterate tag (from an object array in my form bean). I've written my code by following the SaveMonkey example from Arron Bates' KeyboardMonkey site (kudos to you, capt'n) - but the object array doesn't get recreated on a submit! Can I use a nested:iterate tag on an array straight out of the form bean? That seems to be the only difference I can see between mine and the SaveMonkey demo. The setList(Object[] newList) isn't working. Struts or Tomcat isn't recognising it as a normal javabean property setter I guess. Here's what the HTML looks like: form name=operationForm method=POST action=/apla/operationList.do input type=hidden name=list[0].opIdString value=31 input type=text name=list[0].packageName value=Pack1 Should I keep looking for a bug that's stopping the setList() method from being recognised as a setter method? Thanks if you can help, Adam -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: I should know this, but....
First off, no need for the name attribute. If it's not working off the same bean structure the other nested tags are, then use the original bean:define tag using the name attribute to get to the separate bean. Otherwise from face value the tag markup looks fine... you may want to vary the name of the property to the id for clarity however. Another point which may save you having issues, is that you can use the property property like a directory structure with relative and absolute references... Check this out for more informative info... The The relative references and the property property part... http://jakarta.apache.org/struts/api/org/apache/struts/taglib/nested/package-summary.html#doc.PropertyProperty ...with that you can just use the bean:write tag where you need it, and use the absolute reference from the root of the bean to get to the right spot. Hope any of this helps in some way. Arron. Jerry Jalenak wrote: Hi All, Really easy question, but I'm apparently too dumb to figure it out ;) I get a run time error of 'Missing Term' (about var1 in the anchor tag) when I do the following: nested:define id=var1 name=beanName property=var1 / a href=% =var1 %This is my anchor/a This is a simplistic example - I actually need to use 'var1' in several places throughout my jsp inside of deeper nested:? tags. Any ideas? Thanks! Jerry [EMAIL PROTECTED] This transmission (and any information attached to it) may be confidential and is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient or the person responsible for delivering the transmission to the intended recipient, be advised that you have received this transmission in error and that any use, dissemination, forwarding, printing, or copying of this information is strictly prohibited. If you have received this transmission in error, please immediately notify LabOne at (800)388-4675. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: nested img
Hi I was wondering why isn't there a nested:img tag? I want to have a nested image with a link, ie: nested:img src=someimage.gif name=somebean property=someMap/ Is there an alternative? No alternative. Just had a look through. It's valid, I'll have to make one and get it in there. I could do nested:link name=somebean property=someMap/img src=someimage.gifnested:link/ but it creates an ugly border around the image... try... nested:link name=somebean property=someMap /img src=someimage.gif border=0/nested:link ...there shouldn't be an ugly border. I'd also recommend getting the height and with of the image in the tag also, because it will reserve space on the page for the browser until the image loads. That's why some pages suddenly expand all over the place while you're trying to read the content that's there. The image sizes haven't been specified in the Html. I'll get onto the img tag though. Arron. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: nested tag issue
Absolutely right. What this code is trying to say, is that the nested tags need a valid root tag on each JSP. In this case, David's used the nested:root tag. It can also be the html:form or nested:form tags. The form tags are bound to their form definition in struts-config.xml, to escape this and use an external bean, the nested:root tag is required. Reason for all this, is the tags look up their parent tag, and it in turn looks to its parent etc etc etc. If there's no root tag, then they'll run out, and not know what bean they're meant to be working off of. Even when nesting through dynamic includes, the included JSP's need a nested:root tag without parameters, so it's child tags can get that reference without running off the top of the JSP page looking for a parent. Just in case anyone wanted the explanation. Arron. David Morris wrote: Dean, This is like the blind leading the blind. I wonder why you don't want to declare a form but something like this should work: nested:root name=attributeNameOfBeanContainingYourCollection nested:nest property=myCollection nested:iterate property=myCollection nested:write property=myDate/ /nested:iterate /nested:nest /nested:root David Morris [EMAIL PROTECTED] 06/03/02 04:07PM ...This works, where filter.do maps to the form that holds myCollection: html:form action=/filter.do nested:nest property=myCollection nested:iterate property=myCollection nested:write property=myDate/ /nested:iterate /nested:nest /html:form This doesn't: nested:nest property=myCollection nested:iterate property=myCollection nested:write property=myDate/ /nested:iterate /nested:nest Thanks in advance. Dean Chen -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]