Hi,

 

First of all, just for the record, AndroMDA does not magically generate applications. For customizations you’ll sometimes need to go into the templates, or the generated code.

 

Secondly, I am assuming you mean bpm4struts, not bpm2struts J

 

(1)

You can remove the line of code in the generated JSP that prints the ‘badly formatted text’ .. alternatively you can mark the collection to be displayed in a table (that way you’ll get something like this: http://team.andromda.org:8080/OnlineStore/PurchaseItems/EnterNameAndPasswordProceed.do (table at the bottom of the page)

 

But if you want a configurable view you need to update the JSP or the templates

 

 

(2)

if you want radiobuttons you need to do this

 

keep the incoming collection, but remove the line that prints it on the page

  1. model the parameter that will send the selected option, for example, have an action ’myAction’ with the ‘myParameter’ parameter (this action comes out of the page in which you want to display the options)
  2. so now you have modeled you want to send a parameter to the server (nothing special)
  3. add a tagged value to this parameter to indicate it is selected from a set of options, you can do this like this @andromda.struts.view.field.type=radio X
  4. replace X with the number of options to choose from: “radio 5” would render 5 options with default names
  5. alternatively you can do this: @andromda.struts.view.field.type=radio firstOption,secondOption,thirdOption
  6. this will render te names you specify
  7. now you have modeled the parameter is to be selected from a set of options and only one can be selected at a time

 

 

what is a number field in the form ?

 

hth

 

-- Wouter

 

 

 

 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andrzej Dmoch
Sent: Tuesday, August 24, 2004 4:30 PM
To: [EMAIL PROTECTED]
Subject: [Andromda-user] Flexibility of bpm2struts

 

Hi,

 

I'm just preparing the AndroMDA workshop for my company. I'd like to implement the following usecase:

 

(1) Send some Collection of JavaBeans to the JSP (display them in the configurable manner).

(2) Allow the user to choose one of them (ideally using radiobuttons).

 

I've gone through it but:

 

(1) I can only display badly formatted Text as a result of the toString() method of the JavaBean encapsulating the collection. I would like to have a nice configurable view. How to do achieve it?

(2) I can only use the number field in the form instead of using radiobutton.

 

Could you provide me with the info wheather what I'd like to achieve is already possible with the standard and how?

If not, please give me a hint what should be changed in the cartrigde to allow such a flexibility.

 

Best Regards,

 

Reply via email to