Win a copy of Svelte and Sapper in Action this week in the JavaScript 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

autoselect the radio button if the list has only 1 item

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i want know how to auto select the html:option (radio button field) tag inside the logic:iterate tag if the property being iterated has size 1
 
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi sourabh,

Can you explain the problem statement clearly !?

Do you need Drop down or Radio Button ?

Why logic:iterate ?

What you really intend to achieve ?


Provide Complete Information, so that you can fetch the solution quicker
 
sourabh chhabra
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi vicky

i have a search page which displays me the result in a tabular structure. The first column of the table is radio button which when selected activates the next button on the page.

the table is populated inside a logic iterate tag which iterates on a list of object which contains the information which is to be displayed.

I want that if the list on which the logic iterate tag iterates has just 1 element in it, the radio button displayed in the first column for that record should be auto selected.

the code snipped on jsp is

 
See ya later boys, I think I'm in love. Oh wait, she's just a tiny ad:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
    Bookmark Topic Watch Topic
  • New Topic