I am not a member of the tapestry team, but I will respond anyhow.

FIRST PROBLEM
your posting belongs definetly to the users list and not the dev list.

SECOND PROBLEM
you choose the wrong way to do what you need to do, got alot of problems and did not stop and think - maybe its the wrong way. If you want to go to europe from the states, don't choose brazil as your stop. its a longer and much more expensive way. Try to see what the travel agancies offer, then decide...

WHAT DID YOU DO WRONG
basically you are right. asset service can not be extended. it should not. no service should.
instead you should provide your own service -
just create an image service. you can use arbitrary parameters, construct your own ILink and later interpret it and deliver the results.
Take the asset service as an *example*, not a base class.

The rest is just shouting, so have nice time shouting...
good luck...

Cheers,
Ron

PS - I must disagree with your critic : extending tapestry is very easy. On the early alpha days I used to complain alot about having to learn hivemind to use tapestry. Now I *know* its a real bless with a briliant design. It is however not for extending in OO manner, but what one would rather call "replacing" - many bricks of the wall can be replaced and thus customize how tapestry works. BUT YOU HAVE TO DO IT RIGHT.




ציטוט Alexandr Kundirenko:
Hello Tapestry Team,

I'm finishing project on T4 and have a lot of problems when I need to
extend Tapestry framework. Here is one of my use cases:

I want to extend asset service which will dynamically resize images
before showing them.
I suppose to make ResizableImage component and use it like this:

<span jwcid="@ResizableImage" image="ognl:myAsset" width="400" height="300"/>

FIRST PROBLEM
I can't provide these width/height parameters to my service,
because ILink instance in unmodifiable - it has not addParameter(...)
method. I can't extend its default impl. because of private members. So I
have to copy code from EngineServiceLink and add my methods. Ugly way.

SECOND PROBLEM
Now I wan't to construct my modifiable
ILink instance. I can't extend LinkFactory impl. because of private
members. I have to copy code from it and change only *one* line.
Terrible.

THIRD PROBLEM
Ok. Now I can provide parameters to my custom service. But I can't
extend AssetService. I can't override it's service() method because of
private members. I have to copy/paste again!

CONCLUSION
We can use contributions, this is great.
But we cannot effectively extend existing services.
Here are links to other samples:

http://issues.apache.org/jira/browse/TAPESTRY-396
http://issues.apache.org/jira/browse/TAPESTRY-621
http://issues.apache.org/jira/browse/TAPESTRY-716
http://issues.apache.org/jira/browse/TAPESTRY-689
http://issues.apache.org/jira/browse/TAPESTRY-442

QUESTION
Do you plan to refactor tapestry classes to make them really extendable?
Do you plan to do it for 4.0 release?
Or explain why you don't want it, please.

Thank you



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to