Re: What was the name of this application? [was] Re: Are there any IDE's that understand Struts tags?
Rick Reumann wrote: Actually there was a struts application/IDE that was for demo that was quite impressive but now I forgot the name. Was it NitroX from M7? http://www.m7.com/ The pricetag isn't *that* hefty. -- bOOyah - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Are there any IDE's that understand Struts tags?
Mike Duffy wrote: I've looked at some of the current Struts design tools and they appear to be over-glorified config file editors. I think there is an opportunity for some of these small companies who wish to play in the IDE space to create a JSP editor plugin for Eclipse that supports both Struts and JSTL. I'd pay real money for such a plugin. Have you taken a look at this? http://www.demosondemand.com/clients/m7/001/page/demo.asp (Check out the long version). -- bOOyah - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Selects
Jonathan Wright wrote: Can anyone see anything wrong with the following select and option tags? I cannot fathom out why I keep getting an exception thrown in the BodyContent.clearBody method. This does not work: Select One Auckland Christchurch Dunedin Gisborne Hamilton Hastings Invercargill Napier Nelson New Plymouth Palmerston North Rotorua Tauranga Wanganui Wellington Whangarei Other The only way I can get the page to work at runtime with the select tag included is to do the following: Even a single white space in the body causes the page to fail, e.g. Any help would be most appreciated! Hi Jonathan I copied and pasted your non-working example into my JSP, and added a 'location' property to my form bean (which I defaulted to "Christchurch" in struts-config.xml) and it worked a treat. No exceptions. I'm using vanilla Struts 1.1 and JBoss 3.2.3 + Tomcat 4. Regards, -- bOOyah - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Any ideas for time-limiting demo web apps?
Jesse Alexander (KXT) wrote: use a certificate. validation of valid-timerange is almost free. And that's what I decided to do. I get a cert from a keystore and check its validity. I catch 'CertificateExpiredException' and 'CertificateNotYetValidException' and output error messages accordingly. hope this gives some ideas Yes, it did. Many thanks Jesse. It was really easy in the end (especially since my requirements were lightweight). -- bOOyah - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] Any ideas for time-limiting demo web apps?
Very off-topic this one, but I'm wondering if anyone has any good techniques for preventing a web app from working beyond a certain time? I'm thinking of the situation where demo or Beta versions of the app are distributed in the field and you want limit how long they will continue to work. Obviously I could check the system clock and perform a crude calculation. But how would I trap the system clock being reset back in time? Are there lightweight alternative techniques? TIA. -- bOOyah - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to use resource bundle in attributes
Ralf Schneider wrote: how can a use internationalized text strings stored in a resource bundle as values of attributes? Hi Ralf Have you tried I use the 'titleKey' attribute like this on 'html:submit' buttons. -- bOOyah - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [VERY OT] Wireless Mice...what gives??
Barett McGavock wrote: I agree with you 100% and share your concerns about the wireless mice. I am shopping for a non-wireless mouse for myself, as well. I'm looking at products in stores from both Microsoft and Logitech that are not wireless. I presume that these are not the newest-out products. Hah! I stopped by PC World this afternoon. For those of you who don't live in the UK, PC World is the computer supplies shop least likely to have in stock the one item you really require. Imagine my surprise when I picked up the _last_ non-wireless Intellimouse Explorer 4.0. All the others were wireless. I'm using it right now and it's a fine rodent. Almost the same size as its predecessor, but slightly more sculpted. The wheel has no click-stops; it has a completely smooth and initially disconcerting scroll. But I like it, I think. That said, I was torn, much to my surprise, between the MS Intellimouse and Logitech's MX 500. That mouse was a fine piece of work. The only feature it lacked was the side-scrolling function of Microsoft's wheel. And it felt 1% less chunky than Microsoft's equivalent. Still, a pleasant surprise from a company that I traditionally equate with nanotechnology. Happy hunting RSI Warriors. -- bOOyah - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [VERY OT] Wireless Mice...what gives??
Neale, Bennett wrote: I have the wireless bluetooth mouse from M$. It's cool for me because I have it hooked up to my pc at work and on my laptop at home. The thing that sucks is exactly what you hit on, the batteries. I've never owned a wireless mouse before but if I could get 6 months out of the batteries I'd be happy. On average for me they run out about every 6 weeks. And bluetooth is generally pretty easy on power requirements. Are you a gamer perchance? I used to need a new mouse every few months when Tribes was de rigeur. -- bOOyah - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [VERY OT] Wireless Mice...what gives??
Riyad Kalla wrote: "Power User" w.r.t. to mice gives me a mental image of someone grunting and sweating while muscling their mouse around their desk... That would be Steve Ballmer. -- bOOyah - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [VERY OT] Wireless Mice...what gives??
Barett McGavock wrote: I agree with you 100% and share your concerns about the wireless mice. I am shopping for a non-wireless mouse for myself, as well. I'm looking at products in stores from both Microsoft and Logitech that are not wireless. I presume that these are not the newest-out products. Let me know how you go Barett. At worst I could buy another Intellimouse Explorer, but I'd like to inflict something new on my carpal tunnel. One time before, I opted for a flashy Logitech. But it was so small I had to operate it using tweezers. Amazon must have taken its picture with an electron microscope. -- Sean - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[VERY OT] Wireless Mice...what gives??
It's Friday. I need to buy a replacement for my borked Intellimouse Explorer. It's starting to issue double-click events, which is pretty disconcerting. At least, I _hope_ it's my mouse, otherwise my RSI has taken a nasty turn for the worse. I'm a fan of Microsoft's mice because the devices in its Explorer range are nice and big, just like my hands (Logitech's rodents tend to be smaller). But nearly all the Microsoft mice available on Amazon.co.uk are wireless. Ditto for my other favourite site, dabs.co.uk. A quick excursion to Microsoft's corporate Mouse site reveals that, yes indeed, all the latest Explorer mice are wireless. Despite finding the concept of an stationary, yet wireless device deeply crazy, I might just buy a wireless mouse and have done with it...life's just too short. But I think having to replace batteries every 6 months would get right on my nerves. Any opinions? Does replacing the batteries in your wireless mouse or keyboard drive you nuts? Are there real advantages to using a wireless input device that I just cannot see? Trivially yours, -- bOOyah - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to forward from one LookupDispatchAction to another LDA
Riyad Kalla wrote: booya I really appreciate the code snippets and explination! I hadn't gotten involved in ActionForwards and appreciate you shedding light on the situation for me. No problems Riyad! I'm glad to give back to this list after sucking it dry for three months ;-) -- bOOyah - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to forward from one LookupDispatchAction to another LDA
Riyad Kalla wrote: UPDATE: Upgraded my Struts install to nightly build and now the code snippet below works. I'm still curious if anyone knows how one LDA can forward to another (or the same) LDA, even if it takes manually setting the parameter value (how?) protected ActionForward unspecified( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { return showList(mapping, form, request, response); } I have also used this in the past, but without execution errors (I'm using Struts 1.1 stable). But as you've rightly spotted, you are limited to only being able to forward to another method in the same Action. I, too, felt this was an 'ugly' solution because the Struts Controller is bypassed and you cannot change your mind about unchaining those actions without editing Java. I read somewhere authoritative that ActionForward was created for just this purpose; you chain the actions in the Struts config file instead. However, chaining actions programmatically could be a perfectly valid thing to do though...I've only been using Struts for three months ;-) -- bOOyah - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to forward from one LookupDispatchAction to another LDA
Riyad Kalla wrote: Does anyone know how I would be able to forward from one method in an LDA to another method in the same LDA (or any other LDA for that matter...)? I do exactly this in my own apps. I use Struts forward Actions in my struts-config. What about something like this? (I'm assuming your exsiting Struts forwards and 'showList' method work): Struts-Config.xml: = Your Action class: = public ActionForward execute(/* the usual args */) { ActionForward forward = new ActionForward("defaultErrHandler"); String method= request.getParameter("method"); if (method!= null && !method.equals("")) { if (method.equalsIgnoreCase("showList")) { forward = showList(mapping, form, request, response); } else { forward = super.execute(mapping, form, request, response); } } return forward; } ... public ActionForward moveDown(/* the usual args */) { ... // Success! Now refresh the re-ordered list: return mapping.FindForward("successShowList"); } public ActionForward showList(/* the usual args */) { // hit the DB for the new list and forward to the JSP // etc. } To summarise: (1) The 'moveDown' handler is called. (2) It looks up "successShowList" thereby forwarding to "/forward/product/showList". (4) "/forward/product/showList" forwards back into your Struts Action class with a 'method' parameter called 'showList' causing your existing 'showList' method to execute. That's all off the top of my head Riyad. But I use that approach all the time. -- bOOyah - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ActionErrors in my JSP: how can I rewrite this RT snippet as EL?
Takhar, Sandeep wrote: Craig McLanahan wrote something about this recently. I may be wrong since I haven't done this, but you may need '' quotes around the property since there are '.'s in it. No Sandeep, wrapping single quotes around the property didn't seem to make any difference. Not even wrapping the single quotes in double quotes ;-) Niall's suggestion worked well though. Thanks anyway. -- bOOyah - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ActionErrors in my JSP: how can I rewrite this RT snippet as EL?
Niall Pemberton wrote: It should be .. or even Sorry for the delay in replying Niall...my wife MADE ME down tools for a day. Yes, indeed both your suggestions work perfectly. I'm using the 2nd one. Am I right then in guessing that would display all messages (errors or otherwise)? Is it now that simple? What threw me originally is that 'org.apache.struts.action.ERROR' no longer exists in the online Struts javadocs. So I got embroiled in following the path of deprecation, and I couldn't get the current recommendations to work :-( Thanks a mill for your help. -- bOOyah - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
ActionErrors in my JSP: how can I rewrite this RT snippet as EL?
Hi I'm displaying validate() ActionErrors in my JSP using the RT html:errors tag. But I can't seem to be able to successfully rewrite my snippet of Struts RT in EL. This works: <%@ page import="org.apache.struts.Globals"%> <%@ page import="org.apache.struts.action.ActionMessages"%> ... But this doesn't work (using the logic & html EL taglibs): <%@ page import="org.apache.struts.Globals"%> <%@ page import="org.apache.struts.action.ActionMessages"%> ... Can anyone help? Thanks -- bOOyah - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:error and quotation marks...
Henrique VIECILI wrote: have you tried changing your ApplicationResources to err.name.required=The {0} field is required (whitout the quotes') ? Sorry Henrique...it was my own stupidity all along. My app was using an old Application.properties file that had my message enclosed in quotation marks, but I was editing a new one by mistake. DOH! Thanks anyway. And those single quote marks don't cause any problems. They work as expected so I left them in. -- bOOyah - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
html:error and quotation marks...
Howdy all I'm using html:error to put an error message next to a form field that must not be blank. But the message is rendered with quotation marks around it. I don't want quotation marks. Am I doing something I shouldn't, or is there any way to turn this behavior off? My JSP looks like this: The resulting HTML looks like this: "The 'Name' field is required" My Form.validate() == ActionErrors errors = new ActionErrors(); if (getMyName() == null || getMyName().length < 1) { errors.add("myName", new ActionError("err.name.required", "Name"); } return errors; My Application.Properties file ====== err.name.required=The '{0}' field is required Thanks -- bOOyah - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How can I concatenate bean properties in html:optionsCollection output?
James Mitchell wrote: You should do this in your action prior to forwarding to your jsp. Thanks James - I suspected as much. :-\ -- bOOyah - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How can I concatenate bean properties in html:optionsCollection output?
Hi again I'm doing this: I'd like the label string to be a concatenation of the value plus the label attribute. Sort of like this: Is there a Struts tag I can use, or do I have to doctor the beans in the underlying options collection? Thanks. -- bOOyah - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Translating i18n keys in Struts?
Joe Hertz wrote: You just need property files defining the various i18n strings. http://www.anassina.com/struts/i18n/i18n.html Sorry Joe - I obviously didn't explain myself adequately. I already have property files containing i18n keys + strings. Like this: ApplicationResources_en.properties -- menu.item.search="Search" menu.item.about="About This Application" ... And in my Struts Action I'm sending a collection of menu entries to the JSP (which uses 'html:select' and 'html:optionsCollection' tags to render the menu): MenuItem item = new MenuItem(); item.id=1; item.value="menu.item.search" menuCollection.add(item); item.id=2; item.value="menu.item.about" menuCollection.add(item); ... All this does is render a HTML select list containing the "menu.item..." strings rather than the locale-specific strings. So, in my Action class I have added a helper method that iterates through the menuCollection, replaces the i18n keys with their actual locale-specific strings and places THAT collection in the form as the menu. This translation happens every time the Execute() method is called. But is there some i18n 'magic component' in Struts that would do that for me? Or do I have to rewrite (or reuse) my helper method in every Action for now on? Thanks. -- Sean - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Q: Translating i18n keys in Struts?
Hi I want to use 'html:select' and 'html:optionsCollection' to draw menus on my page. I'm thinking of filling my collection of menu strings with i18n keys that correspond to string properties in my various resource bundles. So menuList[0] = "menu.item.search" menuList[1] = "menu.item.about" ... and so on. Is there a neat Struts way of translating these keys to actual locale-specific strings on their way to the JSP, or even in the JSP itself? Or do I have to write my own helper methods in my Action classes? Thanks. -- bOOyah - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [slightly OT] Any advice for 'jsp.error.useBean.duplicate' ?
Joe Hertz wrote: The old 'alternating-table-row-color' trick. No doubt there's a better way of doing that too. Thought about using the "one minus 1|0" trick? Initialize some int to 1 or 0: int index = 0; Then in your loop do: index = 1 - index; And set the color based upon some two element array based on index: color = colorArray[index]; I like that. Nice. Thanks for the reply Joe. -- bOOyah - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [slightly OT] Any advice for 'jsp.error.useBean.duplicate' ?
Curtis Taylor wrote: You're creating the bean "status" in the varStatus declaration in your c:forEach action. It's in scope in the loop as "status" already, so you don't need to re-initialize it. You can access its attributes inside your loop: ...etc. *sigh* You are, of course, correct. I could have sworn I tried that. I certainly swore. Just curious; what're you trying to do inside the loop? The old 'alternating-table-row-color' trick. <%-- set style for EVEN rows --%> <%-- set style for ODD rows --%> No doubt there's a better way of doing that too. Many thanks Curtis. -- bOOyah - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Any advice for 'jsp.error.useBean.duplicate' ?
It's killing me. Here's the snippet: [ServletException in:/pages/editscheduledetails.jsp] /pages/editscheduledetails.jsp(276,6) jsp.error.useBean.duplicate' org.apache.jasper.JasperException: /pages/editscheduledetails.jsp(276,6) My assumption in that the Jasper compiler thinks I have attempted to use a bean multiple times in the same scope or something. Here's the only piece of that JSP that uses a bean: Line 276: ... If I change "status" to "qwerty" it all works fine! The JSP books say that the 'varStatus' variable is local to the 'c:forEach' loop! How can I be declaring duplicate beans? I even added a scope="page" to the 'useBean' clause, but it made no difference. I'm not explicitly including other JSPs in this JSP...I'm using Tiles and Struts. Google only returns very scant info about 'jsp.error.useBean.duplicate' :-( Thanks for any help. -- bOOyah - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: Field types in ActionForm/DynaForm
Andreas Solarik wrote: Hi Stjepan, From what I understand, you will have a much easier time implementing validation for your forms if you use only strings. For example, receiving an integer value "ABCDEFG" might cause unexpected results. This is just my understanding. If theres more to it, them I'm happy to learn :) That is my understanding too. A simple example: Imagine your form models a personnel record. You have a field to hold an employee's Age. Being a clever Struts designer you add a String (not an Integer) property to the Struts form bean to hold the employee's Age. You have Struts Validation enabled. If someone types "QWERTY" into that Age field on the HTML form, your Struts validation checks can trap it and the form will be forwarded back to the user with (perhaps) the Age field showing "QWERTY", highlighted with a "QWERTY is not a valid Age" error message. But: if that property had been modeled originally as an Integer, then "QWERTY" would never make it into the form bean (because "QWERTY" cannot be converted to an Integer). Which in turn means that when the form is re-displayed to show the user's error, the string "QWERTY" will not be seen in the Age field; the field would be empty. Read-write Integer properties on form beans will work great until users enter bad data. Read-only properties are unaffected of course. I think I got that about right. -- bOOyah - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How can I display a table in two columns?
Daniel Perry wrote: This works ok for that scenario, but what about if you need each item out of the list? eg, to iterate through a list of names: Gives one column name1 name2 name3 name4 Is there an easy way to get: name1name2 name3name4 The best I can come up with (shooting from the hip) is to create an intermediate bean which contains two properties, the column-1 value and the column-2 value. Populate each bean, put them in a list, then iterate over that list. Something like this: List names = new ArrayList(); int i = 1; while (i<=numItems) { TwoColBean b = new TwoColBean(); b.setCol1("name" + i++); b.setCol1("name" + i++); this.names.add(b); } ... Surely there must be a tag lib somewhere that offers this? -- bOOyah - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Best practice: when to convert message resources to actual strings?
Hi again Like a good little girl, I have located all my app's GUI strings in a message resource bundle for I18N purposes. This includes the strings that appear in drop-down select fields that I use as options menus. There are several of these menus in my pages and their contents are, for all intents and purposes, NOT dynamic. So now I have to convert all the message resources in those menus to their i18n string equivalents at run time (essentially rewriting the menus' texts). But where should I do it, and when? In the JSP? The Form Bean? The Action? Or, *gasp* the EJB? JSPs: The purist might do it here. Maybe something like this: " /> (Actually I don't think that's going to work as I've written it...) But the menu would be rewritten every hit of the page. Viva Hotspot. FORM BEAN: In the 'menuItems' setter/getter: public setMenuItems(List menuItems) { // convert vanilla menu to i18n-specific Iterator i = menuItems.iterator(); while (i.hasNext()) { MenuItem m1 = (MenuItem)i.next(); MenuItem m2 = new MenuItem(); m2.setId( m1.getId() ); m2.setValue( resources.getString( m1.getValue() ) ); this.menu.add(m2); } } public List getMenuItems() { return this.menu; } The menu is localized the first time the form bean is used. ACTION CLASS: Same kind of Java as the form bean. The Action would suck the pre-i18n menus from the DTOs as they are retrieved and convert them on-the-fly before depositing them in the form bean just prior to forwarding to the pages. But this seems like the wrong place. I really want my Actions to merely manage DTO hand-off between my EJBs and my form beans. EJBs: Well, the pre-i18n menus are stored in the DB anyway. My EJBs could hit the DB at start-up, convert the menus to i18n-specific and cache them for the lifetime of the app. The DTOs would always have ready-rolled strings then. But again, this feels wrong; surely GUI strings are a presentation tier issue? Any thoughts? -- bOOyah - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with custom ActionMapping and
chris wrote: MUST NOT implement a "public boolean is{ParamName}()" method - doing so will prohibit the set{ParamName} method's invocation via the Worked that out the hard way myself two days ago. I thought the convention was to name the getter for a boolean 'isFlag()'. But not on Planet Struts. After blubbing like a stuck pig for an hour I finally stabbed in the dark and named my getter 'getFlag()'. Presto-hey! It all worked. Frameworks...you gotta love 'em. -- bOOyah - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How can I display a table in two columns?
Axel Stahlhut wrote: Is there a straightforward way to iterate my List so as to render my table as two columns (four columns really) of 8 rows each? Like this: x item-1x item-9 x item-2x item-10 . . . . . . x item-8x item-16 There are a lot of ways to reach what you need, but the following is the nicest, I think: Thanks Axel. That would probably work fine. My list is always a fixed size, but with variable content. By the way, what is the submitted value of the cb? Is it the index or some other kind of id? The multibox values are actually IDs; database primary keys as it happens. Thanks again! -- bOOyah - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How can I display a table in two columns?
Hi all I have a 2-column table containing 16 row items, each with an associated checkbox. Right now I'm iterating over a List to render each row of the table. Column 1 contains the checkboxes; column 2 contains the items. So my table currently looks like this (x == a checkbox): x item-1 x item-2 . . . x item-16 Is there a straightforward way to iterate my List so as to render my table as two columns (four columns really) of 8 rows each? Like this: x item-1x item-9 x item-2x item-10 . . . . . . x item-8x item-16 Thanks! -- bOOyah - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Typical time sink
Joe Hertz wrote: No sooner had I composed a lengthy, yet well crafted posting to the Struts Users' newsgroup than I spotted my error. LOL. Don't feel bad, I've done this probably 4 times myself on this mailing list alone. Something about making oneself articulate exactly what the problem is makes one realize the error. FWIW, I now refer to these as "Emily Litella Moments" Consider yourself initiated... Or is that initialized? What's worse is posting a white-hot message to a public newsgroup that was actually intended for the private eyes of my colleague. I have attempted to cancel the posting but to all of you out there offended by my outburst I humbly, humbly apologize. I will endeavor to review my recipient list more closely in future. -- Sean. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Typical time sink
Jesus CHRIST I've been staring at this bastard all day. No sooner had I composed a lengthy, yet well crafted posting to the Struts Users' newsgroup than I spotted my error. F*CKING Struts taglibs. The 'name' attribute should have been 'property'. But it can be 'name' under certain circumstances. Or even absent all together. Each Google example gives a slightly different slant. Even the books on Safari. I ask you. I really want to know why there isn't a WYSIWYG JSP+Struts editor. Maybe now I can make some frigging progress on this Hub page. -- Sean - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Losing my mind: why can't my JSP use the getter on my form bean??
bOOyah wrote: For crying out loud. No sooner had I clicked the 'Send' button on my mailer when I spotted the bug. For those few of you still wiping the tears from your eyes, the 'name' attribute above should, of course, have been 'property'. I've been staring at that little time sink all day. -- Sean. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Losing my mind: why can't my JSP use the getter on my form bean??
Hi guys I've got a simple form bean and a simpler JSP. I can get the JSP to pull some values from the form bean but not others, and I cannot figure out why. I want to display Select menus in a variable number of rows. I managed to figure out indexed properties (at loong last) and so the html:select tags are working. It's just the html:optionsCollection tag that I can't figure out. Here's the Form (trimmed for brevity; the two private members are populated okay by other methods): 8<- public class MyForm extends ActionForm { private Integer selectedIdTvSystem[]; private List picklistTvSystem; // return the user's previously selected TV system public Integer getSelectedIdTvSystem(int loopIndex) { ... } // set the user's newly selected TV system public void setSelectedIdTvSystem(int loopIndex, Integer selectedId) { ... } // get the drop-down list of TV choices for the user public List getPicklistTvSystem() { return this.picklistTvSystem; } // set the list of possible TV choices for the user public void setPicklistTvSystem(List picklistTvSystem) { this.picklistTvSystem = picklistTvSystem; } } 8<- Here's the JSP tester. It's a Mickey Mouse loop to display two drop-down picklists. The indexed property referenced in the 'html:select' seems to work fine. But the 'html:optionsCollection' tag isn't finding the 'picklistTvSystem' property on the form. 8<- 8<- Tomcat throws this exception: javax.servlet.jsp.JspException: Cannot find bean picklistTvSystem in any scope at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:938) Any help will be gratefully received. -- Sean. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]