wood burning stoves 2.0*
The moose likes Struts and the fly likes html:select errors Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "html:select errors" Watch "html:select errors" New topic
Author

html:select errors

Pat Flickner
Ranch Hand

Joined: Nov 17, 2003
Posts: 173
(also posted on the Oracle Sun site, but need the answer as soon as possible)

I'm having a devil of a time trying to find how the html:select works. I was told to use this instead of logic:iterate. The problem is, I keep getting the error "No getter method available for property marketAF for bean under name marketList".

What I created was a List of MarketAF, which contains market, marketCd, and some other items to control how the select will look (if it will be a multiple or a dropdown). I then set up the as so:



I have no clue how to proceed. I've tried a host of things for the past three hours and haven't been able to figure this one out. It seems to be stuck at the select. I don't know why it is expecting a getter for the marketAF, unless it is expecting that I passed a List into another variable.

I tried that - created class ReturnList and loaded the List to that. It definitely didn't like that.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61095
    
  66

Please be sure to ask Struts questions in the Struts forum. I have moved this post there for you.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Lists don't have a property called "marketAF"--it's a list *of* MarketAFs, no? Have you looked at the documentation for the html:select tag?
Pat Flickner
Ranch Hand

Joined: Nov 17, 2003
Posts: 173
Bear, sorry, I saw jstl and posted it here.

David, does the phrase "no kidding" apply here? I am asking a question about what I need to do. I have spent several hours trying to learn how to do this properly and have had no success. I do not understand how to make the list function within the html:select. It gives me an error regardless of what I do. How do I get a list that is loaded to marketList (request attribute). How do I get the collection of marketAF's into the html:select? If you can help, thank you. If you can't, please refer your nonconstructive critiques to your personal journal. Thank you.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61095
    
  66

Pat Flickner wrote:Bear, sorry, I saw jstl and posted it here.

No problem -- but why would you associate Struts tags with the JSTL?

But...
If you can't, please refer your nonconstructive critiques to your personal journal.

as my late mother (who would revert to French when angry) used to say: "Change ton salaud d'attitude!"

Do not let your frustration leech out into your posts. Lashing out at those in a position to help you is not a winning strategy.
Pat Flickner
Ranch Hand

Joined: Nov 17, 2003
Posts: 173
Got it. I just get very frustrated with the people who "help" via ridicule. I'm just stuck and have been trying to figure this out myself before bothering anyone else. Normally it doesn't bother me when people revert to know-it-all status (meaning they really don't understand or know the answer). I'm just going crazy, trying to figure out every possible way to get this to work since I was told this was the way they wanted me to do things. And then left. I've just been immersed in this all day. Thanks for pulling me out, even briefly. And thanks for the French. I think I heard that phrase several times when I was young.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61095
    
  66

Pat Flickner wrote:Got it. I just get very frustrated with the people who "help" via ridicule.

I've read David's post a dozen times and I fail to see the ridicule. He simply asked a legitimate question. You know that you've read the documentation -- but he has no way of knowing that. And, to be frank, looking at a lot of the posts, it's clear that a lot of people post here instead of looking at the docs.

If you look for insults, you'll see them everywhere. Even where none is intended.

And thanks for the French. I think I heard that phrase several times when I was young.

Most of the French I know consists of swears and cursing as that was the only times my parents (the first generation of my family to be born in the US) would speak their first language.
Pat Flickner
Ranch Hand

Joined: Nov 17, 2003
Posts: 173
(oh, just without the "salaud" - and your mother had an interesting command of hte language and the jstl was stuck in my mind as jstl tags which I was also using)
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61095
    
  66

Pat Flickner wrote:(oh, just without the "salaud" - and your mother had an interesting command of hte language )

Indeed! Very Canuck!
Pat Flickner
Ranch Hand

Joined: Nov 17, 2003
Posts: 173
Okay, I get the name= part where you get the attr name of the bean (in this case, the bean is marketList), so that part is correct. I just don't get what I'm supposed to put in property. I tried marketCd since that is a variable of marketAF with a valid getter and setter, but it doesn't work and tells me I don't have a valid getter. That's where I'm getting stuck. I don't know what is supposed to be in there and the documentation isn't helping.

I'm about bald by now from pulling out my hair.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61095
    
  66

Pat Flickner wrote:I'm about bald by now from pulling out my hair.

How do you think I got this way?

In any case, I can't help you much. Not a Struts fan.
Pat Flickner
Ranch Hand

Joined: Nov 17, 2003
Posts: 173
DUDE!!! What do you ride? (Had to check your profile after that comment) Totally sweet. I had a Suzuki Intruder 800 a couple years ago - wiped out and the clutch landed on my leg. It's sitting in the garage and I'm itching to ride again.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61095
    
  66

2005 Yamaha V-Star 1100

Nice bike!

And yes, I'm bald as a cue ball.
Edmund Choo
Greenhorn

Joined: May 03, 2010
Posts: 2
Pat Flickner wrote:





Hey, If your list is marketAF which contain all the option that needed to display in drop-down list, try changing your property = marketList, and change the collection = marketAF.


Regards,
Edmund
Pat Flickner
Ranch Hand

Joined: Nov 17, 2003
Posts: 173
No, unfortunately. The List is marketList, which is a Collecion of MarketAF Objects. The styleId is also marketList. I have a function that I use that requires consistency; the jsp is marketList.jsp, the element id is marketList, and the List is marketList. It's okay. I will worry about this later. I told them they'd have to wait if they couldn't provide the time to help me with this, so I'm doing it another way. Not necessarily pretty, but it's using struts and jstl with no scriptlets.
 
Don't get me started about those stupid light bulbs.
 
subject: html:select errors