struts-html

How to use javascript to include struts html tag?

冷暖自知 提交于 2019-12-13 03:04:23
问题 I have a check box and a text box. I have used struts tags and Now i need to validate that if the check box is checked, i should gray out (disable) the text box. If it is unchecked the text box shold take phone numbers. I did lik this, i called a java script on click of check box and did a innerHtml based on wheather checkbox ix checked or not. var status_check=document.getElementById("line1Checked").checked; if(status_check==true){ document.getElementById("line1").readonly="true"; } else{

Load div using Struts 2 jQuery

隐身守侯 提交于 2019-12-11 14:38:39
问题 I am creating a struts based application and i want to load a div based on content in a sj:textfield. I am using struts jquery plugin. The div has to be loaded by passing the textfield contents to a struts action. Can anyone tell me how to do so since I could not find any instance of this anywhere. 回答1: i am not sure, if i got u right. but i will give a try. check out the code below <s:form action="action"> <sj:textfield name="name" value="value" label="label/> <sj:submit targets="myResultDiv

How to append loop index of c:forEach tag to Struts HTML tag attributes?

时光毁灭记忆、已成空白 提交于 2019-12-09 13:32:46
问题 How can I append the loop index of a c:forEach tag to the attributes of a struts select/text tag? For example. <%@ taglib uri="/WEB-INF/tld/struts-html.tld" prefix="html"%> <c:forEach begin="2" end="${pageView.guestCount}" varStatus="gC"> <div class="section guest-details"> <html:select property='title_guest<c:out value="${gC.index}"/>'> <html:options collection="titles" property="code" labelProperty="value" /> </html:select> </div> </c:forEach> throws the following error javax.servlet.jsp

How to append loop index of c:forEach tag to Struts HTML tag attributes?

早过忘川 提交于 2019-12-03 20:09:26
How can I append the loop index of a c:forEach tag to the attributes of a struts select/text tag? For example. <%@ taglib uri="/WEB-INF/tld/struts-html.tld" prefix="html"%> <c:forEach begin="2" end="${pageView.guestCount}" varStatus="gC"> <div class="section guest-details"> <html:select property='title_guest<c:out value="${gC.index}"/>'> <html:options collection="titles" property="code" labelProperty="value" /> </html:select> </div> </c:forEach> throws the following error javax.servlet.jsp.JspException at org.apache.struts.taglib.html.SelectTag.calculateMatchValues(SelectTag.java:246) Now,