Re: Tapestry5 and SEO

2009-07-10 Thread Andy Pahne

Howard Lewis Ship schrieb:

Good points. There are two conflicting demands from the community:
First, that everything should work, and work well (and fast) out of
the box.  Second, that everything be customizable.

When resolving such conflicts, I will tend to favor the first (work
and work well with no configuration) over the second.

That being said, it would be nice if we could handle a few of these
cases better or easier: for example, something more automatic in terms
of detecting a 404 inside the Index page's activation context, or some
other mechanism to easily distinguish proper page render requests
(with context) from link garbage.

  



Please don't get me wrong. I totally agree with your point that First, 
that everything should work.






On Thu, Jul 9, 2009 at 3:52 PM, Andy Pahneandy.pa...@googlemail.com wrote:
  

Just a few finding while doing SEO for a t5 app:



1. activation context and Index pages

The root Index page of the t5 webapp catches a lot of requests that
otherwise would have been a 404. (already discussed on the list).

For our website that means: there are many pages in the google index that
have gone a long time ago. But because T5 simply activates the root Index
page for those google spider requests, google now finds the start page and
reindexes the gone page with the homepage contents. Not quite lucky.

Quick workaround: check the root Index page's activation context:

  Object onActivate(EventContext ctx){
 if(ctx.getCount() == 0)
  return null;
   // handle bad requests,
   return Document404.class;   // does the not found details
  }




2. Pages with .php extensions

Our public website was a PHP application before we replaced it with our new
shiny t5 app. So google had a lot of URLs like  .../index.php?id=222 in it's
index.

When we switched to t5 and google respidered our website, those requests
failed instead of a proper 404 was thrown. Why? Because our Index page did
not contain a component named php

Quick workaround:
  Object onActionFromPhp() {
  return Fehler404.class;
  }




3. Lowercasing of Page Names

When T5 redirects, page names, component names (, ...?) all become
lowercase. I wish that T5 in it's default settings would preserve the case
used in originating URLs



Does this actually affect SEO?

  

No, I don't think so. Just a matter of personal preference.

4. I wish, T5 would allow underscores, so that my page named DailyEvents
could have a URL like daily_events




As we add more and more and more of these special cases, it gets
harder and harder to talk authoritatively about what Tapestry will do,
and it becomes increasingly impossible for 3rd party tools (such as
IDE plugins) to operate.  Name your class Daily_Events.


  


Sounds reasonable. I didn't even think about third party tools at first.



5. I wish that T5 in it's default setting would allow   daily_events.html in
it's default settings as page name for the same page as in the example
above.



This is frequently requested ... is there a JIRA issue for it (hint)?

  


https://issues.apache.org/jira/browse/TAP5-771






I know that T5 URL handling is highly customizable. I wish I had the time to
look into that.



Well, if SEO is that important to your bottom line, you probably should.


  


Sooner or later I'll will. Unfortunatly my workload doesn't allow it 
right now.





What do you think? Or do you have other findings with regards to SEO?


Andy





So far, my contacts who do SEO are quite happy with Tapestry, though
they created an override to hack .html into the URLs.

  


As I said: There are quite easy workaround for most of these points. And 
in your answer you suggested even more...




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



Re: Is tapestry the right for me?

2009-07-10 Thread Stefan

That sounds fine. :)
After some further reading i will try something around with the grid  
component.

Is it (again) possible without JSF-like terror to combine grid and form?

What i need to have is the possibility to setup a grid with e.g.  
select components

in the cells. (first column labels, 2..n columns form components).
This form should be generated on server-side, i prefer the non-ajax way.
(i have a lot of painful Ajax, JS  Browser issue experiences).


-Stefan


Am 09.07.2009 um 21:54 schrieb Igor Drobiazko:

One of the main distinguishing features of Tapestry is that you  
don't need
workarounds to solve certain problems. Implementing dynamic forms is  
a pain

when using other frameworks. Please have a look into the following
Tapestry's integration test:

http://svn.apache.org/repos/asf/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/FormInjectorDemo.java
http://svn.apache.org/repos/asf/tapestry/tapestry5/trunk/tapestry-core/src/test/app1/FormInjectorDemo.tml

If I'm not completely misunderstood you, this is what you need.

Have fun using Tapestry :)

On Thu, Jul 9, 2009 at 9:44 PM, Stefan ste...@wammel.com wrote:


Hi,

after some hours of reading articles, tutorials  doc around  
tapestry5 i'm

