Re: How to sort Association column in Grid?

2012-12-11 Thread karans
Thank you soo much  for the responce  .



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/How-to-sort-Association-column-in-Grid-tp5718569p5718625.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: Bean Editor class cast issue method access issue

2012-12-11 Thread Ken in Nashua

Hi Jens,

I found out what the "mb:bean" notation is... its just a custom binding

In tapestry we can specify such notations "prop:myProperty"

In this case... the framework I am using TYNAMO implements a new binding called 
ModelBinding and it gets facilitated by a ModelBindingFactory.

package org.tynamo.bindings;

public class ModelBindingFactory extends PropBindingFactory implements 
BindingFactory
{

public ModelBindingFactory(PropertyConduitSource propertyConduitSource, 
StringInterner interner)
{
super(propertyConduitSource, interner);
}

@Override
public Binding newBinding(String description, ComponentResources container, 
ComponentResources component,
  String expression, Location location)
{
return new ModelBinding(super.newBinding(description, container, 
component, expression, location));
}
}

public class ModelBinding implements Binding
{
private final Binding binding;

public ModelBinding(Binding binding)
{
this.binding = binding;
}

public Class getBindingType()
{
Object object = binding.get();
if (object == null) throw new NullPointerException("ModelBinding's 
value can't be null!");
return object.getClass();
}

public Object get()
{
return binding.get();
}

public void set(Object value)
{
binding.set(value);
}

public boolean isInvariant()
{
return binding.isInvariant();
}

public  T getAnnotation(Class tClass)
{
return binding.getAnnotation(tClass);
}
}
  

Re: Component that displays additional "containing Page" markup

2012-12-11 Thread Taha Siddiqi
Hi Bogdan

No sure if I understand you question correctly. From what I understand you can 
use block parameters or 

regards
Taha

On Dec 12, 2012, at 10:22 AM, bogdan_cm wrote:

> Hello everyone, 
>   How can I allow "Page" information to be part of the component markup
> output? Take for example the zone component: 
>--> component 
>  this is the time on day ${timeOfDay}  -> this value comes from the Page
> containing the component
> 
> 
> When I write my own component, how can I pass additional "data" to be
> included in the rendering of this component?
> 
> I would like to write:
> 
>  maybe a loop here that would read a list in the Page containing the
> component, and display it. 
> 
> 
> 
> Thank you, 
> Bogdan. 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/Component-that-displays-additional-containing-Page-markup-tp5718622.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
> 



Component that displays additional "containing Page" markup

2012-12-11 Thread bogdan_cm
Hello everyone, 
   How can I allow "Page" information to be part of the component markup
output? Take for example the zone component: 
   --> component 
  this is the time on day ${timeOfDay}  -> this value comes from the Page
containing the component


When I write my own component, how can I pass additional "data" to be
included in the rendering of this component?

I would like to write:

