thanks Sunondo!

I can already give you a tip for displaying a list of users:

  1. on the action state representing the page you must have an
     outgoing transition
  2. add a trigger to this transition and give it a good name
  3. add a parameter (or more) to this trigger, let's say "users" which
     is a collection (or array) instance
  4. add a tagged value to that parameter:
     @andromda.struts.view.field.type = select

this should render a list allowing multiple selections, the action form will contain a variable "usersBackingList" that contains the complete list of users; there will be another variable "users" that represents the collection of selected users (always a subset of the backing list)

if you prefer a combobox instead of a list you can just change the type of the "users" variable to a non-collection object (you probably want to rename to "user" too)

that's all you need to do, just make sure the rest of the activity graph is correct too, soon the cartridge will help you there :-)


hth

-- Wouter

Sunondo Ghosh wrote:

Thank you, that worked. I now have a working example where I can create
a new user using the generated code. Thanks to you and Wouter for all
your help. This is really cool stuff!

Now I will try to add more action states to the activity diagram. I need
to display the list of users created by the previous steps. Let's see
how that goes. :-)

Sunondo

-----Original Message-----
From: Chad Brandon [mailto:[EMAIL PROTECTED] Sent: Monday, June 14, 2004 5:42 AM
To: Sunondo Ghosh
Cc: [EMAIL PROTECTED]
Subject: Re: Creating tables using Hypersonic for AnimalQuiz


Hi Sundondo,

This is probably because your HSSQL ds.xml file needs
to have the following things uncommented:

<!-- for tcp connection, allowing other
processes to use the hsqldb
database. This requires the
org.jboss.jdbc.HypersonicDatabase mbean.
<connection-url>jdbc:hsqldb:hsql://localhost:1701</connection-url>
-->


and:


<!-- This mbean should be used only when using tcp
connections. Uncomment
when the tcp based connection-url is used. <mbean code="org.jboss.jdbc.HypersonicDatabase" name="jboss:service=Hypersonic">
<attribute name="Port">1701</attribute>
<attribute name="Silent">true</attribute>
<attribute name="Database">default</attribute>
<attribute name="Trace">false</attribute>
<attribute name="No_system_exit">true</attribute>
</mbean>
-->


So uncomment those things and it should work.

Chad

--- Sunondo Ghosh <[EMAIL PROTECTED]> wrote:


Hi Chad,

I have a question about creating the tables used in
the AnimalQuiz sample. When I run the
initializeSchema then I get the error included at
the bottom of my email. I looked in my JBoss deploy
dir and saw the hsqldb-ds.xml config file. I
modified the connection url there but then jboss
startup threw some exceptions. Do you know what I
need to do to set up hsqldb in order to create the
tables? I went to the hsqldb site on sourceforge but
didn't find much info there.


In the older version of Andromda (2.x) the tables
were getting created automatically. However in the
new version it complains while trying to create a
new entity that the table does not exist. Am I doing
something wrong in the new version?

Thanks for your help,

Sunondo




C:\andromda-bin-3.0M1\samples\animal-quiz\app\target>java


-classpath C:\jboss-3.
2.3\server\default\lib\hsqldb.jar
org.hsqldb.util.ScriptTool -driver org.hsqldb.
jdbcDriver -url jdbc:hsqldb:hsql: -database
//localhost:1701 -script hibernate-s
chema-initialize.sql
ScriptTool.init error: Connection is broken:
Connection refused: connect
java.sql.SQLException: Connection is broken:
Connection refused: connect
       at org.hsqldb.Trace.getError(Unknown Source)
       at org.hsqldb.Trace.error(Unknown Source)
       at
org.hsqldb.jdbcConnection.reconnectHSQL(Unknown
Source)
       at
org.hsqldb.jdbcConnection.openHSQL(Unknown Source)
       at org.hsqldb.jdbcConnection.<init>(Unknown
Source)








-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
Andromda-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/andromda-user

Reply via email to