now really excited.
After some painful experiences with JSF  MyFaces, GWT, WingS and, of
course, plain JSP stuff, i'm
searching for the really right one for my current project.

The problem is that i have to build some forms completely dynamic.
The definition of the form will be defined per request!

e.g. I need to have a default adressbook like form (no problem so  
far)
another once there has to be a table with dynamic rows, dynamic  
columns and

the cells contain other components like options, checkboxes

Is something really dynamic form/component building possible  
without having

to code dozens of workarounds?


Thanks in advance,
Stefan





--
Best regards,

Igor Drobiazko




smime.p7s
Description: S/MIME cryptographic signature


Re: Re: ActionLink in bundle message

2009-07-10 Thread nille hammer
Hi Kai,
instead of ActionLink use EventLink, if you can.
The tml would look like:
a href=# t:type=EventLink event=detailLink t:context=literal:1more/a
a href=# t:type=EventLink event=detailLink  
t:context=literal:2more/a

I´d use a more eventish name for the event. How about detailClicked?

Regards, nillehammer
==
http://www.winfonet.eu

- original Nachricht 

Betreff: Re: ActionLink in bundle message
Gesendet: Fr, 10. Jul 2009
Von: Kai Weberkai.we...@glorybox.de

 Thiago H. de Paula Figueiredo wrote:
  On Tue, Jul 7, 2009 at 12:15 PM, shymonshym...@poczta.onet.pl wrote:
  
  I have message with parameter which I replace using messages.format
 method.
  I also create link object with createEventLink() and   element using
 Element
  class.
  It almost works, but link created this way has no id so I cannot handle
 only
  it's action.
  
  You don't need a component id to handle its event: just handle the
  event normally:
  
  @OnEvent(nameOfYourEvent)
  void handle() {...}
  
  If you create more than one event link this way, generate their links
  with different event names or provide some activation context to them.
  
 
 Could you elaborate me if i create:
 
 a href=# t:type=ActionLink t:id=detailLink
 t:context=literal:1more/a
 a href=# t:type=ActionLink t:id=detailLink
 t:context=literal:2more/a
 
 and
 
 @OnEvent(detailLink)
 void handle(int id) {...}
 
 I always get an exception that the same id is not allowed for a component.
 
 What did I wrong?
 
 Kai
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org
 
 

--- original Nachricht Ende 


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



Testify + Testng

2009-07-10 Thread Juan E. Maya
I have been playing with Testng and the Testify library but i am
having a small issue. It seems that the injection of services occurs
after the @BeforeSuite.
For example in the following code,  defaultDataCommandManager is null
when the test enters the BeforeSuite method. However the property is
injected once the test started to be executed.

@Inject
private DefaultDataCommandManager _defaultDataCommandManager;

@BeforeSuite
public void initData(){
_defaultDataCommandManager.populateDefaultData(); //property is null
}


@Test
public void initData(){
  _defaultDataCommandManager.populateDefaultData(); //property is not null
}


Thank you very much for your help

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



Re: [T5.0.18] Bug? : Null property problem with the custom component inside a grid

2009-07-10 Thread Marcus Veloso
Hi Howard,
 In fact, if you look at the rendered URL you'll see that every time
 the Image component rendered, it rendered the same URL.

Yes, it's always the same image (the last one) in grid component.

 The solution is to use event context to identify the book, or in some
 other way, identify where the data stream is supposed to come from.

Sorry, but i can't figured this out.
Perhaps you can elaborate the solution?

