[GSOC 2010] GMaps Component

2010-07-18 Thread Pablo dos Reis
Hi everyone,


I intend to create components that encapsulate some features of Maps
Javascript API v3
The goal is allow the user have facilities to use maps like this [0].

I intend implement the features:

   - Geocoding
   - Markers
   - MapType
   - Add/Remove Controls
   - Size
   - Route


Project:

I' m thinking in create one base component and more two components, one to
map routes and another to find adresses and insert markers.

The base component will have features to: Geocoding, Add/Remove Controls,
Size and others.



What do you think about?


[0]
http://gmaps-samples.googlecode.com/svn/trunk/simplewizard/makestaticmap.html
[1]
http://code.google.com/intl/en/apis/maps/documentation/javascript/basics.html-
Maps JavaScript API v3

-- 
Pablo Henrique dos Reis


Re: t:grid, inPlace and rowIndex

2010-07-18 Thread Thiago H. de Paula Figueiredo
On Sun, 18 Jul 2010 18:58:34 -0300, Jim O'Callaghan  
 wrote:


Ideally what I wanted from the grid is an index / ref that survives  
sorting (though has predictable behavior for additions / deletions) so  
it can be used for a get(index) on the source list -


In this case, as was suggested before, you probably are best served with a  
custom GridDataSource implementation. Remember that the source parameter  
of Grid isn't List, is GridDataSource, so probably what you're asking  
wouldn't make a lot of sense to be added to Grid itself.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



RE: t:grid, inPlace and rowIndex

2010-07-18 Thread Jim O'Callaghan
Thanks Ville, that's very helpful.  I think I'll just stick with my known 
object ref as the key and do a match on the list through iteration - saves some 
messing about.  Ideally what I wanted from the grid is an index / ref that 
survives sorting (though has predictable behavior for additions / deletions) so 
it can be used for a get(index) on the source list - something like an 
originalIndex as opposed to a currentDisplayContextIndex - I'm would guess 
augmenting the model with that would be trivial but I'm aware these are general 
purpose components and can't really be expected to fit every specific 
requirement.  In my case the object refs are a compound key, and when passed 
through an activation context require coercion, and then a check using 
key.equals(otherKey) per list entry until matched, which is just a few extra 
cpu cycles I could ideally get rid of.  As you say the cost shouldn't be too 
much.  The map backed grid seems too much square peg round hole for me.  Thanks 
for the suggestions all the same.

Regards,
Jim.

-Original Message-
From: Ville Virtanen [mailto:ville.virta...@cerion.fi] 
Sent: 18 July 2010 17:56
To: users@tapestry.apache.org
Subject: RE: t:grid, inPlace and rowIndex


Hi,

you can calculate the exact index of the row by injecting the grid to the
page and calculating it by using methods (getRowsPerPage() x
getCurrentPage()) + index.
(http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry5/corelib/components/Grid.html)

The index of course changes when you reorder the list. Also, this index
should be updated when doing inPlace update as the index changes depending
in which place you insert the new row.

Should the list that contains the entities be a map instead? (Map) You may have to implement your own GridDataSource that uses the
map, as there is no automatic wrapping for that datatype. (See:
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/grid/CollectionGridDataSource.java?revision=964086&view=markup
for reference implementation for collections.)

The cost to iterate the list when doing deletes shouldn't be that much
performance wise - and if you have so many entities that the cost is too
much you should consider implementing special GridDataSource anyway.

 - Ville

jc1001 wrote:
> 
> Hi Thiago,
> 
> I've tried that - but the index is the position within the current 'page'
> of entries in the grid, i.e. zero is the first entry on page one, and also
> on page 2 etc., but also, the inPlace method won't work as the index can't
> be updated because some render phase is skipped.  I guess what I'm looking
> for is some initial index position within the grid (list) entries that is
> not updated during sorting, and so has no need to be updated during an
> inPlace update.
> 
> Regards,
> Jim.
> 
> -Original Message-
> From: Thiago H. de Paula Figueiredo [mailto:thiag...@gmail.com] 
> Sent: 15 July 2010 22:49
> To: Tapestry users
> Subject: Re: t:grid, inPlace and rowIndex
> 
> On Thu, 15 Jul 2010 18:25:03 -0300, Jim O'Callaghan  
>  wrote:
> 
>> I'm using the grid to display a selection where one of the cells is an
>> ActionLink that currently passes the entity key for use in a detail  
>> screen> for via the context,
> 
> Have yout tried passing the index as the context for your ActionLink?
> 
> -- 
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
> and instructor
> Owner, Ars Machina Tecnologia da Informa??o Ltda.
> http://www.arsmachina.com.br
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/t%3Agrid%2C-inPlace-and-rowIndex-tp29177730p29198096.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Ok, really dumb questions about ioc scopes...

