RE: Disabling Buttons on View
Hi Sorry if this is OT I have not used any of the JSTL tags which I am assuming c:set ... is?? So I downloaded the JSTL library and included the core library EL: %@ taglib prefix=c uri=http://java.sun.com/jstl/core; % in my JSP The c:set ... is recognized :-) But the ... disabled=%=disable % ... is not found. So I used what I am assuming are JSP scripting tags (I have not used JSP's before using Struts) % boolean disable = false; % logic:empty name=channelForm property=productList % disable = true; % /logic:empty html:submit onclick=set('editProduct'); disabled=%= disable % Edit/html:submit And this works. So is a preferred way of doing things when it comes to tags? Is there an explanation of these options anywhere? Am I making any sense *grin* ? Thanks Shane -Original Message- From: deepaksawdekar [mailto:[EMAIL PROTECTED] Sent: Thursday, 25 September 2003 3:56 p.m. To: Struts Users Mailing List Subject: RE: Disabling Buttons on View you can try some thing like this. logic:notEmpty name=channelForm property=productList c:set var=disable value=true / /logic:notEmpty html:submit onclick=set('editProduct'); disabled=%=disable % bean:message key=button.edit//html:submit Thanks and Regards Deepak. -Original Message- From: Shane Mingins [mailto:[EMAIL PROTECTED] Sent: Thursday, September 25, 2003 8:27 AM To: '[EMAIL PROTECTED]' Subject: Disabling Buttons on View Hi If I wish to simulate the enable/disable of buttons that users are used to with a rich GUI on a JSP view, is there are nicer way than using the logic tags like this? logic:notEmpty name=channelForm property=productList html:submit onclick=set('editProduct');bean:message key=button.edit//html:submit /logic:notEmpty logic:empty name=channelForm property=productList html:submit disabled=true bean:message key=button.edit//html:submit /logic:empty Thanks Shane Shane Mingins Analyst Programmer Assure NZ Ltd Ph 644 494 2522 - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Disabling Buttons on View
-Original Message- From: Shane Mingins [mailto:[EMAIL PROTECTED] I have not used any of the JSTL tags which I am assuming c:set ... is?? So I downloaded the JSTL library and included the core library EL: %@ taglib prefix=c uri=http://java.sun.com/jstl/core; % in my JSP The c:set ... is recognized :-) But the ... disabled=%=disable % ... is not found. What do you mean is not found? Are you getting an error message? If so, what's the error message? Are you including the taglib directives for the Struts tag libraries? It's hard to help if you don't tell us exactly what happened. So is a preferred way of doing things when it comes to tags? Is there an explanation of these options anywhere? Am I making any sense *grin* ? The best advice I could give would be to read the JSP specification, the JSTL specification, and the Struts user guide and api reference. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Disabling Buttons on View
-Original Message- From: Karr, David [mailto:[EMAIL PROTECTED] Sent: Friday, 26 September 2003 11:25 a.m. To: Struts Users Mailing List But the ... disabled=%=disable % ... is not found. What do you mean is not found? Are you getting an error message? If so, what's the error message? Are you including the taglib directives for the Struts tag libraries? It's hard to help if you don't tell us exactly what happened. I am using IntelliJ IDEA and it was not picking up the =%=disable % variable. i.e. it hightlighted it red and complains. Initially the c:set ... was also causing an error in IDEA but I added: %@ taglib prefix=c uri=http://java.sun.com/jstl/core; % My current JSP has the following: %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean % %@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % %@ taglib prefix=c uri=http://java.sun.com/jstl/core; % Does that at all help? Shane - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Disabling Buttons on View
you can try some thing like this. logic:notEmpty name=channelForm property=productList c:set var=disable value=true / /logic:notEmpty html:submit onclick=set('editProduct'); disabled=%=disable % bean:message key=button.edit//html:submit Thanks and Regards Deepak. -Original Message- From: Shane Mingins [mailto:[EMAIL PROTECTED] Sent: Thursday, September 25, 2003 8:27 AM To: '[EMAIL PROTECTED]' Subject: Disabling Buttons on View Hi If I wish to simulate the enable/disable of buttons that users are used to with a rich GUI on a JSP view, is there are nicer way than using the logic tags like this? logic:notEmpty name=channelForm property=productList html:submit onclick=set('editProduct');bean:message key=button.edit//html:submit /logic:notEmpty logic:empty name=channelForm property=productList html:submit disabled=true bean:message key=button.edit//html:submit /logic:empty Thanks Shane Shane Mingins Analyst Programmer Assure NZ Ltd Ph 644 494 2522 - 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]