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: 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]