2010-07-18 Thread Thiago H. de Paula Figueiredo
On Fri, 16 Jul 2010 22:35:03 -0300, Christian Gruber  
 wrote:


(that last message came out a little cattier than I meant, Thiago.   
Sorry)


No problem, Christian. :)

--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



RE: t:grid, inPlace and rowIndex

2010-07-18 Thread Ville Virtanen

Hi,

you can calculate the exact index of the row by injecting the grid to the
page and calculating it by using methods (getRowsPerPage() x
getCurrentPage()) + index.
(http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry5/corelib/components/Grid.html)

The index of course changes when you reorder the list. Also, this index
should be updated when doing inPlace update as the index changes depending
in which place you insert the new row.

Should the list that contains the entities be a map instead? (Map) You may have to implement your own GridDataSource that uses the
map, as there is no automatic wrapping for that datatype. (See:
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/grid/CollectionGridDataSource.java?revision=964086&view=markup
for reference implementation for collections.)

The cost to iterate the list when doing deletes shouldn't be that much
performance wise - and if you have so many entities that the cost is too
much you should consider implementing special GridDataSource anyway.

 - Ville

jc1001 wrote:
> 
> Hi Thiago,
> 
> I've tried that - but the index is the position within the current 'page'
> of entries in the grid, i.e. zero is the first entry on page one, and also
> on page 2 etc., but also, the inPlace method won't work as the index can't
> be updated because some render phase is skipped.  I guess what I'm looking
> for is some initial index position within the grid (list) entries that is
> not updated during sorting, and so has no need to be updated during an
> inPlace update.
> 
> Regards,
> Jim.
> 
> -Original Message-
> From: Thiago H. de Paula Figueiredo [mailto:thiag...@gmail.com] 
> Sent: 15 July 2010 22:49
> To: Tapestry users
> Subject: Re: t:grid, inPlace and rowIndex
> 
> On Thu, 15 Jul 2010 18:25:03 -0300, Jim O'Callaghan  
>  wrote:
> 
>> I'm using the grid to display a selection where one of the cells is an
>> ActionLink that currently passes the entity key for use in a detail  
>> screen> for via the context,
> 
> Have yout tried passing the index as the context for your ActionLink?
> 
> -- 
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
> and instructor
> Owner, Ars Machina Tecnologia da Informa��o Ltda.
> http://www.arsmachina.com.br
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/t%3Agrid%2C-inPlace-and-rowIndex-tp29177730p29198096.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Help me! How can i access a service in tapestry5 .

2010-07-18 Thread Josh Canfield
> I want that when i click the bar, i want to go to another
> tapestry page with parameters.

Check out PageRenderLinkSource 

http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry5/services/PageRenderLinkSource.html#createPageRenderLinkWithContext(java.lang.String,%20java.lang.Object...)

-- Josh

On Jul 18, 2010, at 7:19 AM, micheal822  wrote:

> 
> There is a project i have being doing recently. And now I have a big
> problem, hope you help me,thanks.
> I have to draw bar chart in a html page, the situation is that the bar
> chart is drawed by javascript, and the javascript code is produced by an
> action listener. I want that when i click the bar, i want to go to another
> tapestry page with parameters. The question is that how can i access the
> tapestry service with tag A(such as 
> http://localhost:8080/app?service=someservice aaa  in tapestry 4),just like
> when i click an ActionLink component, it can trigger an Action method.
> 
> -- 
> View this message in context: 
> http://old.nabble.com/Help-me%21-How-can-i-access-a-service-in-tapestry5-.-tp29197261p29197261.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Help me! How can i access a service in tapestry5 .

2010-07-18 Thread micheal822

 There is a project i have being doing recently. And now I have a big
problem, hope you help me,thanks.
 I have to draw bar chart in a html page, the situation is that the bar
chart is drawed by javascript, and the javascript code is produced by an
action listener. I want that when i click the bar, i want to go to another
tapestry page with parameters. The question is that how can i access the
tapestry service with tag A(such as 
http://localhost:8080/app?service=someservice aaa  in tapestry 4),just like
when i click an ActionLink component, it can trigger an Action method.

-- 
View this message in context: 
http://old.nabble.com/Help-me%21-How-can-i-access-a-service-in-tapestry5-.-tp29197261p29197261.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org