Here is the relevant code:
[
http://www.nabble.com/-T5.1--Using-a-custom-image-component-inside-a-Grid-td24421215s302.html]http://www.nabble.com/-T5.1--Using-a-custom-image-component-inside-a-Grid-td24421215s302.html

Regards,

Marcus Veloso


Injecting Tapestry services into Spring beans

2009-07-10 Thread Henning Petersen
Hi everybody,

I'm trying to inject two services from Tapestry-Spring-Security into a
Spring bean, using Tapestry 5.1.0.5 and Spring 2.5.6-SEC01.

The way I think this should work is this:

public class PasswordChangeServiceImpl implements PasswordChangeService {

@Inject
private SaltSourceService saltSource;
@Inject
private PasswordEncoder passwordEncoder;

...

private String createPasswordHash(String plainTextPass) {
UserDetails userDetails = ...
Object salt = this.saltSource.getSalt(userDetails);
return this.passwordEncoder.encodePassword(plainTextPass,
salt);
}

}

and

bean id=passwordChangeService class=PasswordChangeServiceImpl
...(other dependencies)...
/bean

I inject the service instance into my page using the @Inject annotation: 

public class UserProfile {
@Inject private PasswordChangeService passwordChangeService;
...
}

The service is properly configured as far as the dependencies handled by
Spring are concerned, but the two services that I'd like to be injected from
Tapestry's IoC newer make it into the instance, and I get a
NullPointerException when they are accessed.

Both SaltSourceService and PasswordEncoder are defined and visible on the
service status page, and they work like a charm when injected into
components directly. I'm not using 5.0 compatibility mode.

Does anyone have an idea what I am missing?

Thanks
Henning


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



Re: Is tapestry the right for me?

2009-07-10 Thread Thiago H. de Paula Figueiredo
On Fri, Jul 10, 2009 at 7:02 AM, Stefanste...@wammel.com wrote:
 That sounds fine. :)
 After some further reading i will try something around with the grid
 component. Is it (again) possible without JSF-like terror to combine grid and 
 form?

I've done a form that edit a list of objects displayed in a Grid
without any problems and workarounds. It just works. :)

-- 
Thiago

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



t:errors renders although...

2009-07-10 Thread Borut Bolčina
Hi,

logger.debug(errors:{},form.getHasErrors());

says false, but the t:errors is still displayed (just the
default-banner). Why?

Using T5.0.18

Cheers,
Borut


Stale sessions and recovering from same in T4.1.6

2009-07-10 Thread Tony Giaccone
Hi,I'm looking for a little guidance on how to solve the following problem.


*First the description:*

The first thing to note, is that our apps all live behind SiteMinder, so
that when a users arrives at our application they have already been through
the credential validation process and the remote_users request header has
their valid userId.

I have two related Applications. AppI and AppM.  Each App allows a group of
users to CRUD a set of Documents.

The users enter the app, and are presented with a Queue of Documents
presented as a table.  The first column of that table for the AppM workers
is an identifier for the document wrapped in a DirectLink.  When they click
on that identifier (anchor), they go to a second page, where they can view
or edit the selected document.


The second App, AppI does a similar presentation for a different set of
Documents,  AppI type documents. Click on the direct link and the AppI
document is presented to be edited or viewed.

Each of these Applications resides in a separate JBOSS container.

The latest requirement is that AppI users need a way to view certain AppM
documents.  There is a read only view of the document in AppM, so the
feeling was that the quickest way to give the AppI users a view into AppM
documents was to link from AppI to AppM's read only view.

AppM links look like:

https://appm.ourDomain.com/appM/Home,mNumberLink.sdirect?sp=S1737

In the AppI Queue I coded up a Generic Link that looks just like the links
created in AppM.

https://appm.ourDomain.com/appM/Home,mNumberLink.sdirect?sp=S1737


*The problem*:

The first time the users clicks the link they are sent to a
StaleSessionException page.  At that point, they are given the choice to
click the refresh session page, and then all is good. Subsequent clicks on
other links, or the same link always work.

I tried to solve the problem with the initial link  by creating my own
StaleSession page, and in the pagevalidate method find the userId, create a
valid user and then throw a page redirect to the same page they were
originally going to, but that, has not work.

What I need is some idea of how to catch that stale session and restart a
fresh new session. I want the first click through to work like all the other
click throughs.

Tony Giaccone


Generating graphs with dynamic datasource

2009-07-10 Thread Ignacio González Arboleya
Hello everybody,

My name is Nacho and I am making a project since I am finishing 
studying Computer Sciences Engineering. I am making a web application with JAVA 
POJO TECHNOLOGIES (tapestry 5 + hibernate), and now
I find myself in the following situation:

   In my code (.java file) I have a collection of pairs of data (VALUE - 
DATE) and i have to create a graph on the web page with that information. 
   What kind of library should I use to do this?? I've thought about BIRT 
but I don't know how to integrate it with Tapestry and .tml files... I have 
also read about FLOT and it is very interesting 
   but I don't know how to access dynamically the data in .java file from 
the .tml file.



Thank you very much and sorry for my english...

Nacho


Re: Generating graphs with dynamic datasource

2009-07-10 Thread Juan E. Maya
Hi Ignacio, u may want to check chenille's kit chart component:
http://www.chenillekit.org/demo/tapcomp/chartdemo
or a more manual approach in the wiki:
http://wiki.apache.org/tapestry/Tapestry5HowToCreatePieChartsInAPage

2009/7/10 Ignacio González Arboleya nachogo...@hotmail.com:
 Hello everybody,

        My name is Nacho and I am making a project since I am finishing 
 studying Computer Sciences Engineering. I am making a web application with 
 JAVA POJO TECHNOLOGIES (tapestry 5 + hibernate), and now
 I find myself in the following situation:

       In my code (.java file) I have a collection of pairs of data (VALUE - 
 DATE) and i have to create a graph on the web page with that information.
       What kind of library should I use to do this?? I've thought about BIRT 
 but I don't know how to integrate it with Tapestry and .tml files... I have 
 also read about FLOT and it is very interesting
       but I don't know how to access dynamically the data in .java file 
 from the .tml file.



 Thank you very much and sorry for my english...

            Nacho


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



how does PageElementFactory, ComponentPageElement/instantiatorSource etc.. work?

2009-07-10 Thread hari ks

hi,
   What is the sequence of flow between PageElementFactory, 
ComponentPageElement/ComponentinstantiatorSource etc.. and other important 
classes to understand the render phase..

Is the render phase alone responsible for all rendering (JSF seems to put 
everything in one object and loop through various phases)

thanks  regards,
Hari Sujathan


  

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



Re: Generating graphs with dynamic datasource

2009-07-10 Thread Thiago H. de Paula Figueiredo
Em Fri, 10 Jul 2009 15:45:42 -0300, Juan E. Maya maya.j...@gmail.com  
escreveu:



Hi Ignacio, u may want to check chenille's kit chart component:
http://www.chenillekit.org/demo/tapcomp/chartdemo
or a more manual approach in the wiki:
http://wiki.apache.org/tapestry/Tapestry5HowToCreatePieChartsInAPage


I would like to add that JFreeChart, an Java open source library, does a  
very good job at generating graphs of all kinds. It's the library used at  
http://wiki.apache.org/tapestry/Tapestry5HowToCreatePieChartsInAPage.  
Another option would be to have a page that uses JFreeChart and returns a  
StreamResponse on its onActivate() or any other event handler method,  
similar to the approach described in  
http://wiki.apache.org/tapestry/Tapestry5HowToCreateADynamicPDF.


--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

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



Re: how does PageElementFactory, ComponentPageElement/instantiatorSource etc.. work?

2009-07-10 Thread Thiago H. de Paula Figueiredo

Em Fri, 10 Jul 2009 15:57:34 -0300, hari ks hari_...@yahoo.com escreveu:


hi,


Hi!

   What is the sequence of flow between PageElementFactory,  
ComponentPageElement/ComponentinstantiatorSource etc.. and other  
important classes to understand the render phase..


You can download the Tapestry source, put some breakpoints on them and  
them debug an application.
But why do you need to undestand the render phase in such a deep detail?  
Aren't http://tapestry.apache.org/tapestry5.1/guide/rendering.html and  
other docuemntation pages enough? Just curious, as I work with Tapestry  
daily for almost 2.5 years and never needed to go that far. :)


--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

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



Re: Generating graphs with dynamic datasource

2009-07-10 Thread Thiago H. de Paula Figueiredo
Em Fri, 10 Jul 2009 15:23:13 -0300, Ignacio González Arboleya  
nachogo...@hotmail.com escreveu:



Hello everybody,


Hi! Me again . . .

   What kind of library should I use to do this?? I've thought about  
BIRT but I don't know how to integrate it with Tapestry and .tml  
files... I have also read about FLOT and it is very interesting


BIRT is server-side and FLOT is client-side (Javascript), so their use in  
a Tapestry application would be very different.


   but I don't know how to access dynamically the data in .java  
file from the .tml file.


If you're using FLOT, you would generate the Javascript code that  
populates the graph in a page or component class. @Inject RenderSupport  
and the use renderSupport.addScript(); to generate lines of Javascript  
that Tapestry will add to the page automatically.  
http://wiki.apache.org/tapestry/Tapestry5AndJavaScriptExplained does an  
awesome job of explaining how to use Javascript in Tapestry.


--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

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



Re: how does PageElementFactory, ComponentPageElement/instantiatorSource etc.. work?

2009-07-10 Thread hari ks

Hi Thiago,
I didn't go through that link. That seems sufficient. 
Yes, rest all can be debugged from tapestry source..

Thank you,
Hari

