Re: breadcrumb trail component

2012-10-29 Thread Dimitris Zenios
https://bitbucket.org/zenios/tapestry-zbreadcrumbs/wiki/Home

On Mon, Oct 29, 2012 at 5:13 PM, Chris Cureau  wrote:
> https://github.com/argoyle/tapestry-breadcrumbs
>
> On Mon, Oct 29, 2012 at 10:10 AM, John  wrote:
>
>> Hi,
>>
>> Is there a component to display a breadcrumb trail at the top of a page so
>> users can navigate site structure they have followed?
>>
>> John

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



Re: email validation stopped working

2012-10-29 Thread Muhammad Gelbana
Did you also check javascript error messages on the browser ? It's usually
logged in the javascript console or something similarly named.

On Mon, Oct 29, 2012 at 10:18 PM, Muhammad Gelbana wrote:

> Any error messages ?
>
> I remember one of v5.3.6 release notes was that it retracted back to an
> older prototype version (1.7 I think). Could this be related ? Are you
> overriding any tapestry validation using a prototype-based client side code
> that could probably break when using an older prototype version ?
>
>
> On Mon, Oct 29, 2012 at 9:23 PM, Jan Fryblik wrote:
>
>> Hi,
>>
>> recently i updated to tapestry 5.3.6 and since than all my email
>> validations
>> don`t work. Other validations work well.
>>
>> I have field like this:
>>
>> > t:validate="required,email" tabindex="2"/>
>>
>> Thank for your help.
>>
>> BR,
>> Honza
>>
>>
>>
>> --
>> View this message in context:
>> http://tapestry.1045711.n5.nabble.com/email-validation-stopped-working-tp5717401.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: email validation stopped working

2012-10-29 Thread Muhammad Gelbana
Any error messages ?

I remember one of v5.3.6 release notes was that it retracted back to an
older prototype version (1.7 I think). Could this be related ? Are you
overriding any tapestry validation using a prototype-based client side code
that could probably break when using an older prototype version ?

On Mon, Oct 29, 2012 at 9:23 PM, Jan Fryblik wrote:

> Hi,
>
> recently i updated to tapestry 5.3.6 and since than all my email
> validations
> don`t work. Other validations work well.
>
> I have field like this:
>
>  t:validate="required,email" tabindex="2"/>
>
> Thank for your help.
>
> BR,
> Honza
>
>
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/email-validation-stopped-working-tp5717401.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
>
>


email validation stopped working

2012-10-29 Thread Jan Fryblik
Hi,

recently i updated to tapestry 5.3.6 and since than all my email validations
don`t work. Other validations work well.

I have field like this:



Thank for your help.

BR,
Honza



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/email-validation-stopped-working-tp5717401.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: Render whole table grid row as a link?

2012-10-29 Thread Lance Java
Something like this:

@MixinAfter
public class RowEvent {
@InjectContainer
private Grid grid;

@Inject
private JavaScriptSupport jss;

@Inject
private ComponentResources componentResrouces;

@Parameter(required=true)
private String event;

public void afterRender(MarkupWriter writer) {
GridDataSource dataSource = grid.getDataSource();
Element tbody = writer.getElement().find("tbody");
List children = tbody.getChildren();
for (int i = 0; i < children.size(); ++i) {
Element tr = (Element) children.get(i);
String rowId = jss.allocateClientId("row");

// give each row an id
tr.attribute("id", rowId); 

// this will be passed as a parameter to the serverside 
event
Object rowContext = dataSource.getRowValue(i);

// this event will bubble up to the containing page / 
component
Link eventLink = 
componentResrouces.createEventLink(event, rowContext);

// observe the 'click' event and fire the eventlink
jss.addScript("Event.observe('%s', 'click', function() {
window.location.href = '%s' })", rowId, eventLink);
}
}
}

Usage:


public void onRowClicked(RowType rowContext) {
   // do stuff
}



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Render-whole-table-grid-row-as-a-link-tp5717388p5717399.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



Make zones always fade in?

2012-10-29 Thread membersound
Hi,

can I make zones to always fade-in? I like the t:update="fade" very much,
but with this of course the zone fades out again on every 2nd click. Can I
enforce to always fade in?



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Make-zones-always-fade-in-tp5717397.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: breadcrumb trail component

2012-10-29 Thread Chris Cureau
https://github.com/argoyle/tapestry-breadcrumbs

On Mon, Oct 29, 2012 at 10:10 AM, John  wrote:

> Hi,
>
> Is there a component to display a breadcrumb trail at the top of a page so
> users can navigate site structure they have followed?
>
> John


breadcrumb trail component

2012-10-29 Thread John
Hi,

Is there a component to display a breadcrumb trail at the top of a page so 
users can navigate site structure they have followed?

John

Re: Render whole table grid row as a link?

2012-10-29 Thread Lance Java
This might be best handled by a mixin to the grid. The mixin would:
1. Add an id to each row in the html table markup
2. Generate an event URL for each row using
ComponentResources.createEventLink();
3. Attach an observer to each row (using the row id) which listens to the
"click" event and fires the event URL.



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Render-whole-table-grid-row-as-a-link-tp5717388p5717393.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



Why is ajaxRenderer needed for zone update?

2012-10-29 Thread membersound
Why do I need a ajaxResponseRenderer within my backing class, when I want to
update a zone?
Eg: having a table with all users, and when clicking a user I want to update
another table which shows the address of the selected user. Now I have to:
-create a zone with the address table grid, and place it into a zone
-trigger that zone from an eventlink or pagelink within the main table
-make ajaxResponseRenderer for that eventlink in the backing class.

Question: Why do I need this ajax response in backing? Because I'm already
updating the user object by user.id that is given in context on eventLink
click. So why is it no sufficient to just update the zone from the tml
frontend?


${user.username}


 


 



class UserPage{
@Property
boolean isSelectUsername;

User user;

void onSelectUsername(Long id) {
isSelectUsername = true;
user = dao.find(id);
ajaxResponseRenderer.addRender("userprofile", userprofile);
}   
}





--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Why-is-ajaxRenderer-needed-for-zone-update-tp5717391.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: DAO is always null??

2012-10-29 Thread Lenny Primak
Ha. Learn something new every day :)

On Oct 29, 2012, at 6:27 AM, "Thiago H de Paula Figueiredo" 
 wrote:

> On Sun, 28 Oct 2012 19:08:23 -0200, Lenny Primak  
> wrote:
> 
>> UserService must be a Tapestry service in a Tapestry-controlled package for 
>> @Inject to work. It probably isn't.
> 
> Actually, Tapestry services can be in any package (except the default one, of 
> course). There are no controlled pages for services. UserService must be a 
> Tapestry service declared in a module class (AppModule, for example).
> 
> -- 
> Thiago H. de Paula Figueiredo
> 
> -
> 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: Testing Tapestry without Seleinum

2012-10-29 Thread mbrooks
Oh man, I wish I was using jQuery.  It's a component that lives in ProtoType. 
Might be why Selenium is choking on it >.<

Though, that's a good idea to see if I can't just set those values and still
use Selenium.
Thanks!




--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Testing-Tapestry-without-Seleinum-tp5717383p5717390.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



Render whole table grid row as a link?

2012-10-29 Thread membersound
Hi,

is it possible to just make a whole row of a table grid clickable?
I know how to apply a t:pagelink to the text of a specific entry. But for
this the link is only executed if I click on the text directly. How can I
just click somewhere on that row?

Or is this ever possible?
Thanks



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Render-whole-table-grid-row-as-a-link-tp5717388.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: Testing Tapestry without Seleinum

2012-10-29 Thread mbrooks
Right. Except that Selenium keeps freezing whenever I try to get it to move a
slider. It works great for all the other components and I don't have time to
keep trying to drive a square peg into a round hole.

Just because something is supposed to work doesn't mean it always will.
I'd rather just try to test this outside of Selenium.



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Testing-Tapestry-without-Seleinum-tp5717383p5717387.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: Testing Tapestry without Seleinum

2012-10-29 Thread Chris Poulsen
Replace @Property with getter/setter for the property?

-- 
Chris

On Mon, Oct 29, 2012 at 2:09 PM, mbrooks  wrote:
> So I have a fairly complicated page that has a slider that filters by a date
> range.  It gets all entries whose copyright dates fall in between the min
> and max years.
>
> I've tried like mad to figure out how to get the slider to activate properly
> with Selenium and everything that was suggested online ended up hanging
> Selenium and didn't work.
>
> I then started looking to test this functionality outside of Selenium, but
> since the parameters that I am dealing with are marked @Property
> (copyrightMax, copyrightMin), my test class doesn't have any way to set
> these two values - which would allow me to circumvent using Selenium to set
> them via the slider).
>
> Has anyone out there tried testing a page outside of Selenium?
> If so, how did you set something that is marked @Property?
>
> Thanks!
> Melanie
>
>
>
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/Testing-Tapestry-without-Seleinum-tp5717383.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



Testing Tapestry without Seleinum

2012-10-29 Thread mbrooks
So I have a fairly complicated page that has a slider that filters by a date
range.  It gets all entries whose copyright dates fall in between the min
and max years.

I've tried like mad to figure out how to get the slider to activate properly
with Selenium and everything that was suggested online ended up hanging
Selenium and didn't work.

I then started looking to test this functionality outside of Selenium, but
since the parameters that I am dealing with are marked @Property
(copyrightMax, copyrightMin), my test class doesn't have any way to set
these two values - which would allow me to circumvent using Selenium to set
them via the slider).

Has anyone out there tried testing a page outside of Selenium?
If so, how did you set something that is marked @Property?

Thanks!
Melanie



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Testing-Tapestry-without-Seleinum-tp5717383.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: Retain BeanModel when sorting columns?

2012-10-29 Thread membersound
Ok I will stick to this.

Anyhow, concerning my latest question: how could I display the size of a
list contained in my user object? Because I cannot just add the property to
the bean model like "list.size"...



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Retain-BeanModel-when-sorting-columns-tp5717374p5717382.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



Date is not parseable

2012-10-29 Thread Andrew Dahl


Not sure why I am getting this error when submitting a form that 
contains a datefield.


   Date value '10/10/2012' is not parseable.

Here is the tml entry:

  clientId="id"/>


and here is the relevant part from the page file:

public DateFormat getDateFormat(){
return DateFormat.getDateInstance(DateFormat.MEDIUM, 
locale);//dateFormat;

}

It displays correctly when the page is loaded, but not if I select from 
the calendar popup.


--
Andrew Dahl
Venses Software Foundation
614.325.4523


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



Re: Retain BeanModel when sorting columns?

2012-10-29 Thread Dragan Sahpaski

On 29.10.2012 12:51, membersound wrote:

OK I see. I'm doing it with BeanModelSource based on this example:
http://jumpstart.doublenegative.com.au/jumpstart/examples/tables/gridmodel1


Would you recommend me switching to a GridDataSource in my page class for
providing the data instead of a list and a BeanModel? Especially regarding
to the following example case:
So the List is the GridDataSource in your case. This is a fine example 
of tapestry "magic". Tapestry coerces the List to a GridDataSource. Read 
about Type Coercion here http://tapestry.apache.org/type-coercion.html. 
See full list of coercions tapestry provides here 
http://tapestry.apache.org/typecoercer-service.html. the coercion I 
mentioned is documented in the page like this

java.util.Collection --> org.apache.tapestry5.grid.GridDataSource

If you want to persist you data just use @Persist on the list and don't 
recreate the list each time the grid is rendered (for example in 
setupRender).




Image a User object with a list. I later want to display the user, and the
size of the list.
I tried the following, which does not work obviously but you get the idea:


BeanModel model;
model.add("products count", PropertyConduitSource.create(User.class,
"products.size()"));

class User {
List products;
}



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Retain-BeanModel-when-sorting-columns-tp5717374p5717379.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: Retain BeanModel when sorting columns?

2012-10-29 Thread membersound
OK I see. I'm doing it with BeanModelSource based on this example:
http://jumpstart.doublenegative.com.au/jumpstart/examples/tables/gridmodel1


Would you recommend me switching to a GridDataSource in my page class for
providing the data instead of a list and a BeanModel? Especially regarding
to the following example case:

Image a User object with a list. I later want to display the user, and the
size of the list.
I tried the following, which does not work obviously but you get the idea:


BeanModel model;
model.add("products count", PropertyConduitSource.create(User.class,
"products.size()"));

class User {
List products;
}



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Retain-BeanModel-when-sorting-columns-tp5717374p5717379.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: DAO is always null??

2012-10-29 Thread Thiago H de Paula Figueiredo
On Sun, 28 Oct 2012 19:08:23 -0200, Lenny Primak   
wrote:


UserService must be a Tapestry service in a Tapestry-controlled package  
for @Inject to work. It probably isn't.


Actually, Tapestry services can be in any package (except the default one,  
of course). There are no controlled pages for services. UserService must  
be a Tapestry service declared in a module class (AppModule, for example).


--
Thiago H. de Paula Figueiredo

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



Re: Inject managed beans?

2012-10-29 Thread Thiago H de Paula Figueiredo

On Sun, 28 Oct 2012 11:06:23 -0200, membersound  wrote:


What is the T5 equivalent to the following JSF?


The closes thing to a JSF managed bean is page classes, but with the  
requirement that every page class has exactly one template and vice-versa.  
Don't try to learn Tapestry using JSF concepts: they're too different. For  
example, the request scope in Tapestry doesn't exist because there's no  
need for it: with a 1:1 relationship between page classes and templates  
(also between components and templates), in a template, you always know  
where the data comes from (the corresponding class).


--
Thiago H. de Paula Figueiredo

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



Re: Retain BeanModel when sorting columns?

2012-10-29 Thread Thiago H de Paula Figueiredo

On Mon, 29 Oct 2012 08:35:51 -0200, membersound  wrote:


@Property
@Persist
private BeanModel model;

void setupRender() {
this.model = beanModelSource.createDisplayModel(User.class, messages);
  this.model.add("...).sortable(true);
}


Result: everytime I sort, the db-fetch is triggered.

How can I persist the beanmodel data and just sort without refetching  
data?


It seems to me you're thinking there's a single issue in your message, but  
there are two. BeanModel doesn't know anything about data. Data is  
GridDataSource's resposibility. BeanModel is just about properties and  
what is shown or edited in BeanEditor, BeanEditModel, BeanDisplay and  
Grid. Your @Persist in BeanModel doesn't make sense in the code above, as  
you're recreating the model every render and as it doesn't hold data. If  
you want to sort without refetching data, you should implement that in a  
GridDataSource implementation or fetch all the data into a list, use it as  
the source parameter and @Persist it.


--
Thiago H. de Paula Figueiredo

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



Re: Retain BeanModel when sorting columns?

2012-10-29 Thread Dragan Sahpaski

Can we have the full code?
You are probably talking about a grid. The grid data is in the 
GridDataSource not in the BeanModel.
Anyway. If you have a Hibernate like GridDataSource I wouldn't recommend 
persisting it because the sort should be done using SQL "order by" so 
persisting would imply you should fetch the entire data set etc.


On 29.10.2012 11:35, membersound wrote:

@Property
@Persist
private BeanModel model;

void setupRender() {
this.model = beanModelSource.createDisplayModel(User.class, messages);
  this.model.add("...).sortable(true);
}


Result: everytime I sort, the db-fetch is triggered.

How can I persist the beanmodel data and just sort without refetching data?



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Retain-BeanModel-when-sorting-columns-tp5717374.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



Retain BeanModel when sorting columns?

2012-10-29 Thread membersound
@Property
@Persist
private BeanModel model;

void setupRender() {
this.model = beanModelSource.createDisplayModel(User.class, messages);
  this.model.add("...).sortable(true);
}


Result: everytime I sort, the db-fetch is triggered.

How can I persist the beanmodel data and just sort without refetching data?



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Retain-BeanModel-when-sorting-columns-tp5717374.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: Quick way of showing embedded object properties?

2012-10-29 Thread membersound
That looks quite nice, but do you know where I could find some tynamo
examples on this?
I could not find any on the page itself...



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Quick-way-of-showing-embedded-object-properties-tp5717357p5717371.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: Quick way of showing embedded object properties?

2012-10-29 Thread membersound
That looks quite nice, but do you know where I could find some tynamo
examples on this?
I could not find any on the page itself...



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Quick-way-of-showing-embedded-object-properties-tp5717357p5717370.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: Inject managed beans?

2012-10-29 Thread membersound
OK thanks I see.

Yes it was not a good example, probably I should rather be injecting a
service here.



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Inject-managed-beans-tp5717346p5717369.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