« Return to Thread: Javadocs and other doubts

Re: Javadocs and other doubts

by El Acuariano :: Rate this Message:

Reply to Author | View in Thread

Thanks Ken, will look into it.

On Mon, Dec 22, 2008 at 2:10 PM, Ken in nashua <nhhockeyplayer@...> wrote:
With regard to the javascript stuff and updates of state to dom elements... the tapestry script ( *.script files) api is an option. JSON I believe might be too steep.
 
Your components can pass in as parameters ognl state variables to the *.script file and operate on them as such, operate on components in your page based on conditions or states passed in as parameters or create new effects or dom elements... and also do what your asking... set the sensitivity of an element enabled/disabled like your asking.
 
I checked in a Gallery component that uses tapestry script. It is in one of the JIRA's...
 
I found it to be very useful but there remains glitch bugs on layout and geometry mgt when trying to layout new dom elements ontop of existing ones. The coordinates and rendering have yet to be resolved by T-4.1.6 folks.

Best regards
Ken in nashua








Date: Sun, 21 Dec 2008 18:30:06 -0200
From: acuariano@...
To: users@...
Subject: [trails-users] Javadocs and other doubts


Hi all,
I finally started to use Trails more seriously and have some small doubts about the documentation and how to do stuff. 

First of all, whenever I get to something that I think it should be somewhere in Trails, I look in the Javadocs but generally don't get a lot of information from them. Is there any reason why the Javadocs don't have more information on intended use? That is the first place people look for usage information.
I found in the "Trails gotchas" page an old link to the examples in the repository. It points to the 1.0 SNAPSHOT version in http://trails.inspiring.nl/svn/trunk/trails/examples/. It would be nice to update it to point to http://svn.codehaus.org/trails/tags/trails-1.2/examples.

About the "stuff", I'm working on a simple application that creates something similar to an invoice. I have three little problems:

- I need to fill-in an incremental invoice number. It should be editable for flexibility, but when creating a new invoice it should be initialized to the current invoice number. How can I set the initial value for a new invoice?
- Each line of the invoice correspond to a product. I need that the unit price of the line be independent of the product, to avoid changing old invoices if a product price changes. Also, it should be editable, to reflect special prices (promotions, etc.). When editing a line, if I change the product, the unit price for the line should change to reflect the current price of the new product. It would be nice to make it work in the browser, using JavaScript. I need to create an edition page to do this, right? How can I get all available products and their prices to be usable with JS? I would add JSON containing the products to the page so I can access them, but I don't understand enough of the Trails "plumbing" to really know how to do it.
- For several object I need to be able to "freeze" some properties. For example, an invoice could have a "status" field. When the status changes to "approved" then no more edition is allowed. Is there a nice and simple way to do this?

Thanks,
HernĂ¡n






Life on your PC is safer, easier, and more enjoyable with Windows Vista®. See how

 « Return to Thread: Javadocs and other doubts