--- On Sat, 7/11/09, Thiago H. de Paula Figueiredo thiag...@gmail.com wrote:

 From: Thiago H. de Paula Figueiredo thiag...@gmail.com
 Subject: Re: how does PageElementFactory, 
 ComponentPageElement/instantiatorSource etc.. work?
 To: Tapestry users users@tapestry.apache.org
 Date: Saturday, July 11, 2009, 12:48 AM
 Em Fri, 10 Jul 2009 15:57:34 -0300,
 hari ks hari_...@yahoo.com
 escreveu:
 
  hi,
 
 Hi!
 
     What is the sequence of flow between
 PageElementFactory,
 ComponentPageElement/ComponentinstantiatorSource etc.. and
 other important classes to understand the render phase..
 
 You can download the Tapestry source, put some breakpoints
 on them and them debug an application.
 But why do you need to undestand the render phase in such a
 deep detail? Aren't 
 http://tapestry.apache.org/tapestry5.1/guide/rendering.html
 and other docuemntation pages enough? Just curious, as I
 work with Tapestry daily for almost 2.5 years and never
 needed to go that far. :)
 
 --Thiago H. de Paula Figueiredo
 Independent Java consultant, developer, and instructor
 http://www.arsmachina.com.br/thiago
 
 -
 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



[T5.1] Coercion/Class mismatch error (a real headbanger)

2009-07-10 Thread xfile80303

Hello all,

I'm seeing a very odd behavior I could really use some assistance with.

The base error I'm getting is:

Could not find a coercion from type
com.java.dse.cwp.eos.components.webdesign.objects.Tab to type
com.java.dse.cwp.eos.components.webdesign.objects.Tab.

Which is pretty odd, especially considering that my classpath only contains
one Tab class, and com.java.dse.cwp.eos.components.webdesign.objects.Tab
is it.

Tab is just a container class which essentially has two String members, and
accessors, not that I think this matters.

The issue is reported from Tapestry in a loop component, when I try to loop
over a ListTab returned from this function:

Code:

public ListTab getTabs()
{
if (tabs == null  isValidProduct())
{
tabs = new ArrayListTab();
tabs.addAll(product.getTabs());
tabs.add(new Tab(true, Get It /* TODO: put this in 
the template! */,
null));
}

return tabs;
}

where 'tab' is a 'ListTab' and 'product.getTabs()' returns a 'ListTab'

I can comment out the line 'tabs.addAll(product.getTabs());' and everything
works (?!?!?) so I think something very odd is going on and the Tab class is
being munged behind the scenes.

The full (well, I truncated it a bit) error/stack is below:

