This week's giveaway is in the Testing forum.
We're giving away four copies of TDD for a Shopping Website LiveProject and have Steven Solomon on-line!
See this thread for details.
Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Loading select dropdown ok but using it problem?

 
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello ,

i'am using struts2 and filling a select dropdown with Category name in value and category id in key

in jsp


in model


function to load the cat




it load fine , however when i would like to use it in ajax call to add new categorie action i get this error



Regards
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ivan Krasic wrote:
it load fine , however when i would like to use it in ajax call to add new categorie action i get this error



I don't see any AJAX in the code you have posted. Are you sure you have given us all the relevant information?
 
Ivan Krasic
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Joe Ess wrote:

Ivan Krasic wrote:
it load fine , however when i would like to use it in ajax call to add new categorie action i get this error



I don't see any AJAX in the code you have posted. Are you sure you have given us all the relevant information?



here you


[/code]
 
Joe Ess
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It looks like you have a few too many code tags in your post above. Does your post accurately reflect the code you have?
I see you making an AJAX request, but I don't see you doing anything with the result. What exactly are you trying to accomplish?
 
Ivan Krasic
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Joe Ess wrote:It looks like you have a few too many code tags in your post above. Does your post accurately reflect the code you have?
I see you making an AJAX request, but I don't see you doing anything with the result. What exactly are you trying to accomplish?



i just want to add new Category (but new Category may be subcategory of another category)

so in 1 page i have 2 action ( List all Category , Add new Category (action called via Ajax) )

in ListCategorie.action ( i send 2 collection : one for all category (all attribut) and second for category(ID , Name)

so the display tag is showing fine with all attribut (filled database with 2 record)

now the main part where the problem exist is on add new Category

when i hit the addcategory button to call the ajax action part i receive error in dropdown part



in pojo got 2 class (Category with all attribut) and Catlist with (ID , name ) attribut
 
Now I am super curious what sports would be like if we allowed drugs and tiny ads.
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic