Re: Antwort: Re: Tapestry 5 IoC container

2007-10-08 Thread Peter Stavrinides
Thanks for your responses guys, this is awesome!! much improved over the Hivemind approach, though I think I will stick with two steps, I like a self documenting registry, just so I know what services I have implemented. lasitha wrote: Hi Peter, If you just want UserData to be an ASO, there's

Re: T4: Localizing @Table component's column header

2007-10-08 Thread Jun Tsai
You can reference http://tapestry.apache.org/tapestry4.1/tapestry-contrib/componentreference/tableview.html for example: html file: properties file: appNumber=Application Number -- regards, Jun Tsai

Re: T5: How can I create an external Asset

2007-10-08 Thread Fidel Chavarria
Ok , I found a solution I didn't remember what I did when I need to display a chart with T5 I create my own StreamResponse look at it : public class FileComponent { @Inject private ComponentResources _resources; @SuppressWarnings("unused") @Mixin

Re: [T4.1.2] stale link on ajax modified form

2007-10-08 Thread Martino Piccinato
Well, after some cleanup and further test now the component is (apparently) working perfectly. There was in fact some bad old code in there that was messing up things. But the strangest thing ever is that firebug still gives me that stalelinkexception when I fire my ajax eventlistener!! even thou

Re: [T5] Every form element renders with the field error marker

2007-10-08 Thread Hugo Palma
Your comment led me to the answer. I have a custom Shell component where i define the html and head elements. In my page i again have the html element declared because i need to declare the tapestry namespace, but problem is that the html gets rendered twice, so my resulting html is:

Re: [T5] Every form element renders with the field error marker

2007-10-08 Thread Josh Canfield
Hmm... can you give us a little code that reproduces the problem? I've seen this when I don't have my layout included properly. I believe that your rendered page isn't getting the default css/js included from tapestry. Could it be that you don't have a or element defined? I can't compile anything

Re: T4.1.3: Why is id suffixed with "_0" ?

2007-10-08 Thread andyhot
perhaps try updateComponents="clientId:ifNotLoggedIn" I think Jesse has made it so that both are the same, but i almost always use the clientId approach myself Martino Piccinato wrote: Unfortunately for some reason some components cannot be used with updateComponents: most notably Insert and

Re: does T-4.1.* have a COUNT component?

2007-10-08 Thread Robert Zeigler
Well, there is... write your own component. Then you can use it to your heart's content. And contribute it back. Other people would probably find it useful, too. Robert On Oct 8, 2007, at 10/83:23 PM , Ken nashua wrote: Although I appreciate the attempts to solve, I disagree with all so

Re: [T5] Every form element renders with the field error marker

2007-10-08 Thread Hugo Palma
I have the namespace defined. Josh Canfield wrote: I think this happens when you don't have the tapestry xmlns defined: http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> Josh On 10/8/07, Hugo Palma <[EMAIL PROTECTED]> wrote: I must be doing something really dumb because i'm gett

RE: does T-4.1.* have a COUNT component?

2007-10-08 Thread Ken nashua
Although I appreciate the attempts to solve, I disagree with all solutions and am disheartened. This capability should be available gracefully without having to touch any java. Best regards Ken in nashua From: [EMAIL PROTECTED] To: users@tapestry.apache.org Subject: does T-4.1.* have a COUNT c

T5: How can I create an external Asset

2007-10-08 Thread Fidel Chavarria
I need to create external assets for files that has been loaded to my server with the t5 upload component these files are located in the file system of the server. any suggestion ...? -- View this message in context: http://www.nabble.com/T5%3A-How-can-I-create-an-external-Asset-tf4590286.htm

Re: T5: A simple Ajax need(JQuery)

2007-10-08 Thread Borut Bolčina
Hello Angelo, in case you stil need a hint - here it is (off the top of my head) ** TEMPLATE * function asyncCall () { $.ajax({ url: "myPage", // i think case doesn't matter success: function(msg){

Re: T4.1.3: Why is id suffixed with "_0" ?

2007-10-08 Thread Martino Piccinato
Unfortunately for some reason some components cannot be used with updateComponents: most notably Insert and If. The solution is to wrap you if with an Any component that can be updated. Id of components are suffixed with indexex "_0, _1 ecc". usually when inside a For to ensure each one has a dif

T4.1.3: Why is id suffixed with "_0" ?

2007-10-08 Thread Malin Ljungh
Hi all, I have a problem with the async and updateComponents. I have an If component with id ifNotLoggedIn with renderTag true. Inside this I have som DirectLinks to switch the content of my If using async and updateComponents="ifNotLoggedIn". I get the following exception: org.apache.hivemind.A

Re: does T-4.1.* have a COUNT component?

2007-10-08 Thread Robert Zeigler
Seems like there are a variety of different ways to do this... One way would be to have your list be a temporary list of lists... you divide your list into sublists of length 3 each, and each sublist is an element in a "super" list. Ugly in code. Clean in the template. Another way to do it w

Re: does T-4.1.* have a COUNT component?

2007-10-08 Thread Mauricio Aldazosa
On 10/8/07, Ken nashua <[EMAIL PROTECTED]> wrote: > > > Ok I tried a custom Loop hybrid but that failed to do uncoordinated > indices between collection and loop. > > All I want to do is increment a count within the template and act on it > when it reaches a certain value and then reset it. > > IE.

Re: [T5] Every form element renders with the field error marker

2007-10-08 Thread Josh Canfield
I think this happens when you don't have the tapestry xmlns defined: http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> Josh On 10/8/07, Hugo Palma <[EMAIL PROTECTED]> wrote: > > I must be doing something really dumb because i'm getting displayed next > to every single form element(even the

does T-4.1.* have a COUNT component?

2007-10-08 Thread Ken nashua
Ok I tried a custom Loop hybrid but that failed to do uncoordinated indices between collection and loop. All I want to do is increment a count within the template and act on it when it reaches a certain value and then reset it. IE. render tag every 3 iterations of my outer For loop. Does thi

[T5] Every form element renders with the field error marker

2007-10-08 Thread Hugo Palma
I must be doing something really dumb because i'm getting displayed next to every single form element(even the submit button) the field error marker. This happens as soon as i render the page, so i haven't even submitted the form yet. Also, the form validations seem to be running before i submi

Re: does tapestry 4.2 have an iterator component

2007-10-08 Thread Robert Zeigler
The outer loop's "index" paramter and the inner loops "index" parameter are independent. However, the property to which they are bound in your page is up to you. So, in your example, where both index parameters are bound to the index property, you're going to get collision, just as you would

RE: does tapestry 4.2 have an iterator component

2007-10-08 Thread Ken nashua
How do I resolve contention over INDEX on the nested loop? If I refer to INDEX... is it inner or outer? Best regards Ken in nashua From: [EMAIL PROTECTED] To: users@tapestry.apache.org Subject: RE: does tapestry 4.2 have an iterator component Date: Mon, 8 Oct 2007 13:25:25 -0400

RE: does tapestry 4.2 have an iterator component

2007-10-08 Thread Ken nashua
Andy, I will give that IntIterator a try... but I have a parameter in OGNL called tableSize. How do I pass this into the IntIterator constructor? source="ognl:new IntIterator(1,ognl:tableSize)" ? thanks for helping Best regards Ken in nashua From: [EMAIL PROTECTED] To: users@tapestry.apac

RE: does tapestry 4.2 have an iterator component

2007-10-08 Thread Ken nashua
tassle component LOOP is for 3.0. No indicator it is for T-4.1.2 Still blue in the face,.,.,. Best regards Ken in nashua From: [EMAIL PROTECTED] To: users@tapestry.apache.org Subject: RE: does tapestry 4.2 have an iterator component Date: Mon, 8 Oct 2007 12:51:17 -0400 All I am looking

Re: does tapestry 4.2 have an iterator component

2007-10-08 Thread andyhot
Ken, you're right - T4.1.2 doesn't have a Loop component it has always had a @For component Here's a way to turn For into Loop (adjust for < JDK1.5) public class IntIterator implements Iterator{ private int _start, _end; public IntIterator(int start, int end) {_start=start;_end=end;} public bool

RE: does tapestry 4.2 have an iterator component

2007-10-08 Thread Ken nashua
All I am looking for is a Loop component. Tap-4.1.2 has none. Unless someone wants to point it out and skip all the heck. Best regards Ken in nashua From: [EMAIL PROTECTED] To: users@tapestry.apache.org Subject: RE: does tapestry 4.2 have an iterator component Date: Mon, 8 Oct 2007 12:05:46 -

Re: [T4.1.2] stale link on ajax modified form

2007-10-08 Thread Martino Piccinato
in fact the only thing it were previously persisted in session were IPropertySelectionModel but I thought this was just a mistake because it had no much sense, giong to make some test more.. - To unsubscribe, e-mail: [EMAIL PROTEC

Re: [T4.1.2] stale link on ajax modified form

2007-10-08 Thread andyhot
Did you resolve this? Looks like some state is different between render and rewind... and this might be caused by a lot of things. Try persisting things to session till you find what causes the problem, then roll back & use ... the new knowledge Martino Piccinato wrote: just to be precise:

Re: does tapestry 4.2 have an iterator component

2007-10-08 Thread Martino Piccinato
In fact it seems to me you should solvee your problem with some easy page method creating the list to be iterated by the for each time you reload the page. So you have your "big" list in one property and another method (possibly reading other properties/parameters) will slice the big list to provi

Re: does tapestry 4.2 have an iterator component

2007-10-08 Thread andyhot
Ken nashua wrote: Thanks Bob but I need to span the whole list. Thanks Andy but I how do I cause a for loop to iterate N iterations independent of any collection? I'd use my own Iterator... Having said that, I still dont get your exact use case - how would you do it in java (no web, no ta

Re: does tapestry 4.2 have an iterator component

2007-10-08 Thread Robert Zeigler
http://www.tapestrycomponents.org/Tassel/app?service=external/ ViewComponent&sp=SLoop Originally written for tapestry 3.x. Haven't tested it in 4.x, but it does what you're asking. Cheers, Robert On Oct 8, 2007, at 10/811:05 AM , Ken nashua wrote: Thanks Bob but I need to span the whole

Re: Antwort: Re: Tapestry 5 IoC container

2007-10-08 Thread lasitha
Hi Peter, If you just want UserData to be an ASO, there's only one step (in your page/component class): @ApplicationState private UserData userData; You don't need to bind anything. So its actually easier than 'too easy to be true' :). Here's a good starting point: http://tapestry.apache.org/t

RE: does tapestry 4.2 have an iterator component

2007-10-08 Thread Ken nashua
Thanks Bob but I need to span the whole list. Thanks Andy but I how do I cause a for loop to iterate N iterations independent of any collection? I guess I am looking for static iteration independent of any collection. I am inheriting from baseComponent so I am not inclined to do this as a pure

Re: does tapestry 4.2 have an iterator component

2007-10-08 Thread Robert Zeigler
http://java.sun.com/j2se/1.4.2/docs/api/java/util/List.html#subList (int,%20int) http://www.ognl.org/2.6.7/Documentation/html/LanguageGuide/methods.html value="ognl:currentObject"> ... Robert On Oct 8, 2007, at 10/810:22 AM , Ken nashua wrote: martino I am already using the FOR compon

Re: does tapestry 4.2 have an iterator component

2007-10-08 Thread andyhot
What's the problem with using two nested @For then? P.S. Does the jsp example really do what you're describing? Ken nashua wrote: I can whip off a solution in JSP while I am typing... value="ognl:currentObject" index="ognl:index"> <% for ( int i = 0; i < 3; i++) spit

RE: does tapestry 4.2 have an iterator component

2007-10-08 Thread Ken nashua
I can whip off a solution in JSP while I am typing... <% for ( int i = 0; i < 3; i++) spit out ... %> Why is it so hard to do such a fundamental thing in tapestry? Best regards Ken in nashua From: [EMAIL PROTECTED] To: users@tapestry.apache.org Subject: RE: does tapestry

RE: does tapestry 4.2 have an iterator component

2007-10-08 Thread Ken nashua
martino I am already using the FOR component on my list. I have a select component that sets a tableSize at the top of page for a list==100. If tableSize = 10, then I want to render 10 items within a And continue until the list is exhausted. Then I will see 10 rows. Right? FOR does not permi

RE: does tapestry 4.2 have an iterator component

2007-10-08 Thread Ken nashua
Thanks Martino but FOR does not cut it. It blindly iterates a collection from 0..N. I need a component with which I can manipulate the front end starting index and jump out break at a specified numeric index. Example: I have a list of 100 . Now I want to render and show 7 elements and iterat

Re: does tapestry 4.2 have an iterator component

2007-10-08 Thread Martino Piccinato
http://tapestry.apache.org/tapestry4.1/components/general/for.html On 10/8/07, Ken nashua <[EMAIL PROTECTED]> wrote: > > I would like to do some iteration like a true for loop with front, back and > computable boundaries. > > Is there such a component? > > Best regards > Ken in nashua > _

Re: Antwort: Re: Tapestry 5 IoC container

2007-10-08 Thread Peter Stavrinides
Okay so let me get this straight: Step1 bind (it has a default scope of session): binder.bind(UserData.class).withId("DataService") Step2: @Inject private UserData userData_; And that's it?? that seems almost too easy to be true! Kristian Marinkovic wrote: and you can also have services

does tapestry 4.* have an iterator component

2007-10-08 Thread Ken nashua
I would like to do some iteration like a true for loop with front, back and computable boundaries. Is there such a component? Best regards Ken in nashua _ Boo! Scare away worms, viruses and so much more! Try Windows Live OneCare! h

does tapestry 4.2 have an iterator component

2007-10-08 Thread Ken nashua
I would like to do some iteration like a true for loop with front, back and computable boundaries. Is there such a component? Best regards Ken in nashua _ Help yourself to FREE treats served up daily at the Messenger Café. Stop by

Antwort: Re: Tapestry 5 IoC container

2007-10-08 Thread Kristian Marinkovic
and you can also have services withouth an interface binder.bind(UserData.class).withId("DataService") will also work :) Kristian Marinkovic <[EMAIL PROTECTED]> 08.10.2007 14:29 Bitte antworten an "Tapestry users" An "Tapestry users" Kopie Thema Antwort: Re: Tapestry 5 IoC container

Antwort: Re: Tapestry 5 IoC container

2007-10-08 Thread Kristian Marinkovic
in T5 you don't have to define ASOs as in T4 if you want to define and use a ASO you just have to use the @ApplicationState annotation: @ApplicationState private UserData userData; the first access will force the object instantiation with a no-arg constructor. default scope of ASOs (and the onl

Re: Tapestry 5 IoC container

2007-10-08 Thread Peter Stavrinides
Actually I am migrating a lot of code from T4 Typically I have many Pojos used as services like this one: public class UserData implements Serializable { public UserData() { } } This is an ASO session scoped in T4. In T5 in AppModule.java I have added a binder entry: binder.bin

Re: Tapestry 5 IoC container

2007-10-08 Thread Robin Helgelin
On 10/8/07, Peter Stavrinides <[EMAIL PROTECTED]> wrote: > Hi All, > > Sorry if this is a trivial question, I am looking for samples or a > tutorial explaining how to use Tapestry 5 IoC. I have been through the > documentation on site and there are some details I can't figure out. It's easier to h

Tapestry 5 IoC container

2007-10-08 Thread Peter Stavrinides
Hi All, Sorry if this is a trivial question, I am looking for samples or a tutorial explaining how to use Tapestry 5 IoC. I have been through the documentation on site and there are some details I can't figure out. Thanks Peter --

Re: [T4.1.2] stale link on ajax modified form

2007-10-08 Thread Martino Piccinato
just to be precise: customerDetailsForm does contain much more than 0 fields while roleSelect form contains just 1 field. On the ajax request a couple of customerDetailsForm are made visible/invisible (actually I tried both: using "If" that makes them disappear from the DOM and using a component t

[T4.1.2] stale link on ajax modified form

2007-10-08 Thread Martino Piccinato
Hi all, I'm getting this stale link exception when dynamically modifying a form (some combos depending one on each other), I've read about this problem no the list and it seemed to be solved in the new tapestry 4.1 If component, meaning that it should be "form safe". The fact is that I'm not gett

Re: NYSERDA

2007-10-08 Thread Martino Piccinato
On 10/7/07, Ted Steen <[EMAIL PROTECTED]> wrote: > Doing what? > Removing the context I guess... :-) > 2007/10/7, Celia Mou <[EMAIL PROTECTED]>: > > Hi Mark, > > > > Sorry, I guess you still don't have my phone number: (718) 204-0626 > > > > Cell: (917) 299-1208 (usually held by Frank) > > >