ERROR [http-8080-1: Product]: Render queue error in
BeginRender[Product:d7.loop]: Failure writing parameter 'value' of component
Product:d7.loop: Could not find a coercion from type
com.java.dse.cwp.eos.components.webdesign.objects.Tab to type
com.java.dse.cwp.eos.components.webdesign.objects.Tab.  Available coercions:
...
org.apache.tapestry5.ioc.internal.util.TapestryException: Failure writing
parameter 'value' of component Product:d7.loop: Could not find a coercion
from type com.java.dse.cwp.eos.components.webdesign.objects.Tab to type
com.java.dse.cwp.eos.components.webdesign.objects.Tab.  Available coercions:
... [at classpath:com/java/dse/cwp/eos/components/webdesign/D7.tml, line 12]
at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl.invoke(ComponentPageElementImpl.java:948)
Caused by: org.apache.tapestry5.ioc.internal.util.TapestryException: Failure
writing parameter 'value' of component Product:d7.loop: Could not find a
coercion from type com.java.dse.cwp.eos.components.webdesign.objects.Tab to
type com.java.dse.cwp.eos.components.webdesign.objects.Tab.  Available
coercions: ... [at
classpath:com/java/dse/cwp/eos/components/webdesign/D7.tml, line 12]
at
org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl$1.write(InternalComponentResourcesImpl.java:544)
Caused by: java.lang.IllegalArgumentException: Could not find a coercion
from type com.java.dse.cwp.eos.components.webdesign.objects.Tab to type
com.java.dse.cwp.eos.components.webdesign.objects.Tab.  Available coercions:
...
at
org.apache.tapestry5.ioc.internal.services.TypeCoercerImpl.findOrCreateCoercion(TypeCoercerImpl.java:244)
ERROR [http-8080-1: RequestExceptionHandler]: Processing of request failed
with uncaught exception: Render queue error in BeginRender[Product:d7.loop]:
Failure writing parameter 'value' of component Product:d7.loop: Could not
find a coercion from type
com.java.dse.cwp.eos.components.webdesign.objects.Tab to type
com.java.dse.cwp.eos.components.webdesign.objects.Tab.  Available coercions:
...
org.apache.tapestry5.internal.services.RenderQueueException: Render queue
error in BeginRender[Product:d7.loop]: Failure writing parameter 'value' of
component Product:d7.loop: Could not find a coercion from type
com.java.dse.cwp.eos.components.webdesign.objects.Tab to type
com.java.dse.cwp.eos.components.webdesign.objects.Tab.  Available coercions:
... [at classpath:com/java/dse/cwp/eos/components/webdesign/D7.tml, line 12]
at
org.apache.tapestry5.internal.services.RenderQueueImpl.run(RenderQueueImpl.java:86)
Caused by: org.apache.tapestry5.ioc.internal.util.TapestryException: Failure
writing parameter 'value' of component Product:d7.loop: Could not find a
coercion from type com.java.dse.cwp.eos.components.webdesign.objects.Tab to
type com.java.dse.cwp.eos.components.webdesign.objects.Tab.  Available
coercions: ... [at
classpath:com/java/dse/cwp/eos/components/webdesign/D7.tml, line 12]
at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl.invoke(ComponentPageElementImpl.java:948)
Caused by: org.apache.tapestry5.ioc.internal.util.TapestryException: Failure
writing parameter 'value' of component Product:d7.loop: Could not find a
coercion from type com.java.dse.cwp.eos.components.webdesign.objects.Tab to
type com.java.dse.cwp.eos.components.webdesign.objects.Tab.  Available
coercions: ... [at
classpath:com/java/dse/cwp/eos/components/webdesign/D7.tml, line 12]
at
org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl$1.write(InternalComponentResourcesImpl.java:544)
Caused 

Re: T5 : Dependant dropdown boxes

2009-07-10 Thread newtonik

I am also about to try to implement it. Has anyone out there done this. If
you have, please share tips and samples. Javascript in Tapestry is not as
simple as we would like. Thanks.
-- 
View this message in context: 
http://www.nabble.com/T5-%3A-Dependant-dropdown-boxes-tp15760811p24433504.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: [T5.1] Coercion/Class mismatch error (a real headbanger)

2009-07-10 Thread Thiago H. de Paula Figueiredo

Em Fri, 10 Jul 2009 16:47:27 -0300, xfile80303 l...@grokers.net escreveu:


Hello all,


Hi!


Could not find a coercion from type
com.java.dse.cwp.eos.components.webdesign.objects.Tab to type
com.java.dse.cwp.eos.components.webdesign.objects.Tab.


Classes that are under the components, pages, or mixins package are
transformed while loaded by Tapestry, so they're not equal nor compatible  
with their
untransformed counterparts (used when you instantiate them yourself). So .  
. .


Never put anything that is not a component under the components package.
Never put anything that is not a page under the pages package.
Never put anything that is not a mixin under the mixins package.

--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

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



Re: [T5.1] Coercion/Class mismatch error (a real headbanger)

2009-07-10 Thread xfile80303

The more I look at this the more it looks like a classloader issue.  As in,
my classes are being loaded by two different classloaders which do not
inherit from one-another. Any bells ring for folks?

Levi
-- 
View this message in context: 
http://n2.nabble.com/-T5.1--Coercion-Class-mismatch-error-%28a-real-headbanger%29-tp3237426p3237771.html
Sent from the Tapestry Users 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



T5 IOC Questions

2009-07-10 Thread Norman Franke
First, I have a ton of DAOs that I need to bind the interface to the  
implementation. I'd like to do this automatically, so I don't have to  
keep modifying my AppModule for each DAO I create. What's the best way  
to go about this? I figure if I can somehow get a ClassNameLocator  
instance, I could just iterate through my package and do it that way.  
However, how do I get a ClassNameLocator in bind(ServiceBinder)?


Second, on the SUPPRESS_REDIRECT_FROM_ACTION_REQUESTS issue, is it  
possible to inject my own ActionRenderResponseGenerator that does my  
bidding?


Norman Franke
Answering Service for Directors, Inc.
www.myasd.com





Re: [T5.1] Coercion/Class mismatch error (a real headbanger)

2009-07-10 Thread Juan E. Maya
Levi, did u try to do what Thiago suggested?
The class Tab is not a component therefore it shouldn't be inside the
component packet.

On Sat, Jul 11, 2009 at 12:16 AM, xfile80303l...@grokers.net wrote:

 The more I look at this the more it looks like a classloader issue.  As in,
 my classes are being loaded by two different classloaders which do not
 inherit from one-another. Any bells ring for folks?

 Levi
 --
 View this message in context: 
 http://n2.nabble.com/-T5.1--Coercion-Class-mismatch-error-%28a-real-headbanger%29-tp3237426p3237771.html
 Sent from the Tapestry Users 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: [T5.1] Coercion/Class mismatch error (a real headbanger)

2009-07-10 Thread Howard Lewis Ship
Any top-level class under components is considered to be a component
and will be loaded in a special class loader. This causes a problem
when an instance is created by the normal class loader and passed into
a comopnent, which has a distinct Class instance.

Create a different package for objects of this type; i.e.
com.java.dse.cwp.eos.data.Tab.

This is all documented http://tapestry.apache.org/tapestry5.1/guide/reload.html

On Fri, Jul 10, 2009 at 3:16 PM, xfile80303l...@grokers.net wrote:

 The more I look at this the more it looks like a classloader issue.  As in,
 my classes are being loaded by two different classloaders which do not
 inherit from one-another. Any bells ring for folks?

 Levi
 --
 View this message in context: 
 http://n2.nabble.com/-T5.1--Coercion-Class-mismatch-error-%28a-real-headbanger%29-tp3237426p3237771.html
 Sent from the Tapestry Users 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





-- 
Howard M. Lewis Ship

Creator of Apache Tapestry
Director of Open Source Technology at Formos

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



Re: T5 IOC Questions

2009-07-10 Thread Howard Lewis Ship
On Fri, Jul 10, 2009 at 3:27 PM, Norman Frankenor...@myasd.com wrote:
 First, I have a ton of DAOs that I need to bind the interface to the
 implementation. I'd like to do this automatically, so I don't have to keep
 modifying my AppModule for each DAO I create. What's the best way to go
 about this? I figure if I can somehow get a ClassNameLocator instance, I
 could just iterate through my package and do it that way. However, how do I
 get a ClassNameLocator in bind(ServiceBinder)?

Look at the ServiceBinder interface; there are methods there
(especially in 5.1) that may address your needs.


 Second, on the SUPPRESS_REDIRECT_FROM_ACTION_REQUESTS issue, is it possible
 to inject my own ActionRenderResponseGenerator that does my bidding?

Not following you here ... but in 5.1 it is possible to override
contributions as well as services.


 Norman Franke
 Answering Service for Directors, Inc.
 www.myasd.com







-- 
Howard M. Lewis Ship

Creator of Apache Tapestry
Director of Open Source Technology at Formos

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



Re: T5 IOC Questions

2009-07-10 Thread Norman Franke

On Jul 10, 2009, at 6:55 PM, Howard Lewis Ship wrote:

On Fri, Jul 10, 2009 at 3:27 PM, Norman Frankenor...@myasd.com  
wrote:

First, I have a ton of DAOs that I need to bind the interface to the
implementation. I'd like to do this automatically, so I don't have  
to keep
modifying my AppModule for each DAO I create. What's the best way  
to go
about this? I figure if I can somehow get a ClassNameLocator  
instance, I
could just iterate through my package and do it that way. However,  
how do I

get a ClassNameLocator in bind(ServiceBinder)?


Look at the ServiceBinder interface; there are methods there
(especially in 5.1) that may address your needs.


I did, but how do I get a ClassNameLocator in the bind() method so I  
can then pass my classes to the ServiceBinder? bind() can only take a  
single argument, and I can't inject something into the class, since  
this is static.




Second, on the SUPPRESS_REDIRECT_FROM_ACTION_REQUESTS issue, is it  
possible

to inject my own ActionRenderResponseGenerator that does my bidding?


Not following you here ... but in 5.1 it is possible to override
contributions as well as services.


I see that the InternalModule has a  
buildActionRenderResponseGenerator() and I'd like replace that with my  
own implementation. I'm just not sure how. I've tried a number of  
things, including adding my own buildActionRenderResponseGenerator,  
which fails due to duplication. I tried an alias, but can't get that  
working either. What's the magic mojo to replace the  
ActionRenderResponseGenerator service with something else in my  
AppModule?



Howard M. Lewis Ship

Creator of Apache Tapestry
Director of Open Source Technology at Formos


Norman Franke
Answering Service for Directors, Inc.
www.myasd.com



Re: T5 IOC Questions

2009-07-10 Thread Norman Franke

On Jul 10, 2009, at 7:08 PM, Norman Franke wrote:


On Jul 10, 2009, at 6:55 PM, Howard Lewis Ship wrote:

On Fri, Jul 10, 2009 at 3:27 PM, Norman Frankenor...@myasd.com  
wrote:

First, I have a ton of DAOs that I need to bind the interface to the
implementation. I'd like to do this automatically, so I don't have  
to keep
modifying my AppModule for each DAO I create. What's the best way  
to go
about this? I figure if I can somehow get a ClassNameLocator  
instance, I
could just iterate through my package and do it that way. However,  
how do I

get a ClassNameLocator in bind(ServiceBinder)?


Look at the ServiceBinder interface; there are methods there
(especially in 5.1) that may address your needs.


I did, but how do I get a ClassNameLocator in the bind() method so I  
can then pass my classes to the ServiceBinder? bind() can only take  
a single argument, and I can't inject something into the class,  
since this is static.




Second, on the SUPPRESS_REDIRECT_FROM_ACTION_REQUESTS issue, is it  
possible

to inject my own ActionRenderResponseGenerator that does my bidding?


Not following you here ... but in 5.1 it is possible to override
contributions as well as services.


I see that the InternalModule has a  
buildActionRenderResponseGenerator() and I'd like replace that with  
my own implementation. I'm just not sure how. I've tried a number of  
things, including adding my own buildActionRenderResponseGenerator,  
which fails due to duplication. I tried an alias, but can't get that  
working either. What's the magic mojo to replace the  
ActionRenderResponseGenerator service with something else in my  
AppModule?


I've tried:
contributeAlias
contributeAliasOverride
contributeServiceOverride

None seem to actually override the ActionRenderResponseGenerator. Very  
strange.


-Norman



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



How to set a meta header tag in template?

2009-07-10 Thread learningtapestry

I am using tapestry version 5.1.0.3. I have a basic SiteLayout defined

html xmlns=http://www.w3.org/1999/xhtml;
xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;

head...some css styles.../head

body
  ...some html goes here... 
   t:body/
 /body

/html

Now as someone navigates my site, there is a particular page on which I want
to turn off caching (because it always has to get the latest data from the
servers on that page). So, lets say I have a page NoCachePage.java and
NoCachePage.tml already coded. But the head tag is defined in the Site.tml
template. How can I get my http meta tag META HTTP-EQUIV=CACHE-CONTROL
CONTENT=NO-CACHE/ into the Site.tml's head element?

I tried setting up @CleanUpRender inside NoCachePage.java and tried to
manipulate the DOM through the MarkupWriter. But it appears as if
MarkupWriter doesn't provide any method of adding an element under the
head html tag. 

How am I supposed to add the no-cache meta http tag into the head element
from my NoCachePage component? Please help.
-- 
View this message in context: 
http://www.nabble.com/How-to-set-a-meta-header-tag-in-template--tp24436287p24436287.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: [T5.1] Coercion/Class mismatch error (a real headbanger)

2009-07-10 Thread xfile80303

Words of wisdom, Thiago.

Thank you very much.

Levi


Thiago H. de Paula Figueiredo wrote:
 
 Em Fri, 10 Jul 2009 16:47:27 -0300, xfile80303 l...@grokers.net
 escreveu:
 
 Hello all,
 
 Hi!
 
 Could not find a coercion from type
 com.java.dse.cwp.eos.components.webdesign.objects.Tab to type
 com.java.dse.cwp.eos.components.webdesign.objects.Tab.
 
 Classes that are under the components, pages, or mixins package are
 transformed while loaded by Tapestry, so they're not equal nor compatible  
 with their
 untransformed counterparts (used when you instantiate them yourself). So .  
 . .
 
 Never put anything that is not a component under the components package.
 Never put anything that is not a page under the pages package.
 Never put anything that is not a mixin under the mixins package.
 
 -- 
 Thiago H. de Paula Figueiredo
 Independent Java consultant, developer, and instructor
 http://www.arsmachina.com.br/thiago
 
 -
 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://n2.nabble.com/-T5.1--Coercion-Class-mismatch-error-%28a-real-headbanger%29-tp3237426p3240927.html
Sent from the Tapestry Users 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