  maybe a loop here that would read a list in the Page containing the
component, and display it. 



Thank you, 
Bogdan. 









--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Component-that-displays-additional-containing-Page-markup-tp5718622.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: [5.3.6] A homepage instead of "Index"

2012-12-11 Thread Dusko Jovanovski
Try overriding the SymbolConstants.START_PAGE_NAME symbol.


On Tue, Dec 11, 2012 at 10:55 PM, Muhammad Gelbana wrote:

> I'm not sure if that's a usual requirement but here it is. I need to have
> another page as a default homepage instead of the "Index" page. I can do
> that by returning the page I need from an "Index" page method that handles
> @SetupRender or @OnEvent(value=EventConstants.Activate) events, I'm not
> quire sure at the moment but I'll look that up.
>
> The question is, can this be done without redirecting the user after
> visiting the Index page ? More like having the page I desire as the default
> home page instead of Index ?
>
> Also the tricky part is that I may have this page in a module (here is an
> idea about what I
> mean >).
> So when that module *isn't* in the classpath, the "Index" page will be
> displayed as usual.
>
> Thank you.
>


[5.3.6] A homepage instead of "Index"

2012-12-11 Thread Muhammad Gelbana
I'm not sure if that's a usual requirement but here it is. I need to have
another page as a default homepage instead of the "Index" page. I can do
that by returning the page I need from an "Index" page method that handles
@SetupRender or @OnEvent(value=EventConstants.Activate) events, I'm not
quire sure at the moment but I'll look that up.

The question is, can this be done without redirecting the user after
visiting the Index page ? More like having the page I desire as the default
home page instead of Index ?

Also the tricky part is that I may have this page in a module (here is an
idea about what I
mean).
So when that module *isn't* in the classpath, the "Index" page will be
displayed as usual.

Thank you.


Re: Tapestry-Portlet status?

2012-12-11 Thread François Facon
Hello Thilo,

You are right. we have to fix that.
Could you open an issue at https://github.com/got5/tapestry5-portlet/issues?

Thank you for the feedback.
Freundlich grüßt
François


2012/12/11 Thilo Brüßhaber :
> Hello François,
> I'm working successfuly with tapestry5-portlet (maint-5.3) on Liferay 6.1.x.
> The only issue for me is when returning a StreamResponse I cannot set
> any HTTP headers in the response.
> StreamResponse.prepareResponse() is called, but the headers, e.g.
> "Content-Disposition" are not send to the client.
> Have you got this already working? Am I missing something?
>
> Thank you in advance,
> Thilo

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



Re: Exception constructing service 'ValueEncoderSource'

2012-12-11 Thread Lance Java
The tapestry-hibernate module provides ValueEncoders for all hibernate
entities. If you want to override the ValueEncoders provided by
tapestry-hibernate, you should use override() instead of add().

eg:
   configuration.override(Librarian.class, librarianFactory);
   configuration.override(Reader.class, readerFactory); 





--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Exception-constructing-service-ValueEncoderSource-tp5718610p5718613.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: Exception constructing service 'ValueEncoderSource'

2012-12-11 Thread Thiago H de Paula Figueiredo
Are you using tapestry-hibernate? If yes, it already creates the  
ValueEncoder's for your entity classes.


On Tue, 11 Dec 2012 15:17:48 -0200, Borko Djurovic  
 wrote:



I have two value encoders: LibrarianEncoder and ReaderEncoder.

*LibrarianEncoder.java*
@SuppressWarnings("rawtypes")
public class LibrarianEncoder implements ValueEncoder {
private Session session;

public LibrarianEncoder(Session session) {
this.session = session;
}

public String toClient(Object arg0) {
return ((Librarian)arg0).getId().toString();
}

public Object toValue(String arg0) {
return session.load(Librarian.class, new Long(arg0));
}
}

Seccond Encoder is like this one.

*AppModule.java*
@SuppressWarnings("rawtypes")
public static void contributeValueEncoderSource(
MappedConfiguration 
configuration,
@InjectService("session") final Session session) {

ValueEncoderFactory librarianFactory = new 
ValueEncoderFactory() {
public ValueEncoder create(Class arg0) {
return new LibrarianEncoder(session);
}
};

ValueEncoderFactory readerFactory = new ValueEncoderFactory() {
public ValueEncoder create(Class arg0) {
return new ReaderEncoder(session);
}
};
configuration.add(Librarian.class, librarianFactory);
configuration.add(Reader.class, readerFactory);
}

The problem is that i have conflict:
 Exception constructing service 'ValueEncoderSource': Error invoking  
service

builder method
org.apache.tapestry5.services.TapestryModule.buildValueEncoderSource(Map,
InvalidationEventHub) (at TapestryModule.java:2287) (for service
'ValueEncoderSource'): Error invoking service contribution method
com.fit.library.services.AppModule.contributeValueEncoderSource(MappedConfiguration,
Session): Service contribution (to service 'ValueEncoderSource')  
conflicts

with existing contribution (by
org.apache.tapestry5.hibernate.HibernateModule.contributeValueEncoderSource(MappedConfiguration,
boolean, HibernateSessionSource, Session, TypeCoercer, PropertyAccess,
LoggerSource) (at HibernateModule.java:89)).

How to resolve this?



--
View this message in context:  
http://tapestry.1045711.n5.nabble.com/Exception-constructing-service-ValueEncoderSource-tp5718610.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




--
Thiago H. de Paula Figueiredo

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



Exception constructing service 'ValueEncoderSource'

2012-12-11 Thread Borko Djurovic
I have two value encoders: LibrarianEncoder and ReaderEncoder.

*LibrarianEncoder.java*
@SuppressWarnings("rawtypes")
public class LibrarianEncoder implements ValueEncoder {
private Session session;

public LibrarianEncoder(Session session) {
this.session = session;
}

public String toClient(Object arg0) {
return ((Librarian)arg0).getId().toString();
}

public Object toValue(String arg0) {
return session.load(Librarian.class, new Long(arg0));
}
}

Seccond Encoder is like this one. 

*AppModule.java*
@SuppressWarnings("rawtypes")
public static void contributeValueEncoderSource(
MappedConfiguration 
configuration,
@InjectService("session") final Session session) {

ValueEncoderFactory librarianFactory = new 
ValueEncoderFactory() {
public ValueEncoder create(Class arg0) {
return new LibrarianEncoder(session);
}
};

ValueEncoderFactory readerFactory = new ValueEncoderFactory() {
public ValueEncoder create(Class arg0) {
return new ReaderEncoder(session);
}
};
configuration.add(Librarian.class, librarianFactory);
configuration.add(Reader.class, readerFactory);
}

The problem is that i have conflict: 
 Exception constructing service 'ValueEncoderSource': Error invoking service
builder method
org.apache.tapestry5.services.TapestryModule.buildValueEncoderSource(Map,
InvalidationEventHub) (at TapestryModule.java:2287) (for service
'ValueEncoderSource'): Error invoking service contribution method
com.fit.library.services.AppModule.contributeValueEncoderSource(MappedConfiguration,
Session): Service contribution (to service 'ValueEncoderSource') conflicts
with existing contribution (by
org.apache.tapestry5.hibernate.HibernateModule.contributeValueEncoderSource(MappedConfiguration,
boolean, HibernateSessionSource, Session, TypeCoercer, PropertyAccess,
LoggerSource) (at HibernateModule.java:89)).

How to resolve this?



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Exception-constructing-service-ValueEncoderSource-tp5718610.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: any neat egg timer or similar animated icon for waiting?

2012-12-11 Thread Thiago H de Paula Figueiredo
On Tue, 11 Dec 2012 14:52:33 -0200, Lenny Primak   
wrote:



The tree component has one,
But I don't have a clue how to use it in your own component.
Anyone has any ideas?


Actually, it's easy. Just two steps:

1) Write some JavaScript that shows something (a spinner, modal window,  
etc) when the search button is clicked.


2) Write some JavaScript that hides this something when the zone is  
updated (Tapestry.ZONE_UPDATED_EVENT).


--
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: any neat egg timer or similar animated icon for waiting?

2012-12-11 Thread Lenny Primak
The tree component has one,
But I don't have a clue how to use it in your own component. 
Anyone has any ideas?

On Dec 11, 2012, at 10:00 AM, "John"  wrote:

> I'm looking for a simple component that animates when a user presses search 
> button and waits for the server to return rows and refresh a page zone then 
> stops playing.
> 
> Anything out there I can use out of the box? I guess this is pretty trivial 
> to create anyway, but every minute counts.
> 
> TIA
> John

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



RE: Bean Editor class cast issue method access issue

2012-12-11 Thread Ken in Nashua

Thanks Jens,

It appears the default edit page for the framework operates an object.

Subsequent customizations means to cut/paste new edit page for the pojo in 
question... CoachEdit.tml default being Edit.tml

I think I will go from there and see what gives.

- cheers
Ken
  

Validation issue with Tapestry 4

2012-12-11 Thread SAMPY
I have got few simple IformComponent elements in a page. But the page
contains some of dynamic components, those again have some IformComponent
fields.

How can I delegate validation messages in that case.

Let me show with an example.





where this PaymentSelection is component, that renders the html dynamically.

Validation Java Code :

FormBean bean = this.getHotelsFormBean();
IValidationDelegate delegate = this.getValidationDelegate();

boolean isValid = super.validateForm(bean, delegate);

try {
if(Utils.isNullOrEmpty(bean.getHotelName())) {
String message = this.getMessages().getMessage("bb_ERR5");
this.error(delegate, (IFormComponent)
this.getComponent("hotelName"), message,
   ValidationConstraint.REQUIRED);
isValid = false;
}


 message =  this.getMessage("valid", new String[] { "cardnum" });
 this.error(delegate, (IFormComponent)
this.getComponent("paymentSelectionComponent").getComponent("code"),
message,
 ValidationConstraint.REQUIRED);
isValid = false;
break;

In general, it delegates the error message for hotel fields(that hotel name
not given sort of message), but it doesn't  delegate the dynamic
component(PaymentSelection) error message with above message.



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Validation-issue-with-Tapestry-4-tp5718593.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: Bean Editor class cast issue method access issue

2012-12-11 Thread Thiago H de Paula Figueiredo
On Mon, 10 Dec 2012 22:22:47 -0200, Ken in Nashua   
wrote:



Thanks Thiago...


Hi, Ken!


yes Person is a superclass to Coach

the mb: binding... well the tynamo guys did that.

I had hoped one of them might comment on it... Kalle or Alejandro

it woul be nice... because I got no clue what it is either.


As you don't know what it does, why don't you try without it (i.e. using  
the prop binding)? As you don't know what the mb binding does, you can't  
be sure it's returning a Coach instead of an Object.


--
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: Using Tapestry? Feedback on devrates.com is always welcome!

2012-12-11 Thread Stephan Windmüller
On 11.12.2012 09:13, Stephan Windmüller wrote:

> The link is returning an error: "502 Bad Gateway"

Okay, seems that was a temporary problem.

- Stephan




smime.p7s
Description: S/MIME Kryptografische Unterschrift


Re: Tapestry-Portlet status?

2012-12-11 Thread Thilo Brüßhaber
Hello François,
I'm working successfuly with tapestry5-portlet (maint-5.3) on Liferay 6.1.x.
The only issue for me is when returning a StreamResponse I cannot set
any HTTP headers in the response.
StreamResponse.prepareResponse() is called, but the headers, e.g.
"Content-Disposition" are not send to the client.
Have you got this already working? Am I missing something?

Thank you in advance,
Thilo

2012/10/17 François Facon :
> You are right bob. Keep It Simple and Smart.
>
>
> 2012/10/17 Bob Harner :
>> It seems to be an increasingly common view in the last couple of years
>> is that portals/portlets are an outdated view technology, with the
>> better, more modern approach being client-side logic with Ajax. I, for
>> one, am glad to have left the portal world behind.
>>
>> On Wed, Oct 17, 2012 at 12:00 PM, Lenny Primak  
>> wrote:
>>> Thank you François,  this sums it up really well for me.
>>>
>>> On Oct 17, 2012, at 5:37 AM, François Facon  wrote:
>>>
 Lenny,

 Everytime someone from Atos ask me this question,
 I answer "yes for liferay".
 As we have already numbers of portlet deploy in this portlet
 container, we haven't see any limitation from now.

 For other portlet container, I am pretty sure this bridge will work
 fine as long as the portlet container implements MARKUP_HEADER. This
 will avoid adding any js twice for any portal page that use more than
 one portlet instance.

 Regarding your needs.
 Portlet Containers have the following avantages:
 + content aggregation (you will be able to mix content that come any
 web framework )
 + use features provided by the container (cms, workflow, user management 
 etc..)
 + personnalization made easy by drag and drop

 and the following disavantage
 - in order to work inside a portlet container you need the bridge have
 to generate dirty url. so url rewriting have to be manage by portal.
 - cache, user management, has also to be managed by the portal
 - portal introduce overhead 20% mem and cpu
 - you will need trainning  in order to well manage your portal and you
 will have to train your users to avoid disaster.


 2012/10/17 Lenny Primak :
> François,
> Do you think that got5-portlet is ready to use in production?
> Thanks.
>
>
>
> On Oct 16, 2012, at 2:12 PM, François Facon  
> wrote:
>
>> Hi Markus,
>>
>> Your experience in developping portlet with tapestry is very interesting.
>>
>> Currently, we return  PortletRenderable object and PortalPage object
>> to display another tapestry page in the current portlet or to request
>> the portlet container to redirect the user to another page of the
>> portlet container. did you try to use those object during an
>> activation phase whithout success?
>>
>> About returning stream response during activation,  I can't see the
>> related usage.
>> could you give more details about that point?
>>
>> Freundlich grüßt
>> François
>>
>> 2012/10/16 Markus Feindler :
>>> Hm, it's hard to say since there are some basic features which don't
>>> function in the "bridge" (like returning a page or stream response in
>>> onactivate).
>>>
>>> I wouldn't recommend using it.
>>>

  Original-Nachricht 
 Datum: Tue, 16 Oct 2012 11:09:59 -0400
 Von: Lenny Primak 
 An: "Tapestry users" 
 Betreff: Re: Tapestry-Portlet status?

   Thanks, I know it exists, but not sure it's ready for
 production use,
 hence the question if T5-portlet is something I should be using in
 production

 On Oct 16, 2012, at 10:56 AM, Lenny Primak wrote:

> I heard something about Tapestry supporting the Portlet spec.
> Is Tapestry going to support it out of the box or is Tapestry-Portlet
 ready to use in production?


 -
 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
>
> -
> 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: Bean Editor class cast issue method access issue

2012-12-11 Thread Ken in Nashua

Thanks Jens...

I am certain its a coach. But I could be wrong... I am not finding enough docs 
on their mixin and its usage other than the source module itself. 

I have a gallery of coaches... displayed with their photo property. But each 
coach is a pagelink to an edit page. The idea being... if you click a coach in 
the gallery of coaches... it goes into edit mode of that coach... and it works.

In the edit page after being clicked... the photo of the coach is displayed in 
the beanedit component as an html 

But I want to display it as a  or ... well you get my idea...

So I decided to override a property photo on the editbean.

I am prototyping this with a simple label/text using firstName since the coach 
has a firstName

still guesswork


  

Re: Using Tapestry? Feedback on devrates.com is always welcome!

2012-12-11 Thread Stephan Windmüller
On 10.12.2012 19:51, Howard Lewis Ship wrote:

> http://devrates.com/project/show/89512/Tapestry

The link is returning an error: "502 Bad Gateway"

http://www.downforeveryoneorjustme.com/http://devrates.com/project/show/89512/Tapestry

- Stephan



smime.p7s
Description: S/MIME Kryptografische Unterschrift