Re: Struts tag problem (bean:message and bean:write)
Hello Marco, maybe this will help (using struts-el): bean-el:message key='prompt.productType.${product.productType}'/ Dima. Thursday, March 25, 2004, 6:02:54 PM, you wrote: MM Hi all, MM I was wondering if anyone of you have a solution MM For this dilemma. MM I have a collectin of product DTOs to show on my jsp. One of MM DTO's property is, let's say, the type, which is listed in number. MM (let's say, 10 or 20). MM ON the DTO I will have the value 10,20 ecc but on the jsp I have to MM display MM The corresponding string (let's say, HouseProduct or Car or something MM else) which is listed in application.resources. MM I am looping thru the collection using logic:iterate, and MM as I have found out myself, following code does not work MM bean:message key='prompt.productType.bean:write name=product MM property=productType'/ MM basically in app.resources I will have MM prompt.productType.10=HouseProduct MM prompt.productType.20=Car MM etc.. MM above, I am outputting the message prompt.productType.(productType) MM how can I solve my dilemma, keeping in mind that I am using also MM logic:iterate to loop thru the collection? MM With best regards MM marco MM - MM To unsubscribe, e-mail: [EMAIL PROTECTED] MM For additional commands, e-mail: [EMAIL PROTECTED] -- Best regards, Dmitriimailto:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: custom tag called with bean properties as attributes
risc:staaf schaal_nummer=bean:write name=dezeSchaal property=schaalNummer/ This is a standard tag nesting error. You can't put tags inside of tag attributes. You CAN put scriptlets, such as your first tag... logic:iterate id=dezeSchaal name=%=Risc.BEREKENING% property=profielSchalen / ...The key is that you have quotes inside of quotes. When I need to do something similar to what you are, I include the standard name and property attributes as used by bean write. Doing this, your first tag would become risc:staaf name=dezeSchaal property=schaalNummer / And in the tag code I can do something like this: String schaal_nummer = (String) TagUtils.getRealValueFromBean( name, property, null, pageContext); Voila, no nested tags. Plus it's very easy to read in the JSP. David Hibbs, ACS Staff Programmer / Analyst American National Insurance Company - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts tag problem (bean:message and bean:write)
Something like bean:define id=type bean:write name=product property=productType /bean:define bean:message key=%='prompt.productType.' + type%/ Paul -Original Message- From: Marco Mistroni [mailto:[EMAIL PROTECTED] Sent: 25 March 2004 16:03 To: 'Struts Users Mailing List' Subject: Struts tag problem (bean:message and bean:write) Hi all, I was wondering if anyone of you have a solution For this dilemma. I have a collectin of product DTOs to show on my jsp. One of DTO's property is, let's say, the type, which is listed in number. (let's say, 10 or 20). ON the DTO I will have the value 10,20 ecc but on the jsp I have to display The corresponding string (let's say, HouseProduct or Car or something else) which is listed in application.resources. I am looping thru the collection using logic:iterate, and as I have found out myself, following code does not work bean:message key='prompt.productType.bean:write name=product property=productType'/ basically in app.resources I will have prompt.productType.10=HouseProduct prompt.productType.20=Car etc.. above, I am outputting the message prompt.productType.(productType) how can I solve my dilemma, keeping in mind that I am using also logic:iterate to loop thru the collection? With best regards marco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ** Axios Email Confidentiality Footer Privileged/Confidential Information may be contained in this message. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone. In such case, you should destroy this message, and notify us immediately. If you or your employer does not consent to Internet email messages of this kind, please advise us immediately. Opinions, conclusions and other information expressed in this message are not given or endorsed by my Company or employer unless otherwise indicated by an authorised representative independent of this message. WARNING: While Axios Systems Ltd takes steps to prevent computer viruses from being transmitted via electronic mail attachments we cannot guarantee that attachments do not contain computer virus code. You are therefore strongly advised to undertake anti virus checks prior to accessing the attachment to this electronic mail. Axios Systems Ltd grants no warranties regarding performance use or quality of any attachment and undertakes no liability for loss or damage howsoever caused. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts tag problem (bean:message and bean:write)
Marco, can you use bean:define and a scriptlet code inside bean:message ? Something like : bean:define id=suffix name=product property=productType/ bean:message key='%=prompt.productType.+suffix%'/ --- Marco Mistroni [EMAIL PROTECTED] escreveu: Hi all, I was wondering if anyone of you have a solution For this dilemma. I have a collectin of product DTOs to show on my jsp. One of DTO's property is, let's say, the type, which is listed in number. (let's say, 10 or 20). ON the DTO I will have the value 10,20 ecc but on the jsp I have to display The corresponding string (let's say, HouseProduct or Car or something else) which is listed in application.resources. I am looping thru the collection using logic:iterate, and as I have found out myself, following code does not work bean:message key='prompt.productType.bean:write name=product property=productType'/ basically in app.resources I will have prompt.productType.10=HouseProduct prompt.productType.20=Car etc.. above, I am outputting the message prompt.productType.(productType) how can I solve my dilemma, keeping in mind that I am using also logic:iterate to loop thru the collection? With best regards marco __ Yahoo! Mail - O melhor e-mail do Brasil! Abra sua conta agora: http://br.yahoo.com/info/mail.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: EL Tag Libraries
Why not use c:out value=${uniqueKey} / instead of c:out value=${myForm.value(${uniqueKey})} / ??? This works for me: c:set var=testVar value=Hello / c:set var=testVar1 value=World / c:set var=hello c:out value=${testVar} /-c:out value=${testVar1} / /c:set c:out value=${hello} / Thanks -- pady [EMAIL PROTECTED] -Original Message- From: Pat Quinn [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 24, 2004 7:11 AM To: [EMAIL PROTECTED] Subject: EL Tag Libraries Hi Guys, I have an action form with a get method (i.e. getValue(String)) which takes a string value, its working fine when i render the data in a text field. E.g. c:set var=uniqueKey c:out value=${CustomerTO.id}/-c:out value=${CustomerTO.orderNo}/ /c:set html-el:text name=myForm property=value(${uniqueKey})/ Now i want to render the data as a label on screen i've tried using the C:out/ tag lib but i cant get it to work e.g. c:out value=${myForm.value(${uniqueKey})}/ and c:out value=${myForm.value(uniqueKey)}/ Any ideas how i might do this? _ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ __ This email has been scanned by the Heroix e-mail Security System __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: EL Tag Libraries
I want to pass uniqueKey as a parameter to the getValue method on my action form, i dont want to render the uniqueKey value i want to render the return value from the getValue(String) method call From: Pady Srinivasan [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: RE: EL Tag Libraries Date: Wed, 24 Mar 2004 08:57:41 -0500 Why not use c:out value=${uniqueKey} / instead of c:out value=${myForm.value(${uniqueKey})} / ??? This works for me: c:set var=testVar value=Hello / c:set var=testVar1 value=World / c:set var=hello c:out value=${testVar} /-c:out value=${testVar1} / /c:set c:out value=${hello} / Thanks -- pady [EMAIL PROTECTED] -Original Message- From: Pat Quinn [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 24, 2004 7:11 AM To: [EMAIL PROTECTED] Subject: EL Tag Libraries Hi Guys, I have an action form with a get method (i.e. getValue(String)) which takes a string value, its working fine when i render the data in a text field. E.g. c:set var=uniqueKey c:out value=${CustomerTO.id}/-c:out value=${CustomerTO.orderNo}/ /c:set html-el:text name=myForm property=value(${uniqueKey})/ Now i want to render the data as a label on screen i've tried using the C:out/ tag lib but i cant get it to work e.g. c:out value=${myForm.value(${uniqueKey})}/ and c:out value=${myForm.value(uniqueKey)}/ Any ideas how i might do this? _ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ __ This email has been scanned by the Heroix e-mail Security System __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: EL Tag Libraries
It is not working because JSTL think that you are trying to call a function. To make it work you will need to define this function in a TLD file and use the namespace to call it. Take a look at TOMCAT\webapps\jsp-examples\jsp2\el\functions.jsp HTH --Shaul Pat Quinn wrote: I want to pass uniqueKey as a parameter to the getValue method on my action form, i dont want to render the uniqueKey value i want to render the return value from the getValue(String) method call From: Pady Srinivasan [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: RE: EL Tag Libraries Date: Wed, 24 Mar 2004 08:57:41 -0500 Why not use c:out value=${uniqueKey} / instead of c:out value=${myForm.value(${uniqueKey})} / ??? This works for me: c:set var=testVar value=Hello / c:set var=testVar1 value=World / c:set var=hello c:out value=${testVar} /-c:out value=${testVar1} / /c:set c:out value=${hello} / Thanks -- pady [EMAIL PROTECTED] -Original Message- From: Pat Quinn [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 24, 2004 7:11 AM To: [EMAIL PROTECTED] Subject: EL Tag Libraries Hi Guys, I have an action form with a get method (i.e. getValue(String)) which takes a string value, its working fine when i render the data in a text field. E.g. c:set var=uniqueKey c:out value=${CustomerTO.id}/-c:out value=${CustomerTO.orderNo}/ /c:set html-el:text name=myForm property=value(${uniqueKey})/ Now i want to render the data as a label on screen i've tried using the C:out/ tag lib but i cant get it to work e.g. c:out value=${myForm.value(${uniqueKey})}/ and c:out value=${myForm.value(uniqueKey)}/ Any ideas how i might do this? _ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ __ This email has been scanned by the Heroix e-mail Security System __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] *** This Mail Was Scanned By Mail-seCure System in Matrix Herzeliya *** *** This Mail Was Scanned By Mail-seCure System in Matrix Herzeliya *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Xhtml tag usage question
Unfortunately it saves the xhtml 'flag' in page scope so there isn't much you can do about it. Background: BaseHandlerTag has an isXhtml() method which calls the TagUtils.isXhtml() method which checks the xhtml 'flag' in page scope. I did think a solution would be to override the TagUtils.isXhtml() method to either always return 'true' or check a flag in request scope (which you would have to set some way) - but unfortunately the instance variable for TagUtils is both private and final - so theres no way to extend and implement your own custom TagUtils version in 'vanilla' struts. If you build your own version of struts, you could change TagUtils itself, so maybe thats an option for you - but then every time you take a new struts version you have to re-implement your change. Another alternative is to extend the struts tags to create 'xhtml' versions - all you would have to do is override the isXhtml() method there. For example public class XhtmlTextTag extends TextTag public XhtmlTextTag () { super(); } protected boolean isXhtml() { return true; } } So I think you have a few options: - put the html:xhtml tag in every jsp - build your own version of struts and change TagUtils - extend the struts tags to create xhtml versions Personally, I would go with html:xhtml for now and try to get struts changed so that either the scope of the xhtml flag can be customized or TagUtils can be extended and overriden. Niall - Original Message - From: Renato Romano [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Thursday, February 26, 2004 8:49 AM Subject: Xhtml tag usage question I tried to insert the xhtml tag in my pages, but the only way I found is to insert it in each tile that composes my page. It seems it is not sufficient to put it in the template file, or in the page using the template. Is there a better approach ? Any help is appreciated Renato Renato Romano Sistemi e Telematica S.p.A. Calata Grazie - Vial Al Molo Giano 16127 - GENOVA e-mail: [EMAIL PROTECTED] Tel.: 010 2712603 _ - 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: Xhtml tag usage question
Thank you very much for your detailed explanation!!! Renato Renato Romano Sistemi e Telematica S.p.A. Calata Grazie - Vial Al Molo Giano 16127 - GENOVA e-mail: [EMAIL PROTECTED] Tel.: 010 2712603 _ -Original Message- From: Niall Pemberton [mailto:[EMAIL PROTECTED] Sent: giovedì 26 febbraio 2004 12.36 To: Struts Users Mailing List Subject: Re: Xhtml tag usage question Unfortunately it saves the xhtml 'flag' in page scope so there isn't much you can do about it. Background: BaseHandlerTag has an isXhtml() method which calls the TagUtils.isXhtml() method which checks the xhtml 'flag' in page scope. I did think a solution would be to override the TagUtils.isXhtml() method to either always return 'true' or check a flag in request scope (which you would have to set some way) - but unfortunately the instance variable for TagUtils is both private and final - so theres no way to extend and implement your own custom TagUtils version in 'vanilla' struts. If you build your own version of struts, you could change TagUtils itself, so maybe thats an option for you - but then every time you take a new struts version you have to re-implement your change. Another alternative is to extend the struts tags to create 'xhtml' versions - all you would have to do is override the isXhtml() method there. For example public class XhtmlTextTag extends TextTag public XhtmlTextTag () { super(); } protected boolean isXhtml() { return true; } } So I think you have a few options: - put the html:xhtml tag in every jsp - build your own version of struts and change TagUtils - extend the struts tags to create xhtml versions Personally, I would go with html:xhtml for now and try to get struts changed so that either the scope of the xhtml flag can be customized or TagUtils can be extended and overriden. Niall - Original Message - From: Renato Romano [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Thursday, February 26, 2004 8:49 AM Subject: Xhtml tag usage question I tried to insert the xhtml tag in my pages, but the only way I found is to insert it in each tile that composes my page. It seems it is not sufficient to put it in the template file, or in the page using the template. Is there a better approach ? Any help is appreciated Renato Renato Romano Sistemi e Telematica S.p.A. Calata Grazie - Vial Al Molo Giano 16127 - GENOVA e-mail: [EMAIL PROTECTED] Tel.: 010 2712603 _ - 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: Struts Tag Lib Documentation/Tutorials
http://jakarta.apache.org/struts/userGuide/index.html If you look at the second part of the menu of the left titled Developer Guides you can see the all the different tag packages guides. Niall - Original Message - From: Kommineni, Sateesh (GE Consumer Industrial) [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, February 25, 2004 12:20 PM Subject: Struts Tag Lib Documentation/Tutorials Hi All, Could any one of you pls let me know URL's to find the Documentation of the Struts TagLibs .. Thanks Sateesh - 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: html:logic tag doesn't recognize Struts dataBean property's value
I doubt the problem is logic:equal. Your jsp looks OK - why not try outputting the shopOrderExist property in your table (along with yhe other stuff) - something along the lines of: td class=listCellbean:write name=sequenceList property=shopOrderExist//td That way, you can see the value the logic:equal/notEqual is testing against. Niall - Original Message - From: Au-Yeung, Stella H [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, February 23, 2004 3:34 PM Subject: html:logic tag doesn't recognize Struts dataBean property's value Hi: In my struts-based application I am using a html:logic tag in my JSP page to print two links depends on the value of a struts-based databean's property. Bacially on this JSP page, a list of records wil be displayed. Next to each record, either a Create link or an Update link should be displayed depends upon the property 'shopOrderExist. If this property has the value notExist, it should display the Create link. If it is not equal to notExist, it should display the Update link. For some reason, the Update link is always displayed even though shopOrderExist has a value of notExist. So the logic:equal tag is not comparing things correctly. Am I doing it wrong? (note, the property shopOrderExist is of type String and in Debug I see that its value is notExist) Here's my code: logic:iterate id=sequenceList collection=%=ShopWorkOrderSearchFormBean.getPage()% type=com.cat.fdd.dataBean.shopWorkOrder.ShopWorkOrderSearchBean tr td class=listCellbean:write name=sequenceList property=sequence/ /td !-- If the ShopOrderExist attribue is not equal to notExist, display Create link ,otherwise Update link-- logic:equal name=sequenceList property=shopOrderExist value=notExist a href=app/fdd/shopWorkOrder/CreateShopWorkOrderRequest.exec img src=images/icoAdd.gif border=0/a /logic:equal logic:notEqual name=sequenceList property=shopOrderExist value=notExist a href=app/fdd/shopWorkOrder/UpdateShopWorkOrderRequest.exec img src=images/icoEdit.gif border=0/a /logic:notEqual /td /tr Thanks in advance! Stella - 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: html:logic tag doesn't recognize Struts dataBean property's value
There is an error in your JSP. IF that is the complete jsp post, then you are missing the closing iterate tag /logic:iterate So anything between the interate tag is not being evaulated, I bet if you look at the rendered html output source, you will actually see the logic:iterate tags Khalid Quoting Niall Pemberton [EMAIL PROTECTED]: I doubt the problem is logic:equal. Your jsp looks OK - why not try outputting the shopOrderExist property in your table (along with yhe other stuff) - something along the lines of: td class=listCellbean:write name=sequenceList property=shopOrderExist//td That way, you can see the value the logic:equal/notEqual is testing against. Niall - Original Message - From: Au-Yeung, Stella H [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, February 23, 2004 3:34 PM Subject: html:logic tag doesn't recognize Struts dataBean property's value Hi: In my struts-based application I am using a html:logic tag in my JSP page to print two links depends on the value of a struts-based databean's property. Bacially on this JSP page, a list of records wil be displayed. Next to each record, either a Create link or an Update link should be displayed depends upon the property 'shopOrderExist. If this property has the value notExist, it should display the Create link. If it is not equal to notExist, it should display the Update link. For some reason, the Update link is always displayed even though shopOrderExist has a value of notExist. So the logic:equal tag is not comparing things correctly. Am I doing it wrong? (note, the property shopOrderExist is of type String and in Debug I see that its value is notExist) Here's my code: logic:iterate id=sequenceList collection=%=ShopWorkOrderSearchFormBean.getPage()% type=com.cat.fdd.dataBean.shopWorkOrder.ShopWorkOrderSearchBean tr td class=listCellbean:write name=sequenceList property=sequence/ /td !-- If the ShopOrderExist attribue is not equal to notExist, display Create link ,otherwise Update link-- logic:equal name=sequenceList property=shopOrderExist value=notExist a href=app/fdd/shopWorkOrder/CreateShopWorkOrderRequest.exec img src=images/icoAdd.gif border=0/a /logic:equal logic:notEqual name=sequenceList property=shopOrderExist value=notExist a href=app/fdd/shopWorkOrder/UpdateShopWorkOrderRequest.exec img src=images/icoEdit.gif border=0/a /logic:notEqual /td /tr Thanks in advance! Stella - 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] -- Khalid K. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: html:logic tag doesn't recognize Struts dataBean property's value
As you suggested I will display the shopOrderExist property on the form too. I know my loop is working fine because each of the ecord is displayed correctly. The only problem is when the flag is notExist, it will display the Update Link instead of the Create Link. That's why I thought my logic:equal is not correct. -Original Message- From: Niall Pemberton [mailto:[EMAIL PROTECTED] Sent: Monday, February 23, 2004 11:16 AM To: Struts Users Mailing List Subject: Re: html:logic tag doesn't recognize Struts dataBean property's value I doubt the problem is logic:equal. Your jsp looks OK - why not try outputting the shopOrderExist property in your table (along with yhe other stuff) - something along the lines of: td class=listCellbean:write name=sequenceList property=shopOrderExist//td That way, you can see the value the logic:equal/notEqual is testing against. Niall - Original Message - From: Au-Yeung, Stella H [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, February 23, 2004 3:34 PM Subject: html:logic tag doesn't recognize Struts dataBean property's value Hi: In my struts-based application I am using a html:logic tag in my JSP page to print two links depends on the value of a struts-based databean's property. Bacially on this JSP page, a list of records wil be displayed. Next to each record, either a Create link or an Update link should be displayed depends upon the property 'shopOrderExist. If this property has the value notExist, it should display the Create link. If it is not equal to notExist, it should display the Update link. For some reason, the Update link is always displayed even though shopOrderExist has a value of notExist. So the logic:equal tag is not comparing things correctly. Am I doing it wrong? (note, the property shopOrderExist is of type String and in Debug I see that its value is notExist) Here's my code: logic:iterate id=sequenceList collection=%=ShopWorkOrderSearchFormBean.getPage()% type=com.cat.fdd.dataBean.shopWorkOrder.ShopWorkOrderSearchBean tr td class=listCellbean:write name=sequenceList property=sequence/ /td !-- If the ShopOrderExist attribue is not equal to notExist, display Create link ,otherwise Update link-- logic:equal name=sequenceList property=shopOrderExist value=notExist a href=app/fdd/shopWorkOrder/CreateShopWorkOrderRequest.exec img src=images/icoAdd.gif border=0/a /logic:equal logic:notEqual name=sequenceList property=shopOrderExist value=notExist a href=app/fdd/shopWorkOrder/UpdateShopWorkOrderRequest.exec img src=images/icoEdit.gif border=0/a /logic:notEqual /td /tr Thanks in advance! Stella - 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: html:logic tag doesn't recognize Struts dataBean property's value
Niall: I did what you suggested and print out the value of the property shopOrderExist. It is equal to notExist as expected. But somehow the Update link is still displayed instead of the Create link. Do you think I have to do something to the value of shopOrderExist such as .trim() or convert to true before letting it be compared in the logic:equal tag? logic:iterate id=sequenceList collection=%=ShopWorkOrderSearchFormBean.getPage()% type=com.cat.fdd.dataBean.shopWorkOrder.ShopWorkOrderSearchBean tr td class=listCellbean:write name=sequenceList property=sequence/ /td td class=listCellbean:write name=sequenceList property=shopOrderExist//td ADDED td class=listCellnobr !-- If the ShopOrderExist attribue is not equal to notExist, display Create link ,otherwise Update link-- logic:equal name=sequenceList property=shopOrderExist value=notExist a href=app/fdd/shopWorkOrder/CreateShopWorkOrderRequest.exec img src=images/icoAdd.gif border=0/a /logic:equal logic:notEqual name=sequenceList property=shopOrderExist value=notExist a href=app/fdd/shopWorkOrder/UpdateShopWorkOrderRequest.exec img src=images/icoEdit.gif border=0/a /logic:notEqual /td /tr /logic:iterate -Original Message- From: Niall Pemberton [mailto:[EMAIL PROTECTED] Sent: Monday, February 23, 2004 11:16 AM To: Struts Users Mailing List Subject: Re: html:logic tag doesn't recognize Struts dataBean property's value I doubt the problem is logic:equal. Your jsp looks OK - why not try outputting the shopOrderExist property in your table (along with yhe other stuff) - something along the lines of: td class=listCellbean:write name=sequenceList property=shopOrderExist//td That way, you can see the value the logic:equal/notEqual is testing against. Niall - Original Message - From: Au-Yeung, Stella H [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, February 23, 2004 3:34 PM Subject: html:logic tag doesn't recognize Struts dataBean property's value Hi: In my struts-based application I am using a html:logic tag in my JSP page to print two links depends on the value of a struts-based databean's property. Bacially on this JSP page, a list of records wil be displayed. Next to each record, either a Create link or an Update link should be displayed depends upon the property 'shopOrderExist. If this property has the value notExist, it should display the Create link. If it is not equal to notExist, it should display the Update link. For some reason, the Update link is always displayed even though shopOrderExist has a value of notExist. So the logic:equal tag is not comparing things correctly. Am I doing it wrong? (note, the property shopOrderExist is of type String and in Debug I see that its value is notExist) Here's my code: logic:iterate id=sequenceList collection=%=ShopWorkOrderSearchFormBean.getPage()% type=com.cat.fdd.dataBean.shopWorkOrder.ShopWorkOrderSearchBean tr td class=listCellbean:write name=sequenceList property=sequence/ /td !-- If the ShopOrderExist attribue is not equal to notExist, display Create link ,otherwise Update link-- logic:equal name=sequenceList property=shopOrderExist value=notExist a href=app/fdd/shopWorkOrder/CreateShopWorkOrderRequest.exec img src=images/icoAdd.gif border=0/a /logic:equal logic:notEqual name=sequenceList property=shopOrderExist value=notExist a href=app/fdd/shopWorkOrder/UpdateShopWorkOrderRequest.exec img src=images/icoEdit.gif border=0/a /logic:notEqual /td /tr Thanks in advance! Stella - 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: html:logic tag doesn't recognize Struts dataBean property'svalue
Jumping in here.. yes, I think you need to trim() before you check. Also, if that too doesn't work, can you check for something positive (like if ShopOrderExist is equals to false rather than ShopOrderExist is not equals to not exists..?). Another thought, try to get this to work just using oridinary jsp tags and java code (% java code here %) and see oif things work. Than you can narrow the problem down to tag issues.. Good luck! Geeta Au-Yeung, Stella H wrote: Niall: I did what you suggested and print out the value of the property shopOrderExist. It is equal to notExist as expected. But somehow the Update link is still displayed instead of the Create link. Do you think I have to do something to the value of shopOrderExist such as .trim() or convert to true before letting it be compared in the logic:equal tag? logic:iterate id=sequenceList collection=%=ShopWorkOrderSearchFormBean.getPage()% type=com.cat.fdd.dataBean.shopWorkOrder.ShopWorkOrderSearchBean tr td class=listCellbean:write name=sequenceList property=sequence/ /td td class=listCellbean:write name=sequenceList property=shopOrderExist//td ADDED td class=listCellnobr !-- If the ShopOrderExist attribue is not equal to notExist, display Create link ,otherwise Update link-- logic:equal name=sequenceList property=shopOrderExist value=notExist a href=app/fdd/shopWorkOrder/CreateShopWorkOrderRequest.exec img src=images/icoAdd.gif border=0/a /logic:equal logic:notEqual name=sequenceList property=shopOrderExist value=notExist a href=app/fdd/shopWorkOrder/UpdateShopWorkOrderRequest.exec img src=images/icoEdit.gif border=0/a /logic:notEqual /td /tr /logic:iterate -Original Message- From: Niall Pemberton [mailto:[EMAIL PROTECTED] Sent: Monday, February 23, 2004 11:16 AM To: Struts Users Mailing List Subject: Re: html:logic tag doesn't recognize Struts dataBean property's value I doubt the problem is logic:equal. Your jsp looks OK - why not try outputting the shopOrderExist property in your table (along with yhe other stuff) - something along the lines of: td class=listCellbean:write name=sequenceList property=shopOrderExist//td That way, you can see the value the logic:equal/notEqual is testing against. Niall - Original Message - From: Au-Yeung, Stella H [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, February 23, 2004 3:34 PM Subject: html:logic tag doesn't recognize Struts dataBean property's value Hi: In my struts-based application I am using a html:logic tag in my JSP page to print two links depends on the value of a struts-based databean's property. Bacially on this JSP page, a list of records wil be displayed. Next to each record, either a Create link or an Update link should be displayed depends upon the property 'shopOrderExist. If this property has the value notExist, it should display the Create link. If it is not equal to notExist, it should display the Update link. For some reason, the Update link is always displayed even though shopOrderExist has a value of notExist. So the logic:equal tag is not comparing things correctly. Am I doing it wrong? (note, the property shopOrderExist is of type String and in Debug I see that its value is notExist) Here's my code: logic:iterate id=sequenceList collection=%=ShopWorkOrderSearchFormBean.getPage()% type=com.cat.fdd.dataBean.shopWorkOrder.ShopWorkOrderSearchBean tr td class=listCellbean:write name=sequenceList property=sequence/ /td !-- If the ShopOrderExist attribue is not equal to notExist, display Create link ,otherwise Update link-- logic:equal name=sequenceList property=shopOrderExist value=notExist a href=app/fdd/shopWorkOrder/CreateShopWorkOrderRequest.exec img src=images/icoAdd.gif border=0/a /logic:equal logic:notEqual name=sequenceList property=shopOrderExist value=notExist a href=app/fdd/shopWorkOrder/UpdateShopWorkOrderRequest.exec img src=images/icoEdit.gif border=0/a /logic:notEqual /td /tr Thanks in advance! Stella - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: html:logic tag doesn't recognize Struts dataBean property's value
Yes Geeta. I do need trim() and that makes it work. That is so strange even though when I printed out ShopOrderExist to confirm it has no trailing blanks. Thanks. -Original Message- From: Geeta Ramani [mailto:[EMAIL PROTECTED] Sent: Monday, February 23, 2004 1:45 PM To: Struts Users Mailing List Subject: Re: html:logic tag doesn't recognize Struts dataBean property'svalue Jumping in here.. yes, I think you need to trim() before you check. Also, if that too doesn't work, can you check for something positive (like if ShopOrderExist is equals to false rather than ShopOrderExist is not equals to not exists..?). Another thought, try to get this to work just using oridinary jsp tags and java code (% java code here %) and see oif things work. Than you can narrow the problem down to tag issues.. Good luck! Geeta Au-Yeung, Stella H wrote: Niall: I did what you suggested and print out the value of the property shopOrderExist. It is equal to notExist as expected. But somehow the Update link is still displayed instead of the Create link. Do you think I have to do something to the value of shopOrderExist such as .trim() or convert to true before letting it be compared in the logic:equal tag? logic:iterate id=sequenceList collection=%=ShopWorkOrderSearchFormBean.getPage()% type=com.cat.fdd.dataBean.shopWorkOrder.ShopWorkOrderSearchBean tr td class=listCellbean:write name=sequenceList property=sequence/ /td td class=listCellbean:write name=sequenceList property=shopOrderExist//td ADDED td class=listCellnobr !-- If the ShopOrderExist attribue is not equal to notExist, display Create link ,otherwise Update link-- logic:equal name=sequenceList property=shopOrderExist value=notExist a href=app/fdd/shopWorkOrder/CreateShopWorkOrderRequest.exec img src=images/icoAdd.gif border=0/a /logic:equal logic:notEqual name=sequenceList property=shopOrderExist value=notExist a href=app/fdd/shopWorkOrder/UpdateShopWorkOrderRequest.exec img src=images/icoEdit.gif border=0/a /logic:notEqual /td /tr /logic:iterate -Original Message- From: Niall Pemberton [mailto:[EMAIL PROTECTED] Sent: Monday, February 23, 2004 11:16 AM To: Struts Users Mailing List Subject: Re: html:logic tag doesn't recognize Struts dataBean property's value I doubt the problem is logic:equal. Your jsp looks OK - why not try outputting the shopOrderExist property in your table (along with yhe other stuff) - something along the lines of: td class=listCellbean:write name=sequenceList property=shopOrderExist//td That way, you can see the value the logic:equal/notEqual is testing against. Niall - Original Message - From: Au-Yeung, Stella H [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, February 23, 2004 3:34 PM Subject: html:logic tag doesn't recognize Struts dataBean property's value Hi: In my struts-based application I am using a html:logic tag in my JSP page to print two links depends on the value of a struts-based databean's property. Bacially on this JSP page, a list of records wil be displayed. Next to each record, either a Create link or an Update link should be displayed depends upon the property 'shopOrderExist. If this property has the value notExist, it should display the Create link. If it is not equal to notExist, it should display the Update link. For some reason, the Update link is always displayed even though shopOrderExist has a value of notExist. So the logic:equal tag is not comparing things correctly. Am I doing it wrong? (note, the property shopOrderExist is of type String and in Debug I see that its value is notExist) Here's my code: logic:iterate id=sequenceList collection=%=ShopWorkOrderSearchFormBean.getPage()% type=com.cat.fdd.dataBean.shopWorkOrder.ShopWorkOrderSearchBean tr td class=listCellbean:write name=sequenceList property=sequence/ /td !-- If the ShopOrderExist attribue is not equal to notExist, display Create link ,otherwise Update link-- logic:equal name=sequenceList property=shopOrderExist value=notExist a href=app/fdd/shopWorkOrder/CreateShopWorkOrderRequest.exec img src=images/icoAdd.gif border=0/a /logic:equal logic:notEqual name=sequenceList property=shopOrderExist value=notExist a href=app/fdd/shopWorkOrder/UpdateShopWorkOrderRequest.exec img src=images/icoEdit.gif border=0/a /logic:notEqual /td /tr Thanks in advance! Stella - 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: Conditional tag for method results
Yo can either use the Struts logic tags, or the standard tag library (JSTL) JSTL: http://jakarta.apache.org/taglibs/doc/standard-doc/intro.html Struts Logic Tags: http://jakarta.apache.org/struts/userGuide/struts-logic.html Niall - Original Message - From: Avinash Gangadharan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, February 18, 2004 8:43 PM Subject: Conditional tag for method results Hello All, I'm fairly new to the world of struts so pardon me if this has already been asked. Could someone tell me if I can replace the following with a much better looking tag library usage: % if( foo.method( xyz ) ) { % html:submit value=Submit Submit /html:submit % } % You can assume that foo exists in the scope of the page. Thanks and Regards Avinash - 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: Conditional tag for method results
I did look at those earlier, unfortunately I could not figure out how can I pass in a method call with a paramater passed to it, as the expression for comparison. The tags allow bean properties, cookie , request parameter etc... Could you tell me how can I use a method call with a parameter that I pass from within the JSP for evaluating the result. Thx A -Original Message- From: Niall Pemberton To: Struts Users Mailing List Sent: 2/18/2004 1:07 PM Subject: Re: Conditional tag for method results Yo can either use the Struts logic tags, or the standard tag library (JSTL) JSTL: http://jakarta.apache.org/taglibs/doc/standard-doc/intro.html Struts Logic Tags: http://jakarta.apache.org/struts/userGuide/struts-logic.html Niall - Original Message - From: Avinash Gangadharan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, February 18, 2004 8:43 PM Subject: Conditional tag for method results Hello All, I'm fairly new to the world of struts so pardon me if this has already been asked. Could someone tell me if I can replace the following with a much better looking tag library usage: % if( foo.method( xyz ) ) { % html:submit value=Submit Submit /html:submit % } % You can assume that foo exists in the scope of the page. Thanks and Regards Avinash - 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: Conditional tag for method results
You will need to create a simple custom tag for this. Its pretty simple, plenty of samples are available. -jayash -Original Message- From: Avinash Gangadharan [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 18, 2004 1:20 PM To: '[EMAIL PROTECTED]' Subject: RE: Conditional tag for method results I did look at those earlier, unfortunately I could not figure out how can I pass in a method call with a paramater passed to it, as the expression for comparison. The tags allow bean properties, cookie , request parameter etc... Could you tell me how can I use a method call with a parameter that I pass from within the JSP for evaluating the result. Thx A -Original Message- From: Niall Pemberton To: Struts Users Mailing List Sent: 2/18/2004 1:07 PM Subject: Re: Conditional tag for method results Yo can either use the Struts logic tags, or the standard tag library (JSTL) JSTL: http://jakarta.apache.org/taglibs/doc/standard-doc/intro.html Struts Logic Tags: http://jakarta.apache.org/struts/userGuide/struts-logic.html Niall - Original Message - From: Avinash Gangadharan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, February 18, 2004 8:43 PM Subject: Conditional tag for method results Hello All, I'm fairly new to the world of struts so pardon me if this has already been asked. Could someone tell me if I can replace the following with a much better looking tag library usage: % if( foo.method( xyz ) ) { % html:submit value=Submit Submit /html:submit % } % You can assume that foo exists in the scope of the page. Thanks and Regards Avinash - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Conditional tag for method results
Exactly I thought so and that is why in my question I asked if I can replace the following with a much better looking tag library usage I wanted to make sure there is'nt something already out there which I can simply use. Moreover I do think that the struts logic tag should have a generic attribute which takes any runtime exression and evaluated it's result for comparison. -Original Message- From: Gopalakrishnan, Jayesh To: Struts Users Mailing List Sent: 2/18/2004 1:33 PM Subject: RE: Conditional tag for method results You will need to create a simple custom tag for this. Its pretty simple, plenty of samples are available. -jayash -Original Message- From: Avinash Gangadharan [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 18, 2004 1:20 PM To: '[EMAIL PROTECTED]' Subject: RE: Conditional tag for method results I did look at those earlier, unfortunately I could not figure out how can I pass in a method call with a paramater passed to it, as the expression for comparison. The tags allow bean properties, cookie , request parameter etc... Could you tell me how can I use a method call with a parameter that I pass from within the JSP for evaluating the result. Thx A -Original Message- From: Niall Pemberton To: Struts Users Mailing List Sent: 2/18/2004 1:07 PM Subject: Re: Conditional tag for method results Yo can either use the Struts logic tags, or the standard tag library (JSTL) JSTL: http://jakarta.apache.org/taglibs/doc/standard-doc/intro.html Struts Logic Tags: http://jakarta.apache.org/struts/userGuide/struts-logic.html Niall - Original Message - From: Avinash Gangadharan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, February 18, 2004 8:43 PM Subject: Conditional tag for method results Hello All, I'm fairly new to the world of struts so pardon me if this has already been asked. Could someone tell me if I can replace the following with a much better looking tag library usage: % if( foo.method( xyz ) ) { % html:submit value=Submit Submit /html:submit % } % You can assume that foo exists in the scope of the page. Thanks and Regards Avinash - 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] - 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: Conditional tag for method results
Either provide a getter in your foo object [i.e. getMethod()] and then you can do logic:equals name=foo property=method value=xyz or if you can't change foo, do the method in your action and store the results somewhere (form, request, session) and then test that Niall - Original Message - From: Gopalakrishnan, Jayesh [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, February 18, 2004 9:33 PM Subject: RE: Conditional tag for method results You will need to create a simple custom tag for this. Its pretty simple, plenty of samples are available. -jayash -Original Message- From: Avinash Gangadharan [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 18, 2004 1:20 PM To: '[EMAIL PROTECTED]' Subject: RE: Conditional tag for method results I did look at those earlier, unfortunately I could not figure out how can I pass in a method call with a paramater passed to it, as the expression for comparison. The tags allow bean properties, cookie , request parameter etc... Could you tell me how can I use a method call with a parameter that I pass from within the JSP for evaluating the result. Thx A -Original Message- From: Niall Pemberton To: Struts Users Mailing List Sent: 2/18/2004 1:07 PM Subject: Re: Conditional tag for method results Yo can either use the Struts logic tags, or the standard tag library (JSTL) JSTL: http://jakarta.apache.org/taglibs/doc/standard-doc/intro.html Struts Logic Tags: http://jakarta.apache.org/struts/userGuide/struts-logic.html Niall - Original Message - From: Avinash Gangadharan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, February 18, 2004 8:43 PM Subject: Conditional tag for method results Hello All, I'm fairly new to the world of struts so pardon me if this has already been asked. Could someone tell me if I can replace the following with a much better looking tag library usage: % if( foo.method( xyz ) ) { % html:submit value=Submit Submit /html:submit % } % You can assume that foo exists in the scope of the page. Thanks and Regards Avinash - 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] - 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: nested tag problem - image not shown
prolem found: need to use relative path : nested:image src=images/tree/km_plus.gif property=toggle/ ~~~ --- hi, i am trying the nexted MOnkey example, everything works fine except that the image is not shown. In my TreeNode.jsp: nested:image src=/images/tree/km_plus.gif property=toggle/ The only difference is that TreeNode is a Tile now. I am using IE 6.0, Win XP, Struts 1.1 thanks in advance, li xin __ Do you Yahoo!? Yahoo! Finance: Get your refund fast by filing online. http://taxes.yahoo.com/filing.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts Tag
Nest two logic:Match or logic:equals tags one inside another :-)) -Original Message- From: Oliver Thiel [mailto:[EMAIL PROTECTED] Sent: Monday, February 09, 2004 6:07 PM To: [EMAIL PROTECTED] Subject: Struts Tag Hi, does anyone know a tag like logic:Match or logic:equals beside that it should be able to handel more than one property! thanks Oliver -- GMX ProMail (250 MB Mailbox, 50 FreeSMS, Virenschutz, 2,99 EUR/Monat...) jetzt 3 Monate GRATIS + 3x DER SPIEGEL +++ http://www.gmx.net/derspiegel +++ - 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: Struts Tag
does anyone know a tag like logic:Match or logic:equals beside that it should be able to handel more than one property! Use the JSTL c:if test=... tag. You can use a quite complex expression involving as many variables as you like. -- Tim Slattery [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
SOLVED RE: Struts Tag
Thanks Shirishchandra and Tim! The JSLT Tag works fine for me. does anyone know a tag like logic:Match or logic:equals beside that it should be able to handel more than one property! Use the JSTL c:if test=... tag. You can use a quite complex expression involving as many variables as you like. -- Tim Slattery [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- GMX ProMail (250 MB Mailbox, 50 FreeSMS, Virenschutz, 2,99 EUR/Monat...) jetzt 3 Monate GRATIS + 3x DER SPIEGEL +++ http://www.gmx.net/derspiegel +++ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: img tag with action as src
Michael McGrady [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] At 10:13 AM 2/3/2004, Greg Blomquist wrote: I apologize in advance if this question has already been answered somewhere. Looks like basebeans is down so I can't search the struts-user archives. I'm trying to do the following: img src=/some/dir/myAction.do The only problem is that it doesn't like the relative path. Your question indicates some misunderstanding is going on. The path is irrelevant, since the controller will take the action no matter what. And your response indicates some inability to read a message board. At 1:48PM on 2/3/2004, I posted a message in this thread with SOLVED appended to the subject. Of course, your post occured just 10 minutes after mine did. So, perhaps cyberspace time delay could account for you having not seen my post. With the help of Ben Anderson, I was able to figure out that I should be using the path attribute of the html:img tag instead of the src attribute. At least, this is what fixed my problem. So, my final assumption is that img src=/some/path/myAction.do or even html:img src=/some/path/myAction.do/ will not work. Instead, one my use html:img path=/some/path/myAction.do/. I'm not sure if this has to do with the fact that in using the src attribute, you're telling the container (or browser, or controller) that it's an exisiting _filesystem_ path, vs. some virtual path. All I know if that src didn't work, and path did work. Thanks for the post anyhow. - Greg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: img tag with action as src
Well, Mr. Greg Bloomquist, Ben Anderson is not correct on that point, if you cite him correctly. You can use the src attribute fine. I do it all the time. I explore this more below. You said: With the help of Ben Anderson, I was able to figure out that I should be using the path attribute of the html:img tag instead of the src attribute. At least, this is what fixed my problem. So, my final assumption is that img src=/some/path/myAction.do or even html:img src=/some/path/myAction.do/ will not work. This is not correct. My original response is correct. The use of .do is the important thing and that will take the request to the controller for processing. So, you are not seeing what the problem is. You seem a bit put out about my answer and expect me to spend my time monitoring all your messages, apparently, so as not to hurt your feelings or something. I cannot promise that kind of dedication to you, I would still be happy to help you get this right, if you would like. Just so you don't think this is merely arrogance, you can go to www.michaelmcgrady.com, look at the src attribute on the opening page under the source obtained from View in your browser, if you are using Internet Explorer for direct proof that your conclusions are mistaken. Notice that I use .MICHAELMcGRADY instead of .do. Okay? Peace, shalom, namaste, handshake? LOL Relax a little man. Try going wo, woo, w, a bit. Remember that URLs are just file finding devices and that when you use .do, the URL part of that device is rendered essentially irrelevant. I am quite serious that I would like to help you and quite serious that you need to chill a bit. Michael Mcgrady I nstead, one my use html:img path=/some/path/myAction.do/. I'm not sure if this has to do with the fact that in using the src attribute, you're telling the container (or browser, or controller) that it's an exisiting _filesystem_ path, vs. some virtual path. All I know if that src didn't work, and path did work. Thanks for the post anyhow. - Greg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: img tag with action as src
Just to save you time looking, Greg Bloomquist, here is the tag that works: IMG height=18 alt=Powered by Struts src=RESOURCE.MICHAELMcGRADY?file_type=giffile_name=struts-power.gif Okay dokay? Not trying to beat a dead horse or get one to float when led to water but just letting you know how it is, because code that works for the wrong reason is likely to come back and on the Michael McGrady At 07:49 AM 2/6/2004, you wrote: So, my final assumption is that img src=/some/path/myAction.do or even html:img src=/some/path/myAction.do/ will not work. Instead, one my use html:img path=/some/path/myAction.do/. I'm not sure if this has to do with the fact that in using the src attribute, you're telling the container (or browser, or controller) that it's an exisiting _filesystem_ path, vs. some virtual path. All I know if that src didn't work, and path did work. Thanks for the post anyhow. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: img tag with action as src
Greg, maybe the best way to help you with this is to give you the simple view solution and just forget the fancy stuff. If so, here is the URL: http://jakarta.apache.org/struts/userGuide/struts-html.html#img. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: c:out tag inside html:text tag
Two issues may be at work here: 1. It isn't valid to have a JSP tag render an attribute value for another JSP tag. This might work instead, depending on the scope of styleVar: html:text name=Customer property =Name maxlength=256 size=256 style=%=styleVar% / 2. Are you missing the %@ taglib % thingy for the html taglib in your JSP? -Max - Original Message - From: Rahul Mohan [EMAIL PROTECTED] To: struts [EMAIL PROTECTED] Sent: Wednesday, January 07, 2004 11:47 PM Subject: c:out tag inside html:text tag Hi...I am facing some problems with using JSTL tags inside struts tags. This is the piece of code I wrote for my application: html:text name=Customer property =Name maxlength=256 size=256 style=c:out value=${styleVar}/ / the problem is that it is getting traslated to html:text name=w_CustomerWin property =wca_Name maxlength=256 size=256 style=width:100;height:22;position:absolute;top:20;left:56;display:none; / in the final html page!! can anybody please tell me why the html:text tag is not getting translated to input type=text . ? thank you.. Rahul Mohan ~~~ MasterCraft Group Tata Consultancy Services Tata Research Development and Design Center 54B, Hadapsar Industrial Estate Pune - 411 013 Phone: +91 4042333 or 4031122 Extn 2541 +91 471 3129787 ( Mobile ) Fax: +91 20 4042399 email : [EMAIL PROTECTED] ~~~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: c:out tag inside html:text tag
Hi Max, Thanks for the reply... I have found a work around for the problem...but it looks wierd!! These are the steps I performed: 1. I am setting the styleVar as follows: c:set var=styleVar c:choose some JSTL conditional stmts /c:choose /c:set 2. Then I retrieve the value using the following scriptlet: % String str = pageContext.findAttribute(styleVar).toString(); % 3. Now I can use the value of str inside my html:text tag as follows: html:text name=Customer property =Name maxlength=256 size=256 style=%=str% / The wierd part is that if I put style=%=pageContext.findAttribute(styleVar).toString()% inside the html:text tag it wont work!!! Can anybody tell me why it is so?? I am stumped! thank you all... rahul - Original Message - From: Max Cooper [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED]; Rahul Mohan [EMAIL PROTECTED] Sent: Wednesday, February 04, 2004 1:45 PM Subject: Re: c:out tag inside html:text tag Two issues may be at work here: 1. It isn't valid to have a JSP tag render an attribute value for another JSP tag. This might work instead, depending on the scope of styleVar: html:text name=Customer property =Name maxlength=256 size=256 style=%=styleVar% / 2. Are you missing the %@ taglib % thingy for the html taglib in your JSP? -Max - Original Message - From: Rahul Mohan [EMAIL PROTECTED] To: struts [EMAIL PROTECTED] Sent: Wednesday, January 07, 2004 11:47 PM Subject: c:out tag inside html:text tag Hi...I am facing some problems with using JSTL tags inside struts tags. This is the piece of code I wrote for my application: html:text name=Customer property =Name maxlength=256 size=256 style=c:out value=${styleVar}/ / the problem is that it is getting traslated to html:text name=w_CustomerWin property =wca_Name maxlength=256 size=256 style=width:100;height:22;position:absolute;top:20;left:56;display:none; / in the final html page!! can anybody please tell me why the html:text tag is not getting translated to input type=text . ? thank you.. Rahul Mohan ~~~ MasterCraft Group Tata Consultancy Services Tata Research Development and Design Center 54B, Hadapsar Industrial Estate Pune - 411 013 Phone: +91 4042333 or 4031122 Extn 2541 +91 471 3129787 ( Mobile ) Fax: +91 20 4042399 email : [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: c:out tag inside html:text tag
Might be your nested quotes . try using different quote characters to define the nested string ie. style='%=pageContext.findAttribute(styleVar).toString()%' S. -Original Message- From: Rahul Mohan [mailto:[EMAIL PROTECTED] Sent: 04 February 2004 09:09 To: Struts Users Mailing List Subject: Re: c:out tag inside html:text tag Hi Max, Thanks for the reply... I have found a work around for the problem...but it looks wierd!! These are the steps I performed: 1. I am setting the styleVar as follows: c:set var=styleVar c:choose some JSTL conditional stmts /c:choose /c:set 2. Then I retrieve the value using the following scriptlet: % String str = pageContext.findAttribute(styleVar).toString(); % 3. Now I can use the value of str inside my html:text tag as follows: html:text name=Customer property =Name maxlength=256 size=256 style=%=str% / The wierd part is that if I put style=%=pageContext.findAttribute(styleVar).toString()% inside the html:text tag it wont work!!! Can anybody tell me why it is so?? I am stumped! thank you all... rahul - Original Message - From: Max Cooper [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED]; Rahul Mohan [EMAIL PROTECTED] Sent: Wednesday, February 04, 2004 1:45 PM Subject: Re: c:out tag inside html:text tag Two issues may be at work here: 1. It isn't valid to have a JSP tag render an attribute value for another JSP tag. This might work instead, depending on the scope of styleVar: html:text name=Customer property =Name maxlength=256 size=256 style=%=styleVar% / 2. Are you missing the %@ taglib % thingy for the html taglib in your JSP? -Max - Original Message - From: Rahul Mohan [EMAIL PROTECTED] To: struts [EMAIL PROTECTED] Sent: Wednesday, January 07, 2004 11:47 PM Subject: c:out tag inside html:text tag Hi...I am facing some problems with using JSTL tags inside struts tags. This is the piece of code I wrote for my application: html:text name=Customer property =Name maxlength=256 size=256 style=c:out value=${styleVar}/ / the problem is that it is getting traslated to html:text name=w_CustomerWin property =wca_Name maxlength=256 size=256 style=width:100;height:22;position:absolute;top:20;left:56;display:none; / in the final html page!! can anybody please tell me why the html:text tag is not getting translated to input type=text . ? thank you.. Rahul Mohan ~~~ MasterCraft Group Tata Consultancy Services Tata Research Development and Design Center 54B, Hadapsar Industrial Estate Pune - 411 013 Phone: +91 4042333 or 4031122 Extn 2541 +91 471 3129787 ( Mobile ) Fax: +91 20 4042399 email : [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: c:out tag inside html:text tag
thanks scott The problem is not with quotes as I am getting the following code in the final html; html:text name=w_CustomerWin property =wca_Name maxlength=256 size=256 style=width:100;height:22;position:absolute;top:20;left:56;display:none / note that this is present in the final html...i.e the html:text is not getting translated to html anyways I have tried using sngle quotes instead of double quotes...but still it doesnt work any idea? - Original Message - From: Glenn, Scott [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Wednesday, February 04, 2004 2:42 PM Subject: RE: c:out tag inside html:text tag Might be your nested quotes . try using different quote characters to define the nested string ie. style='%=pageContext.findAttribute(styleVar).toString()%' S. -Original Message- From: Rahul Mohan [mailto:[EMAIL PROTECTED] Sent: 04 February 2004 09:09 To: Struts Users Mailing List Subject: Re: c:out tag inside html:text tag Hi Max, Thanks for the reply... I have found a work around for the problem...but it looks wierd!! These are the steps I performed: 1. I am setting the styleVar as follows: c:set var=styleVar c:choose some JSTL conditional stmts /c:choose /c:set 2. Then I retrieve the value using the following scriptlet: % String str = pageContext.findAttribute(styleVar).toString(); % 3. Now I can use the value of str inside my html:text tag as follows: html:text name=Customer property =Name maxlength=256 size=256 style=%=str% / The wierd part is that if I put style=%=pageContext.findAttribute(styleVar).toString()% inside the html:text tag it wont work!!! Can anybody tell me why it is so?? I am stumped! thank you all... rahul - Original Message - From: Max Cooper [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED]; Rahul Mohan [EMAIL PROTECTED] Sent: Wednesday, February 04, 2004 1:45 PM Subject: Re: c:out tag inside html:text tag Two issues may be at work here: 1. It isn't valid to have a JSP tag render an attribute value for another JSP tag. This might work instead, depending on the scope of styleVar: html:text name=Customer property =Name maxlength=256 size=256 style=%=styleVar% / 2. Are you missing the %@ taglib % thingy for the html taglib in your JSP? -Max - Original Message - From: Rahul Mohan [EMAIL PROTECTED] To: struts [EMAIL PROTECTED] Sent: Wednesday, January 07, 2004 11:47 PM Subject: c:out tag inside html:text tag Hi...I am facing some problems with using JSTL tags inside struts tags. This is the piece of code I wrote for my application: html:text name=Customer property =Name maxlength=256 size=256 style=c:out value=${styleVar}/ / the problem is that it is getting traslated to html:text name=w_CustomerWin property =wca_Name maxlength=256 size=256 style=width:100;height:22;position:absolute;top:20;left:56;display:none; / in the final html page!! can anybody please tell me why the html:text tag is not getting translated to input type=text . ? thank you.. Rahul Mohan ~~~ MasterCraft Group Tata Consultancy Services Tata Research Development and Design Center 54B, Hadapsar Industrial Estate Pune - 411 013 Phone: +91 4042333 or 4031122 Extn 2541 +91 471 3129787 ( Mobile ) Fax: +91 20 4042399 email : [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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: c:out tag inside html:text tag
As Max pointed out, the reason you're still seeing html:text could be because you haven't included the appropriate taglib directive: %@ taglib prefix=html uri=http://jakarta.apache.org/struts/tags-html; % And you might try this instead of your scriptlet: c:set var=styleVar ... /c:set jsp:useBean id=styleVar type=java.lang.String/ html:text ... style=%= styleVar %/ Or use Struts-EL: %@ taglib prefix=html-el uri=http://jakarta.apache.org/struts/tags-html-el; % c:set var=styleVar ... /c:set html:text ... style=${styleVar}/ Quoting Rahul Mohan [EMAIL PROTECTED]: thanks scott The problem is not with quotes as I am getting the following code in the final html; html:text name=w_CustomerWin property =wca_Name maxlength=256 size=256 style=width:100;height:22;position:absolute;top:20;left:56;display:none / note that this is present in the final html...i.e the html:text is not getting translated to html anyways I have tried using sngle quotes instead of double quotes...but still it doesnt work any idea? - Original Message - From: Glenn, Scott [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Wednesday, February 04, 2004 2:42 PM Subject: RE: c:out tag inside html:text tag Might be your nested quotes . try using different quote characters to define the nested string ie. style='%=pageContext.findAttribute(styleVar).toString()%' S. -Original Message- From: Rahul Mohan [mailto:[EMAIL PROTECTED] Sent: 04 February 2004 09:09 To: Struts Users Mailing List Subject: Re: c:out tag inside html:text tag Hi Max, Thanks for the reply... I have found a work around for the problem...but it looks wierd!! These are the steps I performed: 1. I am setting the styleVar as follows: c:set var=styleVar c:choose some JSTL conditional stmts /c:choose /c:set 2. Then I retrieve the value using the following scriptlet: % String str = pageContext.findAttribute(styleVar).toString(); % 3. Now I can use the value of str inside my html:text tag as follows: html:text name=Customer property =Name maxlength=256 size=256 style=%=str% / The wierd part is that if I put style=%=pageContext.findAttribute(styleVar).toString()% inside the html:text tag it wont work!!! Can anybody tell me why it is so?? I am stumped! thank you all... rahul - Original Message - From: Max Cooper [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED]; Rahul Mohan [EMAIL PROTECTED] Sent: Wednesday, February 04, 2004 1:45 PM Subject: Re: c:out tag inside html:text tag Two issues may be at work here: 1. It isn't valid to have a JSP tag render an attribute value for another JSP tag. This might work instead, depending on the scope of styleVar: html:text name=Customer property =Name maxlength=256 size=256 style=%=styleVar% / 2. Are you missing the %@ taglib % thingy for the html taglib in your JSP? -Max - Original Message - From: Rahul Mohan [EMAIL PROTECTED] To: struts [EMAIL PROTECTED] Sent: Wednesday, January 07, 2004 11:47 PM Subject: c:out tag inside html:text tag Hi...I am facing some problems with using JSTL tags inside struts tags. This is the piece of code I wrote for my application: html:text name=Customer property =Name maxlength=256 size=256 style=c:out value=${styleVar}/ / the problem is that it is getting traslated to html:text name=w_CustomerWin property =wca_Name maxlength=256 size=256 style=width:100;height:22;position:absolute;top:20;left:56;display:none; / in the final html page!! can anybody please tell me why the html:text tag is not getting translated to input type=text . ? thank you.. Rahul Mohan ~~~ MasterCraft Group Tata Consultancy Services Tata Research Development and Design Center 54B, Hadapsar Industrial Estate Pune - 411 013 Phone: +91 4042333 or 4031122 Extn 2541 +91 471 3129787 ( Mobile ) Fax: +91 20 4042399 email : [EMAIL PROTECTED] ~~~ -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: c:out tag inside html:text tag
Quoting Kris Schneider [EMAIL PROTECTED]: As Max pointed out, the reason you're still seeing html:text could be because you haven't included the appropriate taglib directive: %@ taglib prefix=html uri=http://jakarta.apache.org/struts/tags-html; % And you might try this instead of your scriptlet: c:set var=styleVar ... /c:set jsp:useBean id=styleVar type=java.lang.String/ html:text ... style=%= styleVar %/ Or use Struts-EL: %@ taglib prefix=html-el uri=http://jakarta.apache.org/struts/tags-html-el; % c:set var=styleVar ... /c:set html:text ... style=${styleVar}/ html-el:text ... style=${styleVar}/ Quoting Rahul Mohan [EMAIL PROTECTED]: thanks scott The problem is not with quotes as I am getting the following code in the final html; html:text name=w_CustomerWin property =wca_Name maxlength=256 size=256 style=width:100;height:22;position:absolute;top:20;left:56;display:none / note that this is present in the final html...i.e the html:text is not getting translated to html anyways I have tried using sngle quotes instead of double quotes...but still it doesnt work any idea? - Original Message - From: Glenn, Scott [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Wednesday, February 04, 2004 2:42 PM Subject: RE: c:out tag inside html:text tag Might be your nested quotes . try using different quote characters to define the nested string ie. style='%=pageContext.findAttribute(styleVar).toString()%' S. -Original Message- From: Rahul Mohan [mailto:[EMAIL PROTECTED] Sent: 04 February 2004 09:09 To: Struts Users Mailing List Subject: Re: c:out tag inside html:text tag Hi Max, Thanks for the reply... I have found a work around for the problem...but it looks wierd!! These are the steps I performed: 1. I am setting the styleVar as follows: c:set var=styleVar c:choose some JSTL conditional stmts /c:choose /c:set 2. Then I retrieve the value using the following scriptlet: % String str = pageContext.findAttribute(styleVar).toString(); % 3. Now I can use the value of str inside my html:text tag as follows: html:text name=Customer property =Name maxlength=256 size=256 style=%=str% / The wierd part is that if I put style=%=pageContext.findAttribute(styleVar).toString()% inside the html:text tag it wont work!!! Can anybody tell me why it is so?? I am stumped! thank you all... rahul - Original Message - From: Max Cooper [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED]; Rahul Mohan [EMAIL PROTECTED] Sent: Wednesday, February 04, 2004 1:45 PM Subject: Re: c:out tag inside html:text tag Two issues may be at work here: 1. It isn't valid to have a JSP tag render an attribute value for another JSP tag. This might work instead, depending on the scope of styleVar: html:text name=Customer property =Name maxlength=256 size=256 style=%=styleVar% / 2. Are you missing the %@ taglib % thingy for the html taglib in your JSP? -Max - Original Message - From: Rahul Mohan [EMAIL PROTECTED] To: struts [EMAIL PROTECTED] Sent: Wednesday, January 07, 2004 11:47 PM Subject: c:out tag inside html:text tag Hi...I am facing some problems with using JSTL tags inside struts tags. This is the piece of code I wrote for my application: html:text name=Customer property =Name maxlength=256 size=256 style=c:out value=${styleVar}/ / the problem is that it is getting traslated to html:text name=w_CustomerWin property =wca_Name maxlength=256 size=256 style=width:100;height:22;position:absolute;top:20;left:56;display:none; / in the final html page!! can anybody please tell me why the html:text tag is not getting translated to input type=text . ? thank you.. Rahul Mohan ~~~ MasterCraft Group Tata Consultancy Services Tata Research Development and Design Center 54B, Hadapsar Industrial Estate Pune - 411 013 Phone: +91 4042333 or 4031122 Extn 2541 +91 471 3129787 ( Mobile ) Fax: +91 20 4042399 email : [EMAIL PROTECTED] ~~~ -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.com
RE: c:out tag inside html:text tag
hi, u can use html-el library or jsp:attribute if your server supports jsp2.. []´s Daniel Ruiz -Original Message- From: Kris Schneider [mailto:[EMAIL PROTECTED] Sent: quarta-feira, 4 de fevereiro de 2004 10:54 To: Struts Users Mailing List; Rahul Mohan Subject: Re: c:out tag inside html:text tag As Max pointed out, the reason you're still seeing html:text could be because you haven't included the appropriate taglib directive: %@ taglib prefix=html uri=http://jakarta.apache.org/struts/tags-html; % And you might try this instead of your scriptlet: c:set var=styleVar ... /c:set jsp:useBean id=styleVar type=java.lang.String/ html:text ... style=%= styleVar %/ Or use Struts-EL: %@ taglib prefix=html-el uri=http://jakarta.apache.org/struts/tags-html-el; % c:set var=styleVar ... /c:set html:text ... style=${styleVar}/ Quoting Rahul Mohan [EMAIL PROTECTED]: thanks scott The problem is not with quotes as I am getting the following code in the final html; html:text name=w_CustomerWin property =wca_Name maxlength=256 size=256 style=width:100;height:22;position:absolute;top:20;left:56;display:none / note that this is present in the final html...i.e the html:text is not getting translated to html anyways I have tried using sngle quotes instead of double quotes...but still it doesnt work any idea? - Original Message - From: Glenn, Scott [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Wednesday, February 04, 2004 2:42 PM Subject: RE: c:out tag inside html:text tag Might be your nested quotes . try using different quote characters to define the nested string ie. style='%=pageContext.findAttribute(styleVar).toString()%' S. -Original Message- From: Rahul Mohan [mailto:[EMAIL PROTECTED] Sent: 04 February 2004 09:09 To: Struts Users Mailing List Subject: Re: c:out tag inside html:text tag Hi Max, Thanks for the reply... I have found a work around for the problem...but it looks wierd!! These are the steps I performed: 1. I am setting the styleVar as follows: c:set var=styleVar c:choose some JSTL conditional stmts /c:choose /c:set 2. Then I retrieve the value using the following scriptlet: % String str = pageContext.findAttribute(styleVar).toString(); % 3. Now I can use the value of str inside my html:text tag as follows: html:text name=Customer property =Name maxlength=256 size=256 style=%=str% / The wierd part is that if I put style=%=pageContext.findAttribute(styleVar).toString()% inside the html:text tag it wont work!!! Can anybody tell me why it is so?? I am stumped! thank you all... rahul - Original Message - From: Max Cooper [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED]; Rahul Mohan [EMAIL PROTECTED] Sent: Wednesday, February 04, 2004 1:45 PM Subject: Re: c:out tag inside html:text tag Two issues may be at work here: 1. It isn't valid to have a JSP tag render an attribute value for another JSP tag. This might work instead, depending on the scope of styleVar: html:text name=Customer property =Name maxlength=256 size=256 style=%=styleVar% / 2. Are you missing the %@ taglib % thingy for the html taglib in your JSP? -Max - Original Message - From: Rahul Mohan [EMAIL PROTECTED] To: struts [EMAIL PROTECTED] Sent: Wednesday, January 07, 2004 11:47 PM Subject: c:out tag inside html:text tag Hi...I am facing some problems with using JSTL tags inside struts tags. This is the piece of code I wrote for my application: html:text name=Customer property =Name maxlength=256 size=256 style=c:out value=${styleVar}/ / the problem is that it is getting traslated to html:text name=w_CustomerWin property =wca_Name maxlength=256 size=256 style=width:100;height:22;position:absolute;top:20;left:56;display:none; / in the final html page!! can anybody please tell me why the html:text tag is not getting translated to input type=text . ? thank you.. Rahul Mohan ~~~ MasterCraft Group Tata Consultancy Services Tata Research Development and Design Center 54B, Hadapsar Industrial Estate Pune - 411 013 Phone: +91 4042333 or 4031122 Extn 2541 +91 471 3129787 ( Mobile ) Fax: +91 20 4042399 email : [EMAIL PROTECTED] ~~~ -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http
RE: out tag inside html:text tag
Hi...I am facing some problems with using JSTL tags inside struts tags. This is the piece of code I wrote for my application: html:text name=Customer property =Name maxlength=256 size=256 style=c:out value=${styleVar}/ / You can't nest tags, so this syntax just is not going to work. But, you can get the same place by using the el tags: html-el:text name=Customer property =Name maxlength=256 size=256 style=${styleVar}/ / -- Tim Slattery [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: out tag inside html:text tag
Try using the struts-el tag library It's an extension of the struts taglib that allows you to use JSTL EL So you example becomes... html-el:text style=${styleVar} .../ -Original Message- From: Rahul Mohan [mailto:[EMAIL PROTECTED] Sent: Thursday, January 08, 2004 2:48 AM To: struts Subject: c:out tag inside html:text tag Hi...I am facing some problems with using JSTL tags inside struts tags. This is the piece of code I wrote for my application: html:text name=Customer property =Name maxlength=256 size=256 style=c:out value=${styleVar}/ / the problem is that it is getting traslated to html:text name=w_CustomerWin property =wca_Name maxlength=256 size=256 style=width:100;height:22;position:absolute;top:20;left:56;display:none; / in the final html page!! can anybody please tell me why the html:text tag is not getting translated to input type=text . ? thank you.. Rahul Mohan ~~~ MasterCraft Group Tata Consultancy Services Tata Research Development and Design Center 54B, Hadapsar Industrial Estate Pune - 411 013 Phone: +91 4042333 or 4031122 Extn 2541 +91 471 3129787 ( Mobile ) Fax: +91 20 4042399 email : [EMAIL PROTECTED] ~~~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: out tag inside html:text tag
Do you have the %@ taglib uri=struts-html prefix=html % line in the JSP...I guess you do? Don't know why it wouldn't work. I can only suggest using the bean:define %=styleVar% combination ... -jayash -Original Message- From: Rahul Mohan [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 07, 2004 11:48 PM To: struts Subject: c:out tag inside html:text tag Hi...I am facing some problems with using JSTL tags inside struts tags. This is the piece of code I wrote for my application: html:text name=Customer property =Name maxlength=256 size=256 style=c:out value=${styleVar}/ / the problem is that it is getting traslated to html:text name=w_CustomerWin property =wca_Name maxlength=256 size=256 style=width:100;height:22;position:absolute;top:20;left:56;display:none; / in the final html page!! can anybody please tell me why the html:text tag is not getting translated to input type=text . ? thank you.. Rahul Mohan ~~~ MasterCraft Group Tata Consultancy Services Tata Research Development and Design Center 54B, Hadapsar Industrial Estate Pune - 411 013 Phone: +91 4042333 or 4031122 Extn 2541 +91 471 3129787 ( Mobile ) Fax: +91 20 4042399 email : [EMAIL PROTECTED] ~~~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: out tag inside html:text tag
As other posters pointed out, just use Struts-EL, and you'll end up with: html:text name=Customer property =Name maxlength=256 size=256 style=${styleVar} / Note that I recommend using the same prefix with Struts-EL as you do with the base library, although my earlier documentation (and I use the term loosely :) ) implies using html-el. Using the same prefix will make it easier to transition to JSP 2.0, which won't use Struts-EL (because it's not needed). -Original Message- From: Rahul Mohan [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 07, 2004 11:48 PM To: struts Subject: c:out tag inside html:text tag Hi...I am facing some problems with using JSTL tags inside struts tags. This is the piece of code I wrote for my application: html:text name=Customer property =Name maxlength=256 size=256 style=c:out value=${styleVar}/ / the problem is that it is getting traslated to html:text name=w_CustomerWin property =wca_Name maxlength=256 size=256 style=width:100;height:22;position:absolute;top:20;left:56;display:none ; / in the final html page!! can anybody please tell me why the html:text tag is not getting translated to input type=text . ? thank you.. Rahul Mohan ~~~ MasterCraft Group Tata Consultancy Services Tata Research Development and Design Center 54B, Hadapsar Industrial Estate Pune - 411 013 Phone: +91 4042333 or 4031122 Extn 2541 +91 471 3129787 ( Mobile ) Fax: +91 20 4042399 email : [EMAIL PROTECTED] ~~~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: img tag with action as src
Greg use the html:base/ Tag. Then Struts appends the base uri like http://localhost:/MyApp/ to your relative path. Your image might be then img src=/some/dir/mypicture.jpg Manfred Greg Blomquist wrote: I apologize in advance if this question has already been answered somewhere. Looks like basebeans is down so I can't search the struts-user archives. I'm trying to do the following: img src=/some/dir/myAction.do The only problem is that it doesn't like the relative path. I have to code the absolute path: img src=http://localhost:/MyApp/some/dir/myAction.do; Which is fine until I move to production. Is there a way to use a relative path when using an action for the src attribute of an image tag? Thanks! Btw, I'm running WSAD 5.1 and the error message I get when trying a relative path is: Virtual Host/WebGroup Not Found : The web group /secure/isa/performance/graph.do has not been defined - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- === Dipl.-Inf. Manfred Wolff --- phone neusta : +49 421 20696-27 phone : +49 421 534522 mobil : +49 178 49 18 434 eFax : +49 1212 6 626 63 965 33 --- Diese E-Mail enthält möglicherweise vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet. This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: img tag with action as src
Thanks for the speedy reply. However, that doesn't seem to solve the problem I'm having. I'm receiving the same error as before after adding the html:base/ tag to the HEAD section of my page. Do I need to fill in any attributes to the base tag? Also, the problem I'm having might be related to the fact that I'm trying to call an action to generate the image for the img tag. I'm not directly referencing an existing .JPG or .GIF file. Could that play a part in this? Thanks again... Greg Manfred Wolff [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Greg use the html:base/ Tag. Then Struts appends the base uri like http://localhost:/MyApp/ to your relative path. Your image might be then img src=/some/dir/mypicture.jpg Manfred Greg Blomquist wrote: I apologize in advance if this question has already been answered somewhere. Looks like basebeans is down so I can't search the struts-user archives. I'm trying to do the following: img src=/some/dir/myAction.do The only problem is that it doesn't like the relative path. I have to code the absolute path: img src=http://localhost:/MyApp/some/dir/myAction.do; Which is fine until I move to production. Is there a way to use a relative path when using an action for the src attribute of an image tag? Thanks! Btw, I'm running WSAD 5.1 and the error message I get when trying a relative path is: Virtual Host/WebGroup Not Found : The web group /secure/isa/performance/graph.do has not been defined - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- === Dipl.-Inf. Manfred Wolff --- phone neusta : +49 421 20696-27 phone : +49 421 534522 mobil : +49 178 49 18 434 eFax : +49 1212 6 626 63 965 33 --- Diese E-Mail enthält möglicherweise vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet. This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: img tag with action as src
if img src=/some/dir/myAction.dodoens't work for you, then adding an base tag isn't going to help you. You just need to add your application context in there. Check out: http://jakarta.apache.org/struts/userGuide/struts-html.html#img Also here's another archive site: http://marc.theaimsgroup.com -Ben From: Manfred Wolff [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: img tag with action as src Date: Tue, 03 Feb 2004 19:27:03 +0100 Greg use the html:base/ Tag. Then Struts appends the base uri like http://localhost:/MyApp/ to your relative path. Your image might be then img src=/some/dir/mypicture.jpg Manfred Greg Blomquist wrote: I apologize in advance if this question has already been answered somewhere. Looks like basebeans is down so I can't search the struts-user archives. I'm trying to do the following: img src=/some/dir/myAction.do The only problem is that it doesn't like the relative path. I have to code the absolute path: img src=http://localhost:/MyApp/some/dir/myAction.do; Which is fine until I move to production. Is there a way to use a relative path when using an action for the src attribute of an image tag? Thanks! Btw, I'm running WSAD 5.1 and the error message I get when trying a relative path is: Virtual Host/WebGroup Not Found : The web group /secure/isa/performance/graph.do has not been defined - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- === Dipl.-Inf. Manfred Wolff --- phone neusta : +49 421 20696-27 phone : +49 421 534522 mobil : +49 178 49 18 434 eFax : +49 1212 6 626 63 965 33 --- Diese E-Mail enthält möglicherweise vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet. This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Find high-speed net deals comparison-shop your local providers here. https://broadband.msn.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: img tag with action as src
Could that play a part in this? nope From: Greg Blomquist [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: img tag with action as src Date: Tue, 3 Feb 2004 13:38:38 -0500 Thanks for the speedy reply. However, that doesn't seem to solve the problem I'm having. I'm receiving the same error as before after adding the html:base/ tag to the HEAD section of my page. Do I need to fill in any attributes to the base tag? Also, the problem I'm having might be related to the fact that I'm trying to call an action to generate the image for the img tag. I'm not directly referencing an existing .JPG or .GIF file. Could that play a part in this? Thanks again... Greg Manfred Wolff [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Greg use the html:base/ Tag. Then Struts appends the base uri like http://localhost:/MyApp/ to your relative path. Your image might be then img src=/some/dir/mypicture.jpg Manfred Greg Blomquist wrote: I apologize in advance if this question has already been answered somewhere. Looks like basebeans is down so I can't search the struts-user archives. I'm trying to do the following: img src=/some/dir/myAction.do The only problem is that it doesn't like the relative path. I have to code the absolute path: img src=http://localhost:/MyApp/some/dir/myAction.do; Which is fine until I move to production. Is there a way to use a relative path when using an action for the src attribute of an image tag? Thanks! Btw, I'm running WSAD 5.1 and the error message I get when trying a relative path is: Virtual Host/WebGroup Not Found : The web group /secure/isa/performance/graph.do has not been defined - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- === Dipl.-Inf. Manfred Wolff --- phone neusta : +49 421 20696-27 phone : +49 421 534522 mobil : +49 178 49 18 434 eFax : +49 1212 6 626 63 965 33 --- Diese E-Mail enthält möglicherweise vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet. This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ What are the 5 hot job markets for 2004? Click here to find out. http://msn.careerbuilder.com/Custom/MSN/CareerAdvice/WPI_WhereWillWeFindJobsIn2004.htm?siteid=CBMSN3006sc_extcmp=JS_wi08_dec03_hotmail1 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: img tag with action as src SOLVED
That's it! html:img page=myAction.do/ I knew that struts taglib had a way to do what I wanted, I just couldn't remember what it was... Thanks Ben! Ben Anderson [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] if img src=/some/dir/myAction.dodoens't work for you, then adding an base tag isn't going to help you. You just need to add your application context in there. Check out: http://jakarta.apache.org/struts/userGuide/struts-html.html#img Also here's another archive site: http://marc.theaimsgroup.com -Ben From: Manfred Wolff [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: img tag with action as src Date: Tue, 03 Feb 2004 19:27:03 +0100 Greg use the html:base/ Tag. Then Struts appends the base uri like http://localhost:/MyApp/ to your relative path. Your image might be then img src=/some/dir/mypicture.jpg Manfred Greg Blomquist wrote: I apologize in advance if this question has already been answered somewhere. Looks like basebeans is down so I can't search the struts-user archives. I'm trying to do the following: img src=/some/dir/myAction.do The only problem is that it doesn't like the relative path. I have to code the absolute path: img src=http://localhost:/MyApp/some/dir/myAction.do; Which is fine until I move to production. Is there a way to use a relative path when using an action for the src attribute of an image tag? Thanks! Btw, I'm running WSAD 5.1 and the error message I get when trying a relative path is: Virtual Host/WebGroup Not Found : The web group /secure/isa/performance/graph.do has not been defined - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- === Dipl.-Inf. Manfred Wolff --- phone neusta : +49 421 20696-27 phone : +49 421 534522 mobil : +49 178 49 18 434 eFax : +49 1212 6 626 63 965 33 --- Diese E-Mail enthält möglicherweise vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet. This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Find high-speed 'net deals - comparison-shop your local providers here. https://broadband.msn.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: img tag with action as src
Hi, Try using html:rewrite page=/some/dir/myAction.do/ -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Greg Blomquist Sent: 03 February 2004 23:44 To: [EMAIL PROTECTED] Subject: img tag with action as src I apologize in advance if this question has already been answered somewhere. Looks like basebeans is down so I can't search the struts-user archives. I'm trying to do the following: img src=/some/dir/myAction.do The only problem is that it doesn't like the relative path. I have to code the absolute path: img src=http://localhost:/MyApp/some/dir/myAction.do; Which is fine until I move to production. Is there a way to use a relative path when using an action for the src attribute of an image tag? Thanks! Btw, I'm running WSAD 5.1 and the error message I get when trying a relative path is: Virtual Host/WebGroup Not Found : The web group /secure/isa/performance/graph.do has not been defined - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: img tag with action as src
At 10:13 AM 2/3/2004, Greg Blomquist wrote: I apologize in advance if this question has already been answered somewhere. Looks like basebeans is down so I can't search the struts-user archives. I'm trying to do the following: img src=/some/dir/myAction.do The only problem is that it doesn't like the relative path. Your question indicates some misunderstanding is going on. The path is irrelevant, since the controller will take the action no matter what. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: img tag with action as src
Were are attempting to do the same thing. (Have an action return an image) everything works great but we have the following error in the server log. StandardWrapperValve[action]: Servlet.service() for servlet action threw exception java.lang.IllegalStateException: getOutputStream() has already been called for this response at org.apache.catalina.connector.ResponseBase.getWriter(ResponseBase.java: 836) at org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.ja va:165) at javax.servlet.ServletResponseWrapper.getWriter(ServletResponseWrapper.ja va:146) at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:184) at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java: 176) at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java: 174) at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspF actoryImpl.java:204) at org.apache.jasper.runtime.JspFactoryImpl.access$000(JspFactoryImpl.java: 83) at org.apache.jasper.runtime.JspFactoryImpl$PrivilegedReleasePageContext.ru n(JspFactoryImpl.java:132) at java.security.AccessController.doPrivileged(Native Method) at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryIm pl.java:197) We are only calling that method one in our action. Nathan On Feb 3, 2004, at 11:41 AM, Ben Anderson wrote: if img src=/some/dir/myAction.dodoens't work for you, then adding an base tag isn't going to help you. You just need to add your application context in there. Check out: http://jakarta.apache.org/struts/userGuide/struts-html.html#img Also here's another archive site: http://marc.theaimsgroup.com -Ben From: Manfred Wolff [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: img tag with action as src Date: Tue, 03 Feb 2004 19:27:03 +0100 Greg use the html:base/ Tag. Then Struts appends the base uri like http://localhost:/MyApp/ to your relative path. Your image might be then img src=/some/dir/mypicture.jpg Manfred Greg Blomquist wrote: I apologize in advance if this question has already been answered somewhere. Looks like basebeans is down so I can't search the struts-user archives. I'm trying to do the following: img src=/some/dir/myAction.do The only problem is that it doesn't like the relative path. I have to code the absolute path: img src=http://localhost:/MyApp/some/dir/myAction.do; Which is fine until I move to production. Is there a way to use a relative path when using an action for the src attribute of an image tag? Thanks! Btw, I'm running WSAD 5.1 and the error message I get when trying a relative path is: Virtual Host/WebGroup Not Found : The web group /secure/isa/performance/graph.do has not been defined - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- === Dipl.-Inf. Manfred Wolff --- phone neusta : +49 421 20696-27 phone : +49 421 534522 mobil : +49 178 49 18 434 eFax : +49 1212 6 626 63 965 33 --- Diese E-Mail enthält möglicherweise vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet. This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Find high-speed net deals comparison-shop your local providers here. https://broadband.msn.com - 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: img tag with action as src
I think I posted the code that works for my application that does this. Are you returning null with your action? At 03:47 PM 2/3/2004, you wrote: Were are attempting to do the same thing. (Have an action return an image) everything works great but we have the following error in the server log. StandardWrapperValve[action]: Servlet.service() for servlet action threw exception java.lang.IllegalStateException: getOutputStream() has already been called for this response at org.apache.catalina.connector.ResponseBase.getWriter(ResponseBase.java: 836) at org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.ja va:165) at javax.servlet.ServletResponseWrapper.getWriter(ServletResponseWrapper.ja va:146) at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:184) at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java: 176) at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java: 174) at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspF actoryImpl.java:204) at org.apache.jasper.runtime.JspFactoryImpl.access$000(JspFactoryImpl.java: 83) at org.apache.jasper.runtime.JspFactoryImpl$PrivilegedReleasePageContext.ru n(JspFactoryImpl.java:132) at java.security.AccessController.doPrivileged(Native Method) at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryIm pl.java:197) We are only calling that method one in our action. Nathan On Feb 3, 2004, at 11:41 AM, Ben Anderson wrote: if img src=/some/dir/myAction.dodoens't work for you, then adding an base tag isn't going to help you. You just need to add your application context in there. Check out: http://jakarta.apache.org/struts/userGuide/struts-html.html#img Also here's another archive site: http://marc.theaimsgroup.com -Ben From: Manfred Wolff [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: img tag with action as src Date: Tue, 03 Feb 2004 19:27:03 +0100 Greg use the html:base/ Tag. Then Struts appends the base uri like http://localhost:/MyApp/ to your relative path. Your image might be then img src=/some/dir/mypicture.jpg Manfred Greg Blomquist wrote: I apologize in advance if this question has already been answered somewhere. Looks like basebeans is down so I can't search the struts-user archives. I'm trying to do the following: img src=/some/dir/myAction.do The only problem is that it doesn't like the relative path. I have to code the absolute path: img src=http://localhost:/MyApp/some/dir/myAction.do; Which is fine until I move to production. Is there a way to use a relative path when using an action for the src attribute of an image tag? Thanks! Btw, I'm running WSAD 5.1 and the error message I get when trying a relative path is: Virtual Host/WebGroup Not Found : The web group /secure/isa/performance/graph.do has not been defined - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- === Dipl.-Inf. Manfred Wolff --- phone neusta : +49 421 20696-27 phone : +49 421 534522 mobil : +49 178 49 18 434 eFax : +49 1212 6 626 63 965 33 --- Diese E-Mail enthält möglicherweise vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet. This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Find high-speed net deals comparison-shop your local providers here. https://broadband.msn.com - 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
Re: img tag with action as src
Perfect! I remember seeing that but just did not register. My bad :) On Feb 3, 2004, at 5:28 PM, Michael McGrady wrote: I think I posted the code that works for my application that does this. Are you returning null with your action? At 03:47 PM 2/3/2004, you wrote: Were are attempting to do the same thing. (Have an action return an image) everything works great but we have the following error in the server log. StandardWrapperValve[action]: Servlet.service() for servlet action threw exception java.lang.IllegalStateException: getOutputStream() has already been called for this response at org.apache.catalina.connector.ResponseBase.getWriter(ResponseBase.java : 836) at org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade. ja va:165) at javax.servlet.ServletResponseWrapper.getWriter(ServletResponseWrapper. ja va:146) at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java: 184) at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java : 176) at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java : 174) at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(Js pF actoryImpl.java:204) at org.apache.jasper.runtime.JspFactoryImpl.access$000(JspFactoryImpl.jav a: 83) at org.apache.jasper.runtime.JspFactoryImpl$PrivilegedReleasePageContext. ru n(JspFactoryImpl.java:132) at java.security.AccessController.doPrivileged(Native Method) at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactory Im pl.java:197) We are only calling that method one in our action. Nathan On Feb 3, 2004, at 11:41 AM, Ben Anderson wrote: if img src=/some/dir/myAction.dodoens't work for you, then adding an base tag isn't going to help you. You just need to add your application context in there. Check out: http://jakarta.apache.org/struts/userGuide/struts-html.html#img Also here's another archive site: http://marc.theaimsgroup.com -Ben From: Manfred Wolff [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: img tag with action as src Date: Tue, 03 Feb 2004 19:27:03 +0100 Greg use the html:base/ Tag. Then Struts appends the base uri like http://localhost:/MyApp/ to your relative path. Your image might be then img src=/some/dir/mypicture.jpg Manfred Greg Blomquist wrote: I apologize in advance if this question has already been answered somewhere. Looks like basebeans is down so I can't search the struts-user archives. I'm trying to do the following: img src=/some/dir/myAction.do The only problem is that it doesn't like the relative path. I have to code the absolute path: img src=http://localhost:/MyApp/some/dir/myAction.do; Which is fine until I move to production. Is there a way to use a relative path when using an action for the src attribute of an image tag? Thanks! Btw, I'm running WSAD 5.1 and the error message I get when trying a relative path is: Virtual Host/WebGroup Not Found : The web group /secure/isa/performance/graph.do has not been defined --- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- === Dipl.-Inf. Manfred Wolff --- phone neusta : +49 421 20696-27 phone : +49 421 534522 mobil : +49 178 49 18 434 eFax : +49 1212 6 626 63 965 33 --- Diese E-Mail enthlt mglicherweise vertrauliche und/oder rechtlich geschtzte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtmlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet. This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Find high-speed net deals comparison-shop your local providers here. https://broadband.msn.com - 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: Favorite tag reference?
I find the struts docs for struts taglibs the best. The API docs at the link you give are all I've ever needed. 2nd to that is the JSTL spec for the JSTL taglibs i18n: or fmt:, c: etc. On 01/26/2004 12:56 AM P. Hill wrote: Hi, Just thought I'd ask if anyone has any favorite on-line or paper references for the various tag libraries. Reading the new JSP 2.0 spec is certainly the brute force and often instructive approach and each of the taglibs in struts contains a reference like: http://jakarta.apache.org/struts/userGuide/dev_bean.html Just wondering if others have found any useful on-line summaries/references just to look up summaries, explanations, and maybe short examples for the various libraries. What's your favorite? Are the Apache doc's as good as any? Better than some? Worse? TIA, -Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- struts 1.1 + tomcat 5.0.16 + java 1.4.2 Linux 2.4.20 Debian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Favorite tag reference?
Adam Hardy wrote: I find the struts docs for struts taglibs the best. [...] 2nd to that is the JSTL spec for the JSTL taglibs i18n: or fmt:, c: etc. I wrote: Reading the new JSP 2.0 spec [...] I assume now that the JSP 2.0 is out, you are flipping through that spec, if needed. Or is there a seperate JSTL doc that comes in handy here? -Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Favorite tag reference?
There is a seperate JSTL spec doc in pdf format from Sun somewhere I think. I guess the link is on the jakarta-commons website. On 01/26/2004 04:38 PM P. Hill wrote: Adam Hardy wrote: I find the struts docs for struts taglibs the best. [...] 2nd to that is the JSTL spec for the JSTL taglibs i18n: or fmt:, c: etc. I wrote: Reading the new JSP 2.0 spec [...] I assume now that the JSP 2.0 is out, you are flipping through that spec, if needed. Or is there a seperate JSTL doc that comes in handy here? -Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- struts 1.1 + tomcat 5.0.16 + java 1.4.2 Linux 2.4.20 Debian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Favorite tag reference?
Adam Hardy wrote: There is a seperate JSTL spec doc in pdf format from Sun somewhere I think. I guess the link is on the jakarta-commons website. Just to make this thread more complete, both the PDF and a very short java Doc summary version of just the STL can be found at: http://jcp.org/aboutJava/communityprocess/final/jsr052/ -Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Ling Tag client
Im not a JSP expert but I think you might be 'playing with fire' on that one. btw: Does it actually work or youve not tried it yet? -Original Message- From: Renato Romano [mailto:[EMAIL PROTECTED] Sent: Friday, 16 January 2004 19:37 To: 'Struts Users Mailing List' Subject: Ling Tag client I'm trying to define a Tag that does some work, and defines a link to some resource. To define this link I was trying to use the struts html:link tag in this way: LinkTag linkTag = new LinkTag(); linkTag.setPageContext(pageContext); linkTag.setHref(http://myhost/mypage;); linkTag.doStartTag(); try { pageContext.getOut().print(Go to myHost); } catch (IOException e) { e.printStackTrace(); return SKIP_PAGE; } linkTag.doEndTag(); return SKIP_BODY; Is this the correct way to utilize an external Tag definition ?? Thanks Renato Romano Sistemi e Telematica S.p.A. Calata Grazie - Vial Al Molo Giano 16127 - GENOVA e-mail: [EMAIL PROTECTED] Tel.: 010 2712603 _ - 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: Ling Tag client
The approach I use when I want to leverage another tags functionality is to nest the tag I want to use inside my own tag body. My own tag then processes the result of the other tag. e.g. mytags:sometag html:link/ /mytags:sometag I don't know if this will help in your situation or not. Paul -Original Message- From: Renato Romano [mailto:[EMAIL PROTECTED] Sent: 16 January 2004 11:37 To: 'Struts Users Mailing List' Subject: Ling Tag client I'm trying to define a Tag that does some work, and defines a link to some resource. To define this link I was trying to use the struts html:link tag in this way: LinkTag linkTag = new LinkTag(); linkTag.setPageContext(pageContext); linkTag.setHref(http://myhost/mypage;); linkTag.doStartTag(); try { pageContext.getOut().print(Go to myHost); } catch (IOException e) { e.printStackTrace(); return SKIP_PAGE; } linkTag.doEndTag(); return SKIP_BODY; Is this the correct way to utilize an external Tag definition ?? Thanks Renato Romano Sistemi e Telematica S.p.A. Calata Grazie - Vial Al Molo Giano 16127 - GENOVA e-mail: [EMAIL PROTECTED] Tel.: 010 2712603 _ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ** Axios Email Confidentiality Footer Privileged/Confidential Information may be contained in this message. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone. In such case, you should destroy this message, and notify us immediately. If you or your employer does not consent to Internet email messages of this kind, please advise us immediately. Opinions, conclusions and other information expressed in this message are not given or endorsed by my Company or employer unless otherwise indicated by an authorised representative independent of this message. WARNING: While Axios Systems Ltd takes steps to prevent computer viruses from being transmitted via electronic mail attachments we cannot guarantee that attachments do not contain computer virus code. You are therefore strongly advised to undertake anti virus checks prior to accessing the attachment to this electronic mail. Axios Systems Ltd grants no warranties regarding performance use or quality of any attachment and undertakes no liability for loss or damage howsoever caused. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Ling Tag client
I cannot use this approach, since my own tag must define a series of links based on the state of the object it is processing. I detail my needs also to get your help on my way of proceeding in such a situation: I have a page several pages in fact) showing a table of results (objects retrieved from the DB). A tipical handling of this is a logic:iterate tag that shows each object's properties inside a tr element. One of the column I need to show is an Available Actions column, which should show an icon with a link to the action. This set of actions depends generally on the state of the object; for example one object may be deletable while another would not. So I thought to handle this behavior (on the web tier) by constructing this tag that inspect the object state and generates an img and a link element allowing the user to select only appropriate actions. The code I inserted works fine, but as said by Andrew I feel like I'm playing with fire... So I would have a confirmation that this way of proceeding is quite correct!! Thanks Renato Romano Sistemi e Telematica S.p.A. Calata Grazie - Vial Al Molo Giano 16127 - GENOVA e-mail: [EMAIL PROTECTED] Tel.: 010 2712603 _ -Original Message- From: Paul McCulloch [mailto:[EMAIL PROTECTED] Sent: venerdì 16 gennaio 2004 13.06 To: 'Struts Users Mailing List' Subject: RE: Ling Tag client The approach I use when I want to leverage another tags functionality is to nest the tag I want to use inside my own tag body. My own tag then processes the result of the other tag. e.g. mytags:sometag html:link/ /mytags:sometag I don't know if this will help in your situation or not. Paul -Original Message- From: Renato Romano [mailto:[EMAIL PROTECTED] Sent: 16 January 2004 11:37 To: 'Struts Users Mailing List' Subject: Ling Tag client I'm trying to define a Tag that does some work, and defines a link to some resource. To define this link I was trying to use the struts html:link tag in this way: LinkTag linkTag = new LinkTag(); linkTag.setPageContext(pageContext); linkTag.setHref(http://myhost/mypage;); linkTag.doStartTag(); try { pageContext.getOut().print(Go to myHost); } catch (IOException e) { e.printStackTrace(); return SKIP_PAGE; } linkTag.doEndTag(); return SKIP_BODY; Is this the correct way to utilize an external Tag definition ?? Thanks Renato Romano Sistemi e Telematica S.p.A. Calata Grazie - Vial Al Molo Giano 16127 - GENOVA e-mail: [EMAIL PROTECTED] Tel.: 010 2712603 _ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ** Axios Email Confidentiality Footer Privileged/Confidential Information may be contained in this message. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone. In such case, you should destroy this message, and notify us immediately. If you or your employer does not consent to Internet email messages of this kind, please advise us immediately. Opinions, conclusions and other information expressed in this message are not given or endorsed by my Company or employer unless otherwise indicated by an authorised representative independent of this message. WARNING: While Axios Systems Ltd takes steps to prevent computer viruses from being transmitted via electronic mail attachments we cannot guarantee that attachments do not contain computer virus code. You are therefore strongly advised to undertake anti virus checks prior to accessing the attachment to this electronic mail. Axios Systems Ltd grants no warranties regarding performance use or quality of any attachment and undertakes no liability for loss or damage howsoever caused. - 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: Bean Tag question
you can't have a tag as an attribute for another tag. How bout this? bean-el:message key=parametric.key arg0=${myBean.myParam} / From: Henrique VIECILI [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Bean Tag question Date: Wed, 14 Jan 2004 16:14:49 -0300 Hi, I am trying to access a bean property inside the arg0 attribute of bean:message tag, is that possible using only the standard taglibs? How? I´ve tried this code bellow and it didn´t work: bean:message key=parametric.key arg0=bean:write name=myBean property=myParam / / Henrique - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ There are now three new levels of MSN Hotmail Extra Storage! Learn more. http://join.msn.com/?pgmarket=en-uspage=hotmail/es2ST=1 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Bean Tag question
Ok, i will try it! but, where can i download the struts-el.tld files?? i have not found them in the struts web site! Thanx Henrique - Original Message - From: Ben Anderson [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 14, 2004 3:25 PM Subject: RE: Bean Tag question you can't have a tag as an attribute for another tag. How bout this? bean-el:message key=parametric.key arg0=${myBean.myParam} / From: Henrique VIECILI [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Bean Tag question Date: Wed, 14 Jan 2004 16:14:49 -0300 Hi, I am trying to access a bean property inside the arg0 attribute of bean:message tag, is that possible using only the standard taglibs? How? I´ve tried this code bellow and it didn´t work: bean:message key=parametric.key arg0=bean:write name=myBean property=myParam / / Henrique - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ There are now three new levels of MSN Hotmail Extra Storage! Learn more. http://join.msn.com/?pgmarket=en-uspage=hotmail/es2ST=1 - 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: Bean Tag question
they're in the struts-el.jar which you can find in the /contrib/struts-el directoy of a struts binary distro. Just throw that jar into /WEB-INF/lib and put these tag directives in your jsp's and you should be all set: %@ taglib prefix=bean-el uri=http://jakarta.apache.org/struts/tags-bean-el; % %@ taglib prefix=html-el uri=http://jakarta.apache.org/struts/tags-html-el; % %@ taglib prefix=logic-el uri=http://jakarta.apache.org/struts/tags-logic-el; % -Ben From: Henrique VIECILI [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: Bean Tag question Date: Wed, 14 Jan 2004 17:32:55 -0300 Ok, i will try it! but, where can i download the struts-el.tld files?? i have not found them in the struts web site! Thanx Henrique - Original Message - From: Ben Anderson [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 14, 2004 3:25 PM Subject: RE: Bean Tag question you can't have a tag as an attribute for another tag. How bout this? bean-el:message key=parametric.key arg0=${myBean.myParam} / From: Henrique VIECILI [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Bean Tag question Date: Wed, 14 Jan 2004 16:14:49 -0300 Hi, I am trying to access a bean property inside the arg0 attribute of bean:message tag, is that possible using only the standard taglibs? How? I´ve tried this code bellow and it didn´t work: bean:message key=parametric.key arg0=bean:write name=myBean property=myParam / / Henrique - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ There are now three new levels of MSN Hotmail Extra Storage! Learn more. http://join.msn.com/?pgmarket=en-uspage=hotmail/es2ST=1 - 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] _ Find out everything you need to know about Las Vegas here for that getaway. http://special.msn.com/msnbc/vivalasvegas.armx - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts Tag Lib and Performance
Raj, Which taglibs do you not want to use? If you don't use the Struts html taglibs, you will lose a lot of the functionality that they provide, namely prepopulation of form input values. A lot of the other tags also provide functionality that lets you avoid having to use scriptlets. Some functionality is overlapped by the JSTL tags and in those cases, it is preferable to use JSTL instead of the struts equivalents. Overall, you probably won't lose much in performance, if you don't use the Struts tags, but you'll have to do a lot more work yourself and this may come at the expense of maintainability and readability of your JSP pages. Regards, Richard At 09:56 AM 1/11/2004, you wrote: Hi All, I am trying to do a performance/feasibility check of the Struts Framework. I came across this taglib and wanted to ask will there be any performance issue's if the Struts Taglib are not used and we use the rest of the features provided by Struts ? Thanks in advance -raj - 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: Struts Tag Lib and Performance
Thanks for your reply Richard. At this moment, I don't know how many different types of TagLibs Struts has to offer. But from what you have mentioned, they can really be of great help to JSP Developers and can reduce complexity. Can you tell me little more how using the Struts tags can avoid using scriptlets? Is JSTL part of Strtus tablibs? Thanks, -raj -Original Message- From: Richard Yee [mailto:[EMAIL PROTECTED] Sent: Sunday, January 11, 2004 12:30 PM To: Struts Users Mailing List Subject: Re: Struts Tag Lib and Performance Raj, Which taglibs do you not want to use? If you don't use the Struts html taglibs, you will lose a lot of the functionality that they provide, namely prepopulation of form input values. A lot of the other tags also provide functionality that lets you avoid having to use scriptlets. Some functionality is overlapped by the JSTL tags and in those cases, it is preferable to use JSTL instead of the struts equivalents. Overall, you probably won't lose much in performance, if you don't use the Struts tags, but you'll have to do a lot more work yourself and this may come at the expense of maintainability and readability of your JSP pages. Regards, Richard At 09:56 AM 1/11/2004, you wrote: Hi All, I am trying to do a performance/feasibility check of the Struts Framework. I came across this taglib and wanted to ask will there be any performance issue's if the Struts Taglib are not used and we use the rest of the features provided by Struts ? Thanks in advance -raj - 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: Struts Tag Lib and Performance
Struts provides a lot of tag libraries in different areas which help reduce having scriplets in the JSP's. a.. Bean Tags a.. HTML Tags a.. Logic Tags a.. Nested Tags a.. Tiles Tags a.. Utilities a.. Validator Check out the developer's guide on how to use the tags @ http://jakarta.apache.org/struts/userGuide/index.html. There are certain overlaps between JSTL and Struts tags. JSTL is not a part of Struts framework. Though a reference implementation of the same is available by Jakarta (JCP Standardized Tag Libraries). You may want to check that too. Cheers Sachin - Original Message - From: Raj Yadav [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Monday, January 12, 2004 6:18 AM Subject: RE: Struts Tag Lib and Performance Thanks for your reply Richard. At this moment, I don't know how many different types of TagLibs Struts has to offer. But from what you have mentioned, they can really be of great help to JSP Developers and can reduce complexity. Can you tell me little more how using the Struts tags can avoid using scriptlets? Is JSTL part of Strtus tablibs? Thanks, -raj -Original Message- From: Richard Yee [mailto:[EMAIL PROTECTED] Sent: Sunday, January 11, 2004 12:30 PM To: Struts Users Mailing List Subject: Re: Struts Tag Lib and Performance Raj, Which taglibs do you not want to use? If you don't use the Struts html taglibs, you will lose a lot of the functionality that they provide, namely prepopulation of form input values. A lot of the other tags also provide functionality that lets you avoid having to use scriptlets. Some functionality is overlapped by the JSTL tags and in those cases, it is preferable to use JSTL instead of the struts equivalents. Overall, you probably won't lose much in performance, if you don't use the Struts tags, but you'll have to do a lot more work yourself and this may come at the expense of maintainability and readability of your JSP pages. Regards, Richard At 09:56 AM 1/11/2004, you wrote: Hi All, I am trying to do a performance/feasibility check of the Struts Framework. I came across this taglib and wanted to ask will there be any performance issue's if the Struts Taglib are not used and we use the rest of the features provided by Struts ? Thanks in advance -raj - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts Tag Lib and Performance
oh... some new validator-tags... :-))) -Original Message- From: Sachin Pandey [mailto:[EMAIL PROTECTED] Sent: Monday, January 12, 2004 11:17 PM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: Re: Struts Tag Lib and Performance Struts provides a lot of tag libraries in different areas which help reduce having scriplets in the JSP's. a.. Bean Tags a.. HTML Tags a.. Logic Tags a.. Nested Tags a.. Tiles Tags a.. Utilities a.. Validator Check out the developer's guide on how to use the tags @ http://jakarta.apache.org/struts/userGuide/index.html. There are certain overlaps between JSTL and Struts tags. JSTL is not a part of Struts framework. Though a reference implementation of the same is available by Jakarta (JCP Standardized Tag Libraries). You may want to check that too. Cheers Sachin - Original Message - From: Raj Yadav [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Monday, January 12, 2004 6:18 AM Subject: RE: Struts Tag Lib and Performance Thanks for your reply Richard. At this moment, I don't know how many different types of TagLibs Struts has to offer. But from what you have mentioned, they can really be of great help to JSP Developers and can reduce complexity. Can you tell me little more how using the Struts tags can avoid using scriptlets? Is JSTL part of Strtus tablibs? Thanks, -raj -Original Message- From: Richard Yee [mailto:[EMAIL PROTECTED] Sent: Sunday, January 11, 2004 12:30 PM To: Struts Users Mailing List Subject: Re: Struts Tag Lib and Performance Raj, Which taglibs do you not want to use? If you don't use the Struts html taglibs, you will lose a lot of the functionality that they provide, namely prepopulation of form input values. A lot of the other tags also provide functionality that lets you avoid having to use scriptlets. Some functionality is overlapped by the JSTL tags and in those cases, it is preferable to use JSTL instead of the struts equivalents. Overall, you probably won't lose much in performance, if you don't use the Struts tags, but you'll have to do a lot more work yourself and this may come at the expense of maintainability and readability of your JSP pages. Regards, Richard At 09:56 AM 1/11/2004, you wrote: Hi All, I am trying to do a performance/feasibility check of the Struts Framework. I came across this taglib and wanted to ask will there be any performance issue's if the Struts Taglib are not used and we use the rest of the features provided by Struts ? Thanks in advance -raj - 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] - 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: Struts Tag Lib and Performance
The JSTL is not part of Struts, but it can easily be used along with it. There is also a variation of the Struts tag libraries that evaluates attribute values using the same expression evaluation engine that the JSTL uses (the Apache implementation, at least). This is called Struts-EL, and it's available in the contrib directory of the Struts distribution. -Original Message- From: Raj Yadav [mailto:[EMAIL PROTECTED] Sent: Sunday, January 11, 2004 11:18 AM To: 'Struts Users Mailing List' Subject: RE: Struts Tag Lib and Performance Thanks for your reply Richard. At this moment, I don't know how many different types of TagLibs Struts has to offer. But from what you have mentioned, they can really be of great help to JSP Developers and can reduce complexity. Can you tell me little more how using the Struts tags can avoid using scriptlets? Is JSTL part of Strtus tablibs? Thanks, -raj -Original Message- From: Richard Yee [mailto:[EMAIL PROTECTED] Sent: Sunday, January 11, 2004 12:30 PM To: Struts Users Mailing List Subject: Re: Struts Tag Lib and Performance Raj, Which taglibs do you not want to use? If you don't use the Struts html taglibs, you will lose a lot of the functionality that they provide, namely prepopulation of form input values. A lot of the other tags also provide functionality that lets you avoid having to use scriptlets. Some functionality is overlapped by the JSTL tags and in those cases, it is preferable to use JSTL instead of the struts equivalents. Overall, you probably won't lose much in performance, if you don't use the Struts tags, but you'll have to do a lot more work yourself and this may come at the expense of maintainability and readability of your JSP pages. Regards, Richard At 09:56 AM 1/11/2004, you wrote: Hi All, I am trying to do a performance/feasibility check of the Struts Framework. I came across this taglib and wanted to ask will there be any performance issue's if the Struts Taglib are not used and we use the rest of the features provided by Struts ? Thanks in advance -raj - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: format tag in bean:write - was :RE: Handling Missing Message Key
Use the formatKey attribute if you want to pull it from message resources. Have a look at java.text.DecimalFormat for an explanation of formatting patterns for decimal numbers. Quoting Brian Styles [EMAIL PROTECTED]: Ah, ha! I am an idiot. I think this has to do with the format tag in bean:write. Could someone tell me how to set this up? I think you can put the formats into the application properties file, correct? Does someone have an example of what to put in? thanks, Brian From: Brian Styles [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: RE: Handling Missing Message Key Date: Thu, 08 Jan 2004 13:11:38 + Thank you very much to Daniel and Kris for their help on this. Definately, extending the PropertyMessageResources and PropertyMessageResources factory is the way to go. Unfortunately, I've changed this and come up against a really nasty error that I didn't have before! If anyone can help me I'd be eternally grateful! it seems that once I use my own ProperyMessageResources it affects the way the bean:write tag works! I have some fields that are stored in the database as Integers and when I write them out with bean:write the string int gets prepended to them This didn't happen before. Disaster! anyone got any clue how to stop this thanks very much again, Brian From: Daniel Lipofsky [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: RE: Handling Missing Message Key Date: Wed, 7 Jan 2004 17:43:57 -0800 I would suggest you extend PropertyMessageResources. Overide constructor so that returnNull=true always. Override getMessage to call super.getMessage(), check for null, if null return key. Very simple. You probably have to extend the factory too. - Dan -Original Message- From: Brian Styles [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 07, 2004 1:18 PM To: [EMAIL PROTECTED] Subject: Re: Handling Missing Message Key Thanks for the reply Kris, I think that setting the null property to true is probably the way to go. I even found an exactly similar thread as what I want to do from this June. Unfortunately there seems to be no definate answer. http://www.mail-archive.com/[EMAIL PROTECTED]/msg 69627.html Anyone have any idea how to get rid of the ???s From: Kris Schneider [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: Handling Missing Message Key Date: Wed, 7 Jan 2004 15:16:11 -0500 Pretty sure you'd have to handle that yourself. It's probably cleaner to do it in an action. Action class: String dbProp = ...; MessageResources messages = getResources(request); String message = dpProp; if (messages.isPresent(dbProp)) { message = messages.getMessage(dbProp); } request.setAttribute(message, message); JSP: bean:write name=message/ Or I suppose you could write your own tag... Quoting Brian Styles [EMAIL PROTECTED]: Hi all, I'm using the i8ln features in the struts bean tag library I populate a form bean with info from the database, and this info acts as the key in a resource bundle so that I can add a international versions using bean:message name=form property=database_property/ however, I would very much like the actual underlying property to be written out if the key doesn't exist in the resource bundle, rather than getting the nasty missing message key exception. Is this possible? thanks very much, Brian -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.com/ -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: format tag in bean:write - was :RE: Handling Missing Message Key
Thanks Kris, you've been a great help. Is there any example of default formats for all the types I might need that I can just copy into the resource bundle? From: Kris Schneider [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: format tag in bean:write - was :RE: Handling Missing Message Key Date: Thu, 8 Jan 2004 08:35:14 -0500 Use the formatKey attribute if you want to pull it from message resources. Have a look at java.text.DecimalFormat for an explanation of formatting patterns for decimal numbers. Quoting Brian Styles [EMAIL PROTECTED]: Ah, ha! I am an idiot. I think this has to do with the format tag in bean:write. Could someone tell me how to set this up? I think you can put the formats into the application properties file, correct? Does someone have an example of what to put in? thanks, Brian From: Brian Styles [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: RE: Handling Missing Message Key Date: Thu, 08 Jan 2004 13:11:38 + Thank you very much to Daniel and Kris for their help on this. Definately, extending the PropertyMessageResources and PropertyMessageResources factory is the way to go. Unfortunately, I've changed this and come up against a really nasty error that I didn't have before! If anyone can help me I'd be eternally grateful! it seems that once I use my own ProperyMessageResources it affects the way the bean:write tag works! I have some fields that are stored in the database as Integers and when I write them out with bean:write the string int gets prepended to them This didn't happen before. Disaster! anyone got any clue how to stop this thanks very much again, Brian From: Daniel Lipofsky [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: RE: Handling Missing Message Key Date: Wed, 7 Jan 2004 17:43:57 -0800 I would suggest you extend PropertyMessageResources. Overide constructor so that returnNull=true always. Override getMessage to call super.getMessage(), check for null, if null return key. Very simple. You probably have to extend the factory too. - Dan -Original Message- From: Brian Styles [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 07, 2004 1:18 PM To: [EMAIL PROTECTED] Subject: Re: Handling Missing Message Key Thanks for the reply Kris, I think that setting the null property to true is probably the way to go. I even found an exactly similar thread as what I want to do from this June. Unfortunately there seems to be no definate answer. http://www.mail-archive.com/[EMAIL PROTECTED]/msg 69627.html Anyone have any idea how to get rid of the ???s From: Kris Schneider [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: Handling Missing Message Key Date: Wed, 7 Jan 2004 15:16:11 -0500 Pretty sure you'd have to handle that yourself. It's probably cleaner to do it in an action. Action class: String dbProp = ...; MessageResources messages = getResources(request); String message = dpProp; if (messages.isPresent(dbProp)) { message = messages.getMessage(dbProp); } request.setAttribute(message, message); JSP: bean:write name=message/ Or I suppose you could write your own tag... Quoting Brian Styles [EMAIL PROTECTED]: Hi all, I'm using the i8ln features in the struts bean tag library I populate a form bean with info from the database, and this info acts as the key in a resource bundle so that I can add a international versions using bean:message name=form property=database_property/ however, I would very much like the actual underlying property to be written out if the key doesn't exist in the resource bundle, rather than getting the nasty missing message key exception. Is this possible? thanks very much, Brian -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.com/ -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: format tag in bean:write - was :RE: Handling Missing Message Key
Not that I'm aware of. However, you can play around with the various factory methods of NumberFormat and DateFormat to get what you want: DecimalFormat decFormat = (DecimalFormat)NumberFormat.getInstance(); System.out.println(decFormat.toPattern()); SimpleDateFormat dateFormat = (SimpleDateFormat)DateFormat.getInstance(); System.out.println(dateFormat.toPattern()); Which, for my system, produces: #,##0.### M/d/yy h:mm a Quoting Brian Styles [EMAIL PROTECTED]: Thanks Kris, you've been a great help. Is there any example of default formats for all the types I might need that I can just copy into the resource bundle? From: Kris Schneider [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: format tag in bean:write - was :RE: Handling Missing Message Key Date: Thu, 8 Jan 2004 08:35:14 -0500 Use the formatKey attribute if you want to pull it from message resources. Have a look at java.text.DecimalFormat for an explanation of formatting patterns for decimal numbers. Quoting Brian Styles [EMAIL PROTECTED]: Ah, ha! I am an idiot. I think this has to do with the format tag in bean:write. Could someone tell me how to set this up? I think you can put the formats into the application properties file, correct? Does someone have an example of what to put in? thanks, Brian From: Brian Styles [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: RE: Handling Missing Message Key Date: Thu, 08 Jan 2004 13:11:38 + Thank you very much to Daniel and Kris for their help on this. Definately, extending the PropertyMessageResources and PropertyMessageResources factory is the way to go. Unfortunately, I've changed this and come up against a really nasty error that I didn't have before! If anyone can help me I'd be eternally grateful! it seems that once I use my own ProperyMessageResources it affects the way the bean:write tag works! I have some fields that are stored in the database as Integers and when I write them out with bean:write the string int gets prepended to them This didn't happen before. Disaster! anyone got any clue how to stop this thanks very much again, Brian From: Daniel Lipofsky [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: RE: Handling Missing Message Key Date: Wed, 7 Jan 2004 17:43:57 -0800 I would suggest you extend PropertyMessageResources. Overide constructor so that returnNull=true always. Override getMessage to call super.getMessage(), check for null, if null return key. Very simple. You probably have to extend the factory too. - Dan -Original Message- From: Brian Styles [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 07, 2004 1:18 PM To: [EMAIL PROTECTED] Subject: Re: Handling Missing Message Key Thanks for the reply Kris, I think that setting the null property to true is probably the way to go. I even found an exactly similar thread as what I want to do from this June. Unfortunately there seems to be no definate answer. http://www.mail-archive.com/[EMAIL PROTECTED]/msg 69627.html Anyone have any idea how to get rid of the ???s From: Kris Schneider [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: Handling Missing Message Key Date: Wed, 7 Jan 2004 15:16:11 -0500 Pretty sure you'd have to handle that yourself. It's probably cleaner to do it in an action. Action class: String dbProp = ...; MessageResources messages = getResources(request); String message = dpProp; if (messages.isPresent(dbProp)) { message = messages.getMessage(dbProp); } request.setAttribute(message, message); JSP: bean:write name=message/ Or I suppose you could write your own tag... Quoting Brian Styles [EMAIL PROTECTED]: Hi all, I'm using the i8ln features in the struts bean tag library I populate a form bean with info from the database, and this info acts as the key in a resource bundle so that I can add a international versions using bean:message name=form property=database_property/ however, I would very much like the actual underlying property to be written out if the key doesn't exist in the resource bundle, rather than getting the nasty missing message key exception. Is this possible
Re: format tag in bean:write - was :RE: Handling Missing Message Key
thanks again for all your help on this Kris! Invaluable! From: Kris Schneider [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: format tag in bean:write - was :RE: Handling Missing Message Key Date: Thu, 8 Jan 2004 09:09:56 -0500 Not that I'm aware of. However, you can play around with the various factory methods of NumberFormat and DateFormat to get what you want: DecimalFormat decFormat = (DecimalFormat)NumberFormat.getInstance(); System.out.println(decFormat.toPattern()); SimpleDateFormat dateFormat = (SimpleDateFormat)DateFormat.getInstance(); System.out.println(dateFormat.toPattern()); Which, for my system, produces: #,##0.### M/d/yy h:mm a Quoting Brian Styles [EMAIL PROTECTED]: Thanks Kris, you've been a great help. Is there any example of default formats for all the types I might need that I can just copy into the resource bundle? From: Kris Schneider [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: format tag in bean:write - was :RE: Handling Missing Message Key Date: Thu, 8 Jan 2004 08:35:14 -0500 Use the formatKey attribute if you want to pull it from message resources. Have a look at java.text.DecimalFormat for an explanation of formatting patterns for decimal numbers. Quoting Brian Styles [EMAIL PROTECTED]: Ah, ha! I am an idiot. I think this has to do with the format tag in bean:write. Could someone tell me how to set this up? I think you can put the formats into the application properties file, correct? Does someone have an example of what to put in? thanks, Brian From: Brian Styles [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: RE: Handling Missing Message Key Date: Thu, 08 Jan 2004 13:11:38 + Thank you very much to Daniel and Kris for their help on this. Definately, extending the PropertyMessageResources and PropertyMessageResources factory is the way to go. Unfortunately, I've changed this and come up against a really nasty error that I didn't have before! If anyone can help me I'd be eternally grateful! it seems that once I use my own ProperyMessageResources it affects the way the bean:write tag works! I have some fields that are stored in the database as Integers and when I write them out with bean:write the string int gets prepended to them This didn't happen before. Disaster! anyone got any clue how to stop this thanks very much again, Brian From: Daniel Lipofsky [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: RE: Handling Missing Message Key Date: Wed, 7 Jan 2004 17:43:57 -0800 I would suggest you extend PropertyMessageResources. Overide constructor so that returnNull=true always. Override getMessage to call super.getMessage(), check for null, if null return key. Very simple. You probably have to extend the factory too. - Dan -Original Message- From: Brian Styles [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 07, 2004 1:18 PM To: [EMAIL PROTECTED] Subject: Re: Handling Missing Message Key Thanks for the reply Kris, I think that setting the null property to true is probably the way to go. I even found an exactly similar thread as what I want to do from this June. Unfortunately there seems to be no definate answer. http://www.mail-archive.com/[EMAIL PROTECTED]/msg 69627.html Anyone have any idea how to get rid of the ???s From: Kris Schneider [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: Handling Missing Message Key Date: Wed, 7 Jan 2004 15:16:11 -0500 Pretty sure you'd have to handle that yourself. It's probably cleaner to do it in an action. Action class: String dbProp = ...; MessageResources messages = getResources(request); String message = dpProp; if (messages.isPresent(dbProp)) { message = messages.getMessage(dbProp); } request.setAttribute(message, message); JSP: bean:write name=message/ Or I suppose you could write your own tag... Quoting Brian Styles [EMAIL PROTECTED]: Hi all, I'm using the i8ln features in the struts bean tag library I populate a form bean with info from the database, and this info acts as the key in a resource bundle so that I can add a international versions using bean:message name=form
Re: Link Tag
if the link you are looking for is ... http://10.48.142.7:8988/dcsi/logoff.do try dropping off the dcsi prefix in the path=dcsi/logoff.do - Original Message - From: Duggal, Sanjay [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, January 05, 2004 8:49 AM Subject: Link Tag Hi, I am using a custom link tag that extenjds the struts LinkTag. I am using the custom tag in my jsp in the following way: dtag:dlink href=dcsi/logoff.do showAlways=trueLogout/dtag:dlink I have the following entry in my struts-config.xml file: action path=dcsi/logoff.do type=com.dcsi.LogoffAction roles=role1 forward name=logout path=/login.jsp/ /action However, the link that gets formed is: http://10.48.142.7:8988/dcsi/dcsi/logoff.do which is an invalid link. Can you please point out what I'm doing incorrectly here? What is the entry required in the struts-config.xml file? Thanks, Sanjay This message contains information that may be privileged or confidential and is the property of the Cap Gemini Ernst Young Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorised to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. - 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: Link Tag
Struts automatically append the 'CONTEXT' for you in preparing the link url. So use it with care. I had this problem before. For example, when the tile (I'm not sure if you're using tile, but it's my case) belongs to the root context (), and you want to link to a page in another context, say 'dcsi', then you need the '/dcsi/logoff.do', But in the body tile, I suppose it's already in the dcsi context, you only need to link to '/logoff.do'. Patrick -Original Message- From: Mike Deegan [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 06, 2004 8:13 AM To: Struts Users Mailing List Subject: Re: Link Tag if the link you are looking for is ... http://10.48.142.7:8988/dcsi/logoff.do try dropping off the dcsi prefix in the path=dcsi/logoff.do - Original Message - From: Duggal, Sanjay [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, January 05, 2004 8:49 AM Subject: Link Tag Hi, I am using a custom link tag that extenjds the struts LinkTag. I am using the custom tag in my jsp in the following way: dtag:dlink href=dcsi/logoff.do showAlways=trueLogout/dtag:dlink I have the following entry in my struts-config.xml file: action path=dcsi/logoff.do type=com.dcsi.LogoffAction roles=role1 forward name=logout path=/login.jsp/ /action However, the link that gets formed is: http://10.48.142.7:8988/dcsi/dcsi/logoff.do which is an invalid link. Can you please point out what I'm doing incorrectly here? What is the entry required in the struts-config.xml file? Thanks, Sanjay This message contains information that may be privileged or confidential and is the property of the Cap Gemini Ernst Young Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorised to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. - 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: EL tag libraries and MessageResources
That problem was discussed in the nbuser group a couple of weeks ago, in conjunction with code completion. Try to put jstl.jar struts-el.jar struts.jar servlet.jar into NetBeanXX/lib/ext and standard.jarinto NetBeansXX/lib Maybe you can put everything under /lib or .../lib/ext. Wolfgang Jani Heinonen wrote: Hi, I searched the mailing list archives and the bugzilla database, but couldn't find an answer, so please excuse me if this is a FAQ. I am unable to compile any JSP that uses any of the html-el tags under the embedded Tomcat in Netbeans 3.5.1. The stacktrace follows: bean-cookie.jsp [-1:-1] java.lang.ExceptionInInitializerError at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at org.apache.strutsel.taglib.html.ELHtmlTagBeanInfo.class$(ELHtmlTagBeanInfo.j ava:88) at org.apache.strutsel.taglib.html.ELHtmlTagBeanInfo.getPropertyDescriptors(ELH tmlTagBeanInfo.java:88) at java.beans.Introspector.getTargetPropertyInfo(Introspector.java:459) at java.beans.Introspector.getBeanInfo(Introspector.java:372) at java.beans.Introspector.getBeanInfo(Introspector.java:144) at org.apache.jasper.compiler.TagCache.setTagHandlerClass(TagCache.java:116) at org.apache.jasper.compiler.TagBeginGenerator.init(TagBeginGenerator.java:146 ) at org.netbeans.modules.web.jspparser.AnalyzerParseEventListener.addGenerator(A nalyzerParseEventListener.java:154) at org.netbeans.modules.web.jspparser.AnalyzerParseEventListener.handleTagBegin (AnalyzerParseEventListener.java:962) at org.apache.jasper.compiler.DelegatingListener.handleTagBegin(DelegatingListe ner.java:221) at org.apache.jasper.compiler.DelegatingListener.handleTagBegin(DelegatingListe ner.java:216) at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java:878) at org.apache.jasper.compiler.Parser.parse(Parser.java:1145) at org.apache.jasper.compiler.Parser.parse(Parser.java:1103) at org.apache.jasper.compiler.Parser.parse(Parser.java:1099) at org.apache.jasper.compiler.ParserController.parse(ParserController.java:214) at org.netbeans.modules.web.jspparser.JspParserImpl.callTomcatParser(JspParserI mpl.java:126) at org.netbeans.modules.web.jspparser.JspParserImpl.analyzePage(JspParserImpl.j ava:93) at org.netbeans.modules.web.core.jsploader.JspDataObject.createCompiler(JspData Object.java:297) at org.netbeans.modules.web.core.jsploader.JspCompilerSupport.addToJob(JspCompi lerSupport.java:62) at org.openide.actions.AbstractCompileAction.prepareJobFor(AbstractCompileActio n.java:361) at org.openide.actions.AbstractCompileAction.prepareJobFor(AbstractCompileActio n.java:329) at org.openide.actions.AbstractCompileAction.compileNodes2(AbstractCompileActio n.java:132) at org.openide.actions.AbstractCompileAction.performAction(AbstractCompileActio n.java:45) at org.openide.util.actions.NodeAction$DelegateAction.actionPerformed(NodeActio n.java:431) at org.netbeans.core.ModuleActions$1.run(ModuleActions.java:97) at org.openide.util.Task.run(Task.java:136) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:328) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:670) Caused by: java.lang.NullPointerException at org.apache.struts.util.MessageResources.getMessageResources(MessageResources .java:577) at org.apache.struts.taglib.html.HtmlTag.clinit(HtmlTag.java:96) ... 31 more Errors compiling bean-cookie. What could be wrong? I get this with my own application, as well as the strutsel-exercise-taglib webapp where this example is from. We're also having the same problem deploying the application under WLS 7.0 and 8.1. ### This message has been scanned by F-Secure Anti-Virus for Microsoft Exchange. For more information, connect to http://www.F-Secure.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:select tag or logic:iterate
try this, html:select property=defaultContainerType html:options collection=CONTAINER_TYPES property=id labelProperty=name/ /html:select F. - Original Message - From: Marco Mistroni [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Monday, December 15, 2003 3:00 PM Subject: html:select tag or logic:iterate Hi all, I am quite new to struts tag library and I need an advice. In the HttpSession I have an object of type Collection, which stores a list of MyObject. MyOBject has two properties, description and id. Out of this Collection of MyObject I must generate a selectable list Which displays MyObject names, (wity MyObject.id as value) I have tried to embed the html:select inside a logic:iterate, but my editor (websphere studio)complaints for following code html:select property=defaultContainerType multiple=no logic:iterate collection=%= (Collection)session.getAttribute(CONTAINER_TYPES)% id=container html:option value=bean:write name=container property=type/ bean:write name=container property=description/ /html:option /logic:iterate /html:select the error is 'Attribute container has no value' anyone has a suggestion on how to solve my problem? Fact is that the Collection is stored in the session, not in a JavaBean.. Thanks and regards marco - 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: logic tag using locale
Thanks Ted, Doesn't this mean creating another bean/object though? For instance, right now I have two fields in the object that have this sort of requirement (ie. there are about 12 fields that don't have a language requirement). I was thinking it would be more efficient to just let the tile/jsp do the presentation work. You could be right though... maybe a simple presentation bean that just handles internationalised fields. cheers, Fred -Original Message- From: Ted Husted [mailto:[EMAIL PROTECTED] Sent: 10 December 2003 20:04 To: Struts Users Mailing List Subject: Re: logic tag using locale I'd suggest resolving this type of language choice in the Action. For example, there could be one product bean that is populated with whatever language is preferred by the client. The page could then just write whatever has been placed into the bean. HTH, Ted. _ This email (including any attachments to it) is confidential, legally privileged, subject to copyright and is sent for the personal attention of the intended recipient only. If you have received this email in error, please advise us immediately and delete it. You are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. Although we have taken reasonable precautions to ensure no viruses are present in this email, we cannot accept responsibility for any loss or damage arising from the viruses in this email or attachments. We exclude any liability for the content of this email, or for the consequences of any actions taken on the basis of the information provided in this email or its attachments, unless that information is subsequently confirmed in writing. If this email contains an offer, that should be considered as an invitation to treat. _ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: logic tag using locale
I agree entirely. A pointer bean to the right data in the request. I'm so there. Thanks Ted. YTH -Joe -Original Message- From: Tsang, F (Fred) [mailto:[EMAIL PROTECTED] Sent: Thursday, December 11, 2003 5:06 AM To: Struts Users Mailing List Subject: RE: logic tag using locale Thanks Ted, Doesn't this mean creating another bean/object though? For instance, right now I have two fields in the object that have this sort of requirement (ie. there are about 12 fields that don't have a language requirement). I was thinking it would be more efficient to just let the tile/jsp do the presentation work. You could be right though... maybe a simple presentation bean that just handles internationalised fields. cheers, Fred -Original Message- From: Ted Husted [mailto:[EMAIL PROTECTED] Sent: 10 December 2003 20:04 To: Struts Users Mailing List Subject: Re: logic tag using locale I'd suggest resolving this type of language choice in the Action. For example, there could be one product bean that is populated with whatever language is preferred by the client. The page could then just write whatever has been placed into the bean. HTH, Ted. _ This email (including any attachments to it) is confidential, legally privileged, subject to copyright and is sent for the personal attention of the intended recipient only. If you have received this email in error, please advise us immediately and delete it. You are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. Although we have taken reasonable precautions to ensure no viruses are present in this email, we cannot accept responsibility for any loss or damage arising from the viruses in this email or attachments. We exclude any liability for the content of this email, or for the consequences of any actions taken on the basis of the information provided in this email or its attachments, unless that information is subsequently confirmed in writing. If this email contains an offer, that should be considered as an invitation to treat. _ - 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: logic tag using locale
I've got a similar problem. You could write a scriptlet function that appended the correct languageCode onto your default property name and use the result of that string in the bean:write tag. Please let me know if you find a more elegant way around this. -Original Message- From: Tsang, F (Fred) [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 10, 2003 10:01 AM To: [EMAIL PROTECTED] Subject: logic tag using locale All, I'm trying to do a bean:write based on the user's current language. Before you ask, this isn't just internationalization using the properties files. I'm displaying item attributes stored in a database, where there are german and english descriptions. I know I can set a bean in my action and access the tag like so: request.setAttribute(currentLanguage, getLocale(request).getLanguage()); logic:equal name=currentLanguage value=en bean:write name=product property=specialFeatures ignore=true / /logic:equal logic:equal name=currentLanguage value=de bean:write name=product property=specialFeaturesDE ignore=true / /logic:equal is there a bean for locale by default which removes the need to set the currentLanguage bean I have above? something like: logic:equal name=userlocale value=en bean:write name=product property=specialFeatures ignore=true / /logic:equal Are there any special beans which have default names? Any help is appreciated. cheers, Fred _ This email (including any attachments to it) is confidential, legally privileged, subject to copyright and is sent for the personal attention of the intended recipient only. If you have received this email in error, please advise us immediately and delete it. You are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. Although we have taken reasonable precautions to ensure no viruses are present in this email, we cannot accept responsibility for any loss or damage arising from the viruses in this email or attachments. We exclude any liability for the content of this email, or for the consequences of any actions taken on the basis of the information provided in this email or its attachments, unless that information is subsequently confirmed in writing. If this email contains an offer, that should be considered as an invitation to treat. _ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: logic tag using locale
I'd suggest resolving this type of language choice in the Action. For example, there could be one product bean that is populated with whatever language is preferred by the client. The page could then just write whatever has been placed into the bean. HTH, Ted. Tsang, F (Fred) wrote: All, I'm trying to do a bean:write based on the user's current language. Before you ask, this isn't just internationalization using the properties files. I'm displaying item attributes stored in a database, where there are german and english descriptions. I know I can set a bean in my action and access the tag like so: request.setAttribute(currentLanguage, getLocale(request).getLanguage()); logic:equal name=currentLanguage value=en bean:write name=product property=specialFeatures ignore=true / /logic:equal logic:equal name=currentLanguage value=de bean:write name=product property=specialFeaturesDE ignore=true / /logic:equal is there a bean for locale by default which removes the need to set the currentLanguage bean I have above? something like: logic:equal name=userlocale value=en bean:write name=product property=specialFeatures ignore=true / /logic:equal Are there any special beans which have default names? Any help is appreciated. cheers, Fred _ This email (including any attachments to it) is confidential, legally privileged, subject to copyright and is sent for the personal attention of the intended recipient only. If you have received this email in error, please advise us immediately and delete it. You are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. Although we have taken reasonable precautions to ensure no viruses are present in this email, we cannot accept responsibility for any loss or damage arising from the viruses in this email or attachments. We exclude any liability for the content of this email, or for the consequences of any actions taken on the basis of the information provided in this email or its attachments, unless that information is subsequently confirmed in writing. If this email contains an offer, that should be considered as an invitation to treat. _ - 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: html:form tag
Yes, u r rite. Thanks kadir for prompt reply. -Original Message- From: Kathiresan Murugesan [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 2:06 PM To: Viral_Thakkar Subject: RE: html:form tag Hi You can use the name attribute value you given in your form bean mapping in your struts-config.xml. That will be the name of your form. kadir -Original Message- From: Viral_Thakkar To: Struts Users Mailing List Sent: 12/8/2003 1:53 PM Subject: html:form tag I am converting a html form to .jsp page. Html file contains following form code. form name=frmName tag. This form name is getting used by few javascript functions. At present I have this line in .jsp page for form tag. html:form action=action1.do Which attribute in the html:form tag represents the name attribute of form tag? - 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: html:errors Tag Deprecated?
It is explained well here http://jakarta.apache.org/struts/userGuide/struts-html.html#messages HTH Manish Singla John Topley wrote: I read somewhere that the html:errors tag is going to be deprecated and that html:messages should be used instead. What's the correct syntax for using it to display errors? Any code examples appreciated. Thanks, John - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thanks Manish Singla x73166 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: messages tag not displaying messages
Frank, I believe you want to use the bean:messages ./ tag. There isn't an html:messages tag. -Richard At 06:18 PM 12/5/2003, you wrote: The messages tag supposed to display all the messages automatically ? When I place this on the JSP, the messages do not display: [EMAIL PROTECTED] prefix=html uri=/struts-html% html:messages id=resultMsg name=ATTR_ACTION_MESSAGES/ I know that the message key is correct, the message resource file can be found, and the messages collection has been properly placed in the request, etc. etc. because if I add (below that line) this tag: bean:write name=resultMsg/ to the page, then the message does display. But I shouldn't have to do that, right ? Since adding the bean:write tag does display a message from the collection, this does not appear to be a basic setup issue. It's more a question about the intended behavior of the messages tag. Why doesn't this usage of the messages tag html:messages id=resultMsg name=ATTR_ACTION_MESSAGES/ automatically display all messages in the collection ? - 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: messages tag not displaying messages
Frank, Please disregard the last message. I wasn't paying attention and was looking at the Struts 1.0 docs instead of Struts 1.1. If you are using ActionMessages, then in your action, you'd have something like this: ActionMessages messages = new ActionMessages(); ActionMessage msg = new ActionMessage(data.ok); messages.add(message1, msg); msg = new ActionMessage(data.continue); messages.add(message2, msg); saveMessages(request, messages); and in your JSP, to print out all of the messages, you would use this: html:messages id=msg message=true bean:write name=msg/br /html:messages The id param sets up the bean for the bean:write The message param = true indicates that the bean will be obtained using Globals.MESSAGE_KEY instead of Globals.ERROR_KEY To find out more, check out this article: http://javaboutique.internet.com/tutorials/excep_struts/index-2.html Regards, Richard At 06:18 PM 12/5/2003, you wrote: The messages tag supposed to display all the messages automatically ? When I place this on the JSP, the messages do not display: [EMAIL PROTECTED] prefix=html uri=/struts-html% html:messages id=resultMsg name=ATTR_ACTION_MESSAGES/ I know that the message key is correct, the message resource file can be found, and the messages collection has been properly placed in the request, etc. etc. because if I add (below that line) this tag: bean:write name=resultMsg/ to the page, then the message does display. But I shouldn't have to do that, right ? Since adding the bean:write tag does display a message from the collection, this does not appear to be a basic setup issue. It's more a question about the intended behavior of the messages tag. Why doesn't this usage of the messages tag html:messages id=resultMsg name=ATTR_ACTION_MESSAGES/ automatically display all messages in the collection ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: display tag library
I don't know which tag library you're referring to, but I believe you should be able to call pageContext.getRequest() from any method in a class that extends TagSupport. -Ben From: Honza Spurný [EMAIL PROTECTED] Reply-To: Honza Spurný [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: display tag library Date: Tue, 2 Dec 2003 15:51:59 +0100 Hi there, does anybody have any experience with taglibary display? If yes, please advise me, how can I get the request object in the finishRow() method or in the tableDecorator method. Please, help me, thanks a lot Sporak - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ From the hottest toys to tips on keeping fit this winter, youll find a range of helpful holiday info here. http://special.msn.com/network/happyholidays.armx - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: display tag library
Ben Anderson wrote: I don't know which tag library you're referring to, but I believe you should be able to call pageContext.getRequest() from any method in a class that extends TagSupport. -Ben I'm not sure if I understood it well, but java compiler cannot find pageContext variable, please could you specify, where can be this variable found? Thanks Sporak From: Honza Spurn [EMAIL PROTECTED] Reply-To: Honza Spurn [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: display tag library Date: Tue, 2 Dec 2003 15:51:59 +0100 Hi there, does anybody have any experience with taglibary display? If yes, please advise me, how can I get the request object in the finishRow() method or in the tableDecorator method. Please, help me, thanks a lot Sporak - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ From the hottest toys to tips on keeping fit this winter, youll find a range of helpful holiday info here. http://special.msn.com/network/happyholidays.armx - 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: display tag library
http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/jsp/tagext/TagSupport.html From: Honza Spurný [EMAIL PROTECTED] Reply-To: Honza Spurný [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: display tag library Date: Tue, 2 Dec 2003 16:39:22 +0100 Ben Anderson wrote: I don't know which tag library you're referring to, but I believe you should be able to call pageContext.getRequest() from any method in a class that extends TagSupport. -Ben I'm not sure if I understood it well, but java compiler cannot find pageContext variable, please could you specify, where can be this variable found? Thanks Sporak From: Honza Spurný [EMAIL PROTECTED] Reply-To: Honza Spurný [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: display tag library Date: Tue, 2 Dec 2003 15:51:59 +0100 Hi there, does anybody have any experience with taglibary display? If yes, please advise me, how can I get the request object in the finishRow() method or in the tableDecorator method. Please, help me, thanks a lot Sporak - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ From the hottest toys to tips on keeping fit this winter, youll find a range of helpful holiday info here. http://special.msn.com/network/happyholidays.armx - 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] _ Groove on the latest from the hot new rock groups! Get downloads, videos, and more here. http://special.msn.com/entertainment/wiredformusic.armx - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: display tag library
If you're taking about TableDecorator.finishRow, you should notice that TableDecorator also has a getPageContext method (inherited from Decorator). You should be able to figure out where to go from there... Quoting Honza Spurný [EMAIL PROTECTED]: Ben Anderson wrote: I don't know which tag library you're referring to, but I believe you should be able to call pageContext.getRequest() from any method in a class that extends TagSupport. -Ben I'm not sure if I understood it well, but java compiler cannot find pageContext variable, please could you specify, where can be this variable found? Thanks Sporak From: Honza Spurný [EMAIL PROTECTED] Reply-To: Honza Spurný [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: display tag library Date: Tue, 2 Dec 2003 15:51:59 +0100 Hi there, does anybody have any experience with taglibary display? If yes, please advise me, how can I get the request object in the finishRow() method or in the tableDecorator method. Please, help me, thanks a lot Sporak -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:options tag problem
So your end user has to select 1 of 1800 options 8 times on one page? I've never had trouble with options but then again i've never smoked enough crack to think select menus with 1800 options would be a good thing. As a test you could use model 1 jsp or/and jstl to compare., c:forEach var=item items=myList html-el:option value=${item.value} c:out value=${item.name} / /html-el:option /c:forEach I wouldn't be surprised if you container bails like this also, cant you add another step to reduce the list like an alphabet menu of something? Have another drop down with a-z and regenerate the menu when the user selects a letter. Cheers Mark On 17 Nov 2003, at 10:04, SasiDharma Tharmarajah wrote: Hi gurus. How does the html:options tag works???. say you are using html:options tag several times in a page. when will the html:options tag flush out the objects to the jsp page. I'm asking this is beacuse in our JSP page we are using html:options tag 8 times.for each iteration it has to load around 1800 object from arrayList. When it comes to fourth html:options tag weblogic server throws OutOfMemory error. It seems that after all the iterations are done then only all objects are flushed to da page. just wanted to know whether it is caused by the implementation of html:options tag. any idea of how to solve this problem??? Thanks in advance r sasi - 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: i18N tag lib and struts
meaning, do I need to use i18N tag lib at all, when using struts. -Original Message- From: Vara Prasad Reddy [mailto:[EMAIL PROTECTED] Sent: Monday, November 03, 2003 6:39 PM To: Struts Users Mailing List Subject: i18N tag lib and struts Hello everybody: How best is i18N taglib useful, along with struts 1.1 - Vara Prasad - 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: greaterThan tag
This is where JSTL would be a perfect fix: bean:define id=theNumber name=searchStats property=topHits scope=request/ logic:greaterThan name=bean_name property=property_name value=theNumber ... /logic:greaterThan Doesn't make sense but can be done with: c:if test=${bean_name.property_name searchStats.topHits} do something /c:if Or for a 'purer' jstl replace '' with 'gt' in the above. -Tim -Original Message- From: Otto, Frank [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 21, 2003 5:25 AM To: 'Struts Users Mailing List' Subject: AW: greaterThan tag Hi, you can directly compare: bean:define id=theNumber name=searchStats property=topHits scope=request/ logic:greaterThan name=bean_name property=property_name value=theNumber ... /logic:greaterThan Regards, Frank -Ursprungliche Nachricht- Von: mucus snot [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 21. Oktober 2003 11:14 An: [EMAIL PROTECTED] Betreff: greaterThan tag Hi, I am trying to use logic:greaterThan, but comparing a bean property to another bean property. The code that I am using is logic:greaterThan name=searchStats property=numHits value= When value is a constant, the code works. But when I define a bean bean:define id=theNumber name=searchStats property=topHits scope=request and refer to this in the tag value=%= theNumber %, it won't compile because of a problem with setValue. error: org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: 45 in the jsp file: /results.jsp Generated servlet error: [javac] Compiling 1 source file C:\dropbox\eclipse\...\results_jsp.java:240: cannot resolve symbol symbol : method setValue (java.lang.Object) location: class org.apache.struts.taglib.logic.GreaterThanTag _jspx_th_logic_greaterThan_1.setValue( theNumber ); apologies for not being very adept at debugging jsp Any help appreciated, Al - 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: display tag and struts
Yes .. I had the same problem .. you need to use scriplet .. some thing like this .. % MessageResources resource =(MessageResources) application.getAttribute(Globals.MESSAGES_KEY) ; % display:column property=internalID title=%=resource.getMessage((Locale)session.getAttribute(Globals.LOCALE_KE Y),search.result.internalid)% sort=true href=get.do?method=retrieve paramId=lId paramProperty=ID / Nimish -Original Message- From: Otto, Frank [mailto:[EMAIL PROTECTED] Sent: Thursday, October 16, 2003 11:56 AM To: 'Struts Users Mailing List' Subject: AW: display tag and struts Hi, I have asked this question in display-tag maillist, but I got no answer. I think the i18n with display-tag is a struts problem, because I read the mail from Nelson in display-tag maillist and he has the same problem. Struts can't parse nested tags. Mail of Nelson: - Von: Nelson Ferreira Jr [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 15. Oktober 2003 21:38 An: [EMAIL PROTECTED] Betreff: [displaytag-user] Display taglib and struts internationalization Hi, Id like to internationalize my table headers, reading the column title from ApplicationResources. Something like this: display:column sort=true property=my_property title=bean:message key=column_header1// But it looks like Struts does not parse nested tags, and I just get a blank title. Any ideas? Thanks, Nelson -Ursprngliche Nachricht- Von: Yansheng Lin [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 15. Oktober 2003 23:42 An: 'Struts Users Mailing List' Betreff: RE: display tag and struts Hi Frank, you might want to ask this question on display-tag maillist. I subscribed to that list a while ago, and as far as I can tell, there are quite a few nice people on the list. As to your sorting problem, I don't think it has anything to do with the scope. I got it working with request scope Can you do paging? And what kind of error message do you get? -Original Message- From: Otto, Frank [mailto:[EMAIL PROTECTED] Sent: October 15, 2003 9:27 AM To: Struts-User (E-Mail) Subject: display tag and struts Hello, I have read something about diplay tag library and have test it. If I want to sort the table by clicking on column, I will get an error, because my collection is null. It isn't saved in the session, only in the request. An idea? My other questions is: - Can I use display tag with i18n and resource bundles? I need the column titles in different languages. Regards, Frank - 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: display tag and struts
It might look better if you change this to use the struts or JSTL tags. It would also allow your app to work with multiple bundles and modules (if any) You might also think about having the href rewritten so you aren't hardcoding .do in there bean:define id=msg bean:message key=search.result.internalid/ /bean:define bean:define id=link html:rewrite action=get?method=retrieve/ /bean:define display:column property=internalID title=%=msg% sort=true href=%=link% paramId=lId paramProperty=ID / * Although, unless I'm mistaken, the action attribute for rewrite is post 1.1.so that might not help you. -- James Mitchell Software Engineer / Struts Evangelist http://www.struts-atlanta.org 678.910.8017 AIM:jmitchtx -Original Message- From: Nimish Chourey , Tidel Park - Chennai [mailto:[EMAIL PROTECTED] Sent: Thursday, October 16, 2003 9:34 AM To: Struts Users Mailing List Subject: RE: display tag and struts Yes .. I had the same problem .. you need to use scriplet .. some thing like this .. % MessageResources resource =(MessageResources) application.getAttribute(Globals.MESSAGES_KEY) ; % display:column property=internalID title=%=resource.getMessage((Locale)session.getAttribute(Glo bals.LOCALE_KE Y),search.result.internalid)% sort=true href=get.do?method=retrieve paramId=lId paramProperty=ID / Nimish -Original Message- From: Otto, Frank [mailto:[EMAIL PROTECTED] Sent: Thursday, October 16, 2003 11:56 AM To: 'Struts Users Mailing List' Subject: AW: display tag and struts Hi, I have asked this question in display-tag maillist, but I got no answer. I think the i18n with display-tag is a struts problem, because I read the mail from Nelson in display-tag maillist and he has the same problem. Struts can't parse nested tags. Mail of Nelson: - Von: Nelson Ferreira Jr [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 15. Oktober 2003 21:38 An: [EMAIL PROTECTED] Betreff: [displaytag-user] Display taglib and struts internationalization Hi, I´d like to internationalize my table headers, reading the column title from ApplicationResources. Something like this: display:column sort=true property=my_property title=bean:message key=column_header1// But it looks like Struts does not parse nested tags, and I just get a blank title. Any ideas? Thanks, Nelson -- -- -Ursprüngliche Nachricht- Von: Yansheng Lin [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 15. Oktober 2003 23:42 An: 'Struts Users Mailing List' Betreff: RE: display tag and struts Hi Frank, you might want to ask this question on display-tag maillist. I subscribed to that list a while ago, and as far as I can tell, there are quite a few nice people on the list. As to your sorting problem, I don't think it has anything to do with the scope. I got it working with request scope Can you do paging? And what kind of error message do you get? -Original Message- From: Otto, Frank [mailto:[EMAIL PROTECTED] Sent: October 15, 2003 9:27 AM To: Struts-User (E-Mail) Subject: display tag and struts Hello, I have read something about diplay tag library and have test it. If I want to sort the table by clicking on column, I will get an error, because my collection is null. It isn't saved in the session, only in the request. An idea? My other questions is: - Can I use display tag with i18n and resource bundles? I need the column titles in different languages. Regards, Frank - 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: html:checkbox Tag problem
Faisal wrote: I populate data from database in to the Action form, which i am using to display multiple records in the JSP Page. Here i am using Html:checkbox as an indicator to every record in the the page. I have associated the checkobox with String array Property. My Problem is when i submit the form and say form.getPropertyName(), I am getting the values of only the checked items. I would like to know how to iniatilize the unchecked values and how struts handles. I need it urgently . The request will only contain successful form elements. Un-checked checkboxes are NOT successful and will not be in the request. (This is an HTML/browser thing, not Struts.) If you need something to come through in the request, html:hidden might be appropriate. Post some of the JSP and your Form bean, and perhaps someone will have an idea for you. -- Wendy Smoak Applications Systems Analyst, Sr. Arizona State University, PA, IRM - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: html:checkbox Tag problem
Another way is to implement the reset method. This will allow you to initialize all your checkboxes to the unchecked value. -Tim -Original Message- From: Wendy Smoak [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 15, 2003 12:42 PM To: Struts Users Mailing List Subject: RE: html:checkbox Tag problem Faisal wrote: I populate data from database in to the Action form, which i am using to display multiple records in the JSP Page. Here i am using Html:checkbox as an indicator to every record in the the page. I have associated the checkobox with String array Property. My Problem is when i submit the form and say form.getPropertyName(), I am getting the values of only the checked items. I would like to know how to iniatilize the unchecked values and how struts handles. I need it urgently . The request will only contain successful form elements. Un-checked checkboxes are NOT successful and will not be in the request. (This is an HTML/browser thing, not Struts.) If you need something to come through in the request, html:hidden might be appropriate. Post some of the JSP and your Form bean, and perhaps someone will have an idea for you. -- Wendy Smoak Applications Systems Analyst, Sr. Arizona State University, PA, IRM - 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: display tag and struts
Hi Frank, you might want to ask this question on display-tag maillist. I subscribed to that list a while ago, and as far as I can tell, there are quite a few nice people on the list. As to your sorting problem, I don't think it has anything to do with the scope. I got it working with request scope Can you do paging? And what kind of error message do you get? -Original Message- From: Otto, Frank [mailto:[EMAIL PROTECTED] Sent: October 15, 2003 9:27 AM To: Struts-User (E-Mail) Subject: display tag and struts Hello, I have read something about diplay tag library and have test it. If I want to sort the table by clicking on column, I will get an error, because my collection is null. It isn't saved in the session, only in the request. An idea? My other questions is: - Can I use display tag with i18n and resource bundles? I need the column titles in different languages. Regards, Frank - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: html:checkbox Tag problem
I think multibox will return the value of the checked items which might help you out. --- Wendy Smoak [EMAIL PROTECTED] wrote: Faisal wrote: I populate data from database in to the Action form, which i am using to display multiple records in the JSP Page. Here i am using Html:checkbox as an indicator to every record in the the page. I have associated the checkobox with String array Property. My Problem is when i submit the form and say form.getPropertyName(), I am getting the values of only the checked items. I would like to know how to iniatilize the unchecked values and how struts handles. I need it urgently . The request will only contain successful form elements. Un-checked checkboxes are NOT successful and will not be in the request. (This is an HTML/browser thing, not Struts.) If you need something to come through in the request, html:hidden might be appropriate. Post some of the JSP and your Form bean, and perhaps someone will have an idea for you. -- Wendy Smoak Applications Systems Analyst, Sr. Arizona State University, PA, IRM - 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: LOGIC:EQUAL TAG COMPARISON. Apache Struts Online Doc Referenc e No t Clear
That implies that logic:equal tag cannot be nested inside a logic:iterate. That means I cannot use the following logic.. logic:equal name=aUpdateForm property=viewChildRecord value=true logic:iterate id = childDetail name=coll logic:equal name=childDetail parameter=rateClassTCSGRTE value=%=ss%/ Seems to be a poor demonstartion of Struts capability to me ! Now I have to use an if, else loop inside my jsp...GREAT !! Thanx.. -Original Message- From: Otto, Frank [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 14, 2003 2:32 PM To: 'Struts Users Mailing List' Subject: AW: LOGIC:EQUAL TAG COMPARISON. Apache Struts Online Doc Referenc e No t Clear This line means: The value to wich you compare must be a constant value. Only the value of the property is dynamically. I think you must use the property-attribute instead the parameter-attribute. -Ursprüngliche Nachricht- Von: Chawla, Yogesh [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 14. Oktober 2003 10:53 An: 'Struts Users Mailing List' Betreff: LOGIC:EQUAL TAG COMPARISON. Apache Struts Online Doc Reference No t Clear Wichtigkeit: Hoch What does this line in Struts doc mean for logic:equal tag Compares the variable specified by one of the selector attributes against the specified constant value. The nested body content of this tag is evaluated if the variable and value are equal. constant value does it imply that logic:equal does not work dynamically..Can this tag be used nested inside a logic:iterate tag ? Any ideas anybody or has somebody faced a similar problem.. Regards. -Original Message- From: Chawla, Yogesh [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 14, 2003 1:55 PM To: 'Struts Users Mailing List' Subject: RE: URGENT :: LOGIC:EQUAL works only with one constant Value ?? N ot R epeat Iterations I am specifying the complete values. The e.g I had written was simplistic for getitng some help! The code is something like this.. logic:equal name=aUpdateForm property=viewChildRecord value=true logic:iterate id = childDetail name=coll logic:equal name=childDetail parameter=rateClassTCSGRTE value=%=ss%/ Any ideas.. regards. -Original Message- From: Kwok Peng Tuck [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 14, 2003 1:18 PM To: Struts Users Mailing List Subject: Re: URGENT :: LOGIC:EQUAL works only with one constant Value ?? Not R epeat Iterations Sure it works, but you don't specify the property of the variable, name of the variable to be compared to. So that's why it doesn't evaulate to equal. Here, take a peek : http://jakarta.apache.org/struts/userGuide/struts-logic.html#equal Chawla, Yogesh wrote: Hello, I have a repeat nested tag logic like this : The Struts Documentation on ligoc tags mentions this for the logic:equal tag. Why is it that it can only be checked against one contant value ? equal - Evaluate the nested body content of this tag if the requested variable is equal to the specified value. Compares the variable specified by one of the selector attributes against the specified constant value. The nested body content of this tag is evaluated if the variable and value are equal. Can I use something like this : logic:iterate id=resultCounter logic:equal value=changing value in each iterate tag based on id resultCounter logic:iterate if resultCounter matches the value, then get the results html:text name=resultCounter property=value1Text /logic:iterate /logic:equal /logic:iterate This is not working even if conditions are not matching. It prints the html:text even if equal is not matching !! Any inputs would be appreciated.. Cheers :) DISCLAIMER: The information in this message is confidential and may be legally privileged. It is intended solely for the addressee. Access to this message by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, or distribution of the message, or any action or omission taken by you in reliance on it, is prohibited and may be unlawful. Please immediately contact the sender if you have received this message in error. Thank you. - 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] DISCLAIMER: The information in this message is confidential and may be legally privileged. It is intended solely for the addressee. Access to this message by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, or distribution of the message, or any action or omission taken
RE: LOGIC:EQUAL TAG COMPARISON. Apache Struts Online Doc Referenc e No t Clear
coll is something which I receive from the session. Its a collection which is not a part of the main form bean.. -Original Message- From: Otto, Frank [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 14, 2003 2:42 PM To: 'Struts Users Mailing List' Subject: AW: LOGIC:EQUAL TAG COMPARISON. Apache Struts Online Doc Referenc e No t Clear You can use a logic:equal tag nested inside a logic:iterate, because I use logic:equal tag in this way. I think there is only a logical problem. How are the value of viewChildRecord? Is coll your list, which you want to iterate? If yes, you have to use property=coll. -Ursprüngliche Nachricht- Von: Chawla, Yogesh [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 14. Oktober 2003 11:08 An: 'Struts Users Mailing List' Betreff: RE: LOGIC:EQUAL TAG COMPARISON. Apache Struts Online Doc Referenc e No t Clear That implies that logic:equal tag cannot be nested inside a logic:iterate. That means I cannot use the following logic.. logic:equal name=aUpdateForm property=viewChildRecord value=true logic:iterate id = childDetail name=coll logic:equal name=childDetail parameter=rateClassTCSGRTE value=%=ss%/ Seems to be a poor demonstartion of Struts capability to me ! Now I have to use an if, else loop inside my jsp...GREAT !! Thanx.. -Original Message- From: Otto, Frank [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 14, 2003 2:32 PM To: 'Struts Users Mailing List' Subject: AW: LOGIC:EQUAL TAG COMPARISON. Apache Struts Online Doc Referenc e No t Clear This line means: The value to wich you compare must be a constant value. Only the value of the property is dynamically. I think you must use the property-attribute instead the parameter-attribute. -Ursprüngliche Nachricht- Von: Chawla, Yogesh [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 14. Oktober 2003 10:53 An: 'Struts Users Mailing List' Betreff: LOGIC:EQUAL TAG COMPARISON. Apache Struts Online Doc Reference No t Clear Wichtigkeit: Hoch What does this line in Struts doc mean for logic:equal tag Compares the variable specified by one of the selector attributes against the specified constant value. The nested body content of this tag is evaluated if the variable and value are equal. constant value does it imply that logic:equal does not work dynamically..Can this tag be used nested inside a logic:iterate tag ? Any ideas anybody or has somebody faced a similar problem.. Regards. -Original Message- From: Chawla, Yogesh [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 14, 2003 1:55 PM To: 'Struts Users Mailing List' Subject: RE: URGENT :: LOGIC:EQUAL works only with one constant Value ?? N ot R epeat Iterations I am specifying the complete values. The e.g I had written was simplistic for getitng some help! The code is something like this.. logic:equal name=aUpdateForm property=viewChildRecord value=true logic:iterate id = childDetail name=coll logic:equal name=childDetail parameter=rateClassTCSGRTE value=%=ss%/ Any ideas.. regards. -Original Message- From: Kwok Peng Tuck [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 14, 2003 1:18 PM To: Struts Users Mailing List Subject: Re: URGENT :: LOGIC:EQUAL works only with one constant Value ?? Not R epeat Iterations Sure it works, but you don't specify the property of the variable, name of the variable to be compared to. So that's why it doesn't evaulate to equal. Here, take a peek : http://jakarta.apache.org/struts/userGuide/struts-logic.html#equal Chawla, Yogesh wrote: Hello, I have a repeat nested tag logic like this : The Struts Documentation on ligoc tags mentions this for the logic:equal tag. Why is it that it can only be checked against one contant value ? equal - Evaluate the nested body content of this tag if the requested variable is equal to the specified value. Compares the variable specified by one of the selector attributes against the specified constant value. The nested body content of this tag is evaluated if the variable and value are equal. Can I use something like this : logic:iterate id=resultCounter logic:equal value=changing value in each iterate tag based on id resultCounter logic:iterate if resultCounter matches the value, then get the results html:text name=resultCounter property=value1Text /logic:iterate /logic:equal /logic:iterate This is not working even if conditions are not matching. It prints the html:text even if equal is not matching !! Any inputs would be appreciated.. Cheers :) DISCLAIMER: The information in this message is confidential and may be legally privileged. It is intended solely for the addressee. Access to this message by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying
RE: Basic tag library question
Use the HTML:TEXT with readonly=true/false. The true or false can be rendered either with a JSP expression or JSTL. Edgar -Original Message- From: Jacob Wilson [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 14, 2003 7:01 PM To: [EMAIL PROTECTED] Subject: Basic tag library question Hi... Is there any tld that is available to handle my input type=image apart from the struts html tld??? I need to make the image disabled or enabled based on the security level that I will be getting from DB... I know we can do this thru the struts html tag lib werein we can set the default attribute to either true or false!! Was wondering whether there are any other taglibs... I checked the input tag lib from jakarta, they do not have it for image!!! Let me know and also please correct me if I had mentioned anything wrong above... Thanks. -Jacob. - Do you Yahoo!? The New Yahoo! Shopping - with improved product search - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: html tag newbie question
have a look at html:link tag documentation ...And try to use the struts tags as much as possible... -Original Message- From: Peng, Meimin [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 08, 2003 5:23 PM To: 'Struts Users Mailing List' Subject: html tag newbie question Hi, I am very new in struts and facing a problem now. Please help. What I want to do is when user click a image, it will link to yahoo.com which is defined as link.yahoo in the config property file. How can I approach this? After it generate the html source codes, it will be like a href=http://www.yahoo.com;img src=../images/yahoo.gif alt=Yahoo/a Right now, I am doing a wrong way to combine struts and html even though it's working fine. --in property file-- link.yahoo=a href=http://www.yahoo.com/ image.yahoo=../images/yahoo.gif image.yahoo.alt=Yahoo --in jsp -- bean:message key=link.yahoo /html:img srcKey=image.yahoo altKey=image.yahoo.alt //a CONFIDENTIALITY NOTICE: The information in this e-mail is privileged and confidential. Any use, copying or dissemination of any portion of this e-mail by or to anyone other than the intended recipient(s) is unauthorized. If you have received this e-mail in error, please reply to sender and delete it from your system immediately. - 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: html tag newbie question
Hi, I still don't know how to do it. I try to avoid hard code anything, have any logic, have html tag, and have javascripts in jsp file. Overall, jsp file will just display whatever I got from properties or beans. Is there a way to do like this for example: html:link href=bean:message key=link.yahoo/images/html:link then link.yahoo will be http://www.yahoo.com/ any ideas? Thanks. -Original Message- have a look at html:link tag documentation ...And try to use the struts tags as much as possible... -Original Message- Hi, I am very new in struts and facing a problem now. Please help. What I want to do is when user click a image, it will link to yahoo.com which is defined as link.yahoo in the config property file. How can I approach this? After it generate the html source codes, it will be like a href=http://www.yahoo.com;img src=../images/yahoo.gif alt=Yahoo/a Right now, I am doing a wrong way to combine struts and html even though it's working fine. --in property file-- link.yahoo=a href=http://www.yahoo.com/ image.yahoo=../images/yahoo.gif image.yahoo.alt=Yahoo --in jsp -- bean:message key=link.yahoo /html:img srcKey=image.yahoo altKey=image.yahoo.alt //a CONFIDENTIALITY NOTICE: The information in this e-mail is privileged and confidential. Any use, copying or dissemination of any portion of this e-mail by or to anyone other than the intended recipient(s) is unauthorized. If you have received this e-mail in error, please reply to sender and delete it from your system immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: select tag problem
mohamed ebrahim faisal [mailto:[EMAIL PROTECTED] wrote: html:select property=report html:options name=beanname property=period_reports / /html:select. I am getting the error message as , there is no getter method for property period_reports under bean beanname, but infact i have one. The period_reports property is of type ArrayList. can anyone pls solve it. Read the JavaBeans specification to find out what your property name will translate to for get/set methods. My first guess is getPeriod_reports, but it might be getPeriod_Reports instead. Then make sure your get/set methods match. If you use periodReports as a property name, and have a getPeriodReports method, it will work, and you code will look like everyone else's. ;) -- Wendy Smoak Applications Systems Analyst, Sr. Arizona State University, PA, IRM - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]