I'm already try that tips but it's didn't work, I can't get the value
from ><bean:write property="nilai" name="tanda" filter="true" />
Any other idea, but anyway thank you for the tips.
This is my complete code in jsp:
<html:form action="halAction">
<table><tr>
<logic:iterate id="tanda" name="halForm" property="data" >
<logic:present name="tanda">
<td><bean:write property="nilai" name="tanda" filter="true" /></td>
<td><bean:write property="nama" name="tanda" filter="true" /></td>
<td><html:checkbox property="nilai2" indexed="true" value="true"
/></td>
</tr>
</logic:present>
</logic:iterate>
</table>
<html:radio property="bulan" value="bulanan" /></p>
<html:radio property="bulan" value="mingguan" />
<p> </p>
<html:submit value="submit" property="tombol" />
</html:form>
I want to view the value from bean write with the following code and
it's didn't appear...
<c:out value="${halForm.nilai2}"></c:out>
and this is my formAction code:
----------------------------------------------
package pak;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionMapping;
import javax.servlet.http.HttpServletRequest;
public class halForm extends ActionForm
{
private String nilai2;
private int seleksi=0;
private String tombol,bulan;
private help[] data={ new help("11","aaaaa"),
new help("12","bbbbb"),
new help("13","ccccc"),};
public void setNilai2(int index,String value)
{
nilai2=value;
seleksi=index;
}
public String getNilai2(int index)
{
return nilai2;
}
public String getNilai2()
{
return nilai2;
}
public int getIndex()
{
return seleksi;
}
public void reset(ActionMapping mapping, HttpServletRequest request)
{
super.reset(mapping, request);
}
public ActionErrors validate(ActionMapping mapping, HttpServletRequest
request)
{
return super.validate(mapping, request);
}
public help[] getData()
{
return data;
}
public String getTombol()
{
return tombol;
}
public void setTombol(String newTombol)
{
tombol = newTombol;
}
public String getBulan()
{
return bulan;
}
public void setBulan(String newBulan)
{
bulan = newBulan;
}
}
----------------------------------------------------------
Is there anything wrong with My code.....
Can somebody help Me, thank you for the answer....
-----Original Message-----
From: Mark Lowe [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 02, 2003 3:17 PM
To: Struts Users Mailing List
Subject: Re: how can I get Chekbox value
<html:checkbox property="nilai2" indexed="true" value="true" />
Cheers Mark
On Tuesday, September 2, 2003, at 09:17 AM, hari_s wrote:
> How can I get an iterate value
> And this is My code
>
> <logic:iterate id="tanda" name="halForm" property="data" >
> <logic:present name="tanda">
> <td><bean:write property="nilai" name="tanda" filter="true" /></td>
> <td><bean:write property="nama" name="tanda" filter="true" /></td>
> <td><html:checkbox property="nilai2" indexed="true" /></td>
>
>
> </tr>
> </logic:present>
> </logic:iterate>
>
> I want to take the value from bean:write that the checkbox value is
> true.
> Thank you, for the answer ..........
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]