• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

logic:iterate indexed="true"

 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
actually i am having a very big problem regarding this...i have three input field place interview,date interview and time of interview...i have a button "add" so that i can send multiple request at a time..
my issue is suppose after adding first detail and press add i am getting the same value again..instead of getting blank...can anyone help me out with an example..i am using struts
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sanju,
Welcome to JavaRanch!

Why don't we start with the code you have now? What have you written and what error do you get?
 
sanju sreedharan
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
this is my jsp file....and when i run this program all my feilds get hidden and when i remove the present and iterate logic it comes visible...can you help me


<logic resent name="SelectionForm" >
<logic:iterate id="notify_dept_interview_time" name="SelectionForm" property="notify_dept_interview_time" >

<table width="100%" border=0 class="type1" cellspacing="2" cellpadding="5">
<logic:equal name="User" property="notify_dept_interview_time" value="1">
<tr>
<td width="15%" align=right class="type1"><a href="javascript:showMe(document.Selection.place_interview)">Interview Place& Comments</a></td>
<td width="22%" class="type1"> <html:textarea property="place_interview" indexed="true"
<td width="15%" align=right class="type1"> Date/Time : </td>
<td width="22%" class="type1"><html:text property="date_interview" indexed="true" readonly="true" styleClass="input_medium" /><html:img src="../images/cal.gif" onklick="return showCalendar('date_interview','%d/%m/%Y %H:%M', '12', true);" style="cursor:hand;" width="16" height="16"/></td>
<td width="15%" align=right class="type1">Userid </td>
<td width="22%" class="type1"> <html:text property="interview_schedule_userid" indexed="true" readonly="true" styleClass="input_medium"/></td>
</tr>
<tr>
<td colspan=3 align=middle class="type1"><a href="javascript:void()" onklick="javascript:return resumesearch()"> Candidates for Interview</a></td>
</tr>

</logic:equal>
</table>

</logic:iterate>
</logic resent>

my selection form looks like this

public class SelectionDetails {
private String vacancy_refno="";
private String recycle_no="";
private String place_interview="";
private String date_interview="";

public String getVacancy_refno() {
return vacancy_refno;
}
public void setVacancy_refno(String vacancy_refno) {
this.vacancy_refno = vacancy_refno;
}

public String getRecycle_no() {
return recycle_no;
}
public void setRecycle_no(String recycle_no) {
this.recycle_no = recycle_no;
}

public String getPlace_interview() {
return place_interview;
}
public void setPlace_interview(String place_interview) {
this.place_interview = place_interview;
}

public String getDate_interview() {
return date_interview;
}

public void setDate_interview(String date_interview) {
this.date_interview = date_interview;
}
can you help me to solve this
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't see an ActionForm there; are you sure you're iterating over a property that exists in the form? You can also begin to diagnose the problem by putting something in the JSP between the ifPresent and iterate tags to narrow down what the problem might be.

Please use the UBB code tags when posting code, and disable smilies.
 
sanju sreedharan
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
can you please tell me about UBB code tags?
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
See all thouse UCC code buttons underneath the text box when you reply? And the link "What is UBB Code?"

They might provide clues.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic