You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Norbert Sándor (JIRA)" <ta...@jakarta.apache.org> on 2005/11/04 10:10:21 UTC

[jira] Created: (TAPESTRY-737) Support custom PageRenderSupportImpl in component Body

Support custom PageRenderSupportImpl in component Body
------------------------------------------------------

         Key: TAPESTRY-737
         URL: http://issues.apache.org/jira/browse/TAPESTRY-737
     Project: Tapestry
        Type: Improvement
  Components: Framework  
    Versions: 4.0    
 Environment: 4b12
    Reporter: Norbert Sándor


Make it possible to use a custom PageRenderSupport implementation in Body, eg. by using a pageRenderSupport parameter.

BR,
Norbi

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


Re: [jira] Commented: (TAPESTRY-737) Support custom PageRenderSupportImpl in component Body

Posted by Jesse Kuhnert <jk...@gmail.com>.
Ok...So maybe I'll stfu and make a patch like I've been telling everyone
else..

On 11/4/05, Jesse Kuhnert (JIRA) <ta...@jakarta.apache.org> wrote:
>
> [
> http://issues.apache.org/jira/browse/TAPESTRY-737?page=comments#action_12356775]
>
> Jesse Kuhnert commented on TAPESTRY-737:
> ----------------------------------------
>
> Ummmm...I actually need something similar to this now that I think of it.
>
> Can TapestryUtils.storeUniqueAttribute be changed to not throw an
> IllegalStateException if there is an existing object there already? It could
> instead return a boolean indicating whether or not it was able to
> successfully store the value. I did a reference check on the method and
> found nothing besides the Body or Portlet stuff that interacts with this.
> Nothing seems to rely on this being a failure.
>
> This would allow people to provide their own PageRenderSupport
> implementations.
>
> > Support custom PageRenderSupportImpl in component Body
> > ------------------------------------------------------
> >
> > Key: TAPESTRY-737
> > URL: http://issues.apache.org/jira/browse/TAPESTRY-737
> > Project: Tapestry
> > Type: Improvement
> > Components: Framework
> > Versions: 4.0
> > Environment: 4b12
> > Reporter: Norbert Sándor
>
> >
> > Make it possible to use a custom PageRenderSupport implementation in
> Body, eg. by using a pageRenderSupport parameter.
> > BR,
> > Norbi
>
> --
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the administrators:
> http://issues.apache.org/jira/secure/Administrators.jspa
> -
> For more information on JIRA, see:
> http://www.atlassian.com/software/jira
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>
>

[jira] Commented: (TAPESTRY-737) Support custom PageRenderSupportImpl in component Body

Posted by "Jesse Kuhnert (JIRA)" <ta...@jakarta.apache.org>.
    [ http://issues.apache.org/jira/browse/TAPESTRY-737?page=comments#action_12356775 ] 

Jesse Kuhnert commented on TAPESTRY-737:
----------------------------------------

Ummmm...I actually need something similar to this now that I think of it. 

Can TapestryUtils.storeUniqueAttribute be changed to not throw an IllegalStateException if there is an existing object there already? It could instead return a boolean indicating whether or not it was able to successfully store the value. I did a reference check on the method and found nothing besides the Body or Portlet stuff that interacts with this. Nothing seems to rely on this being a failure. 

This would allow people to provide their own PageRenderSupport implementations. 

> Support custom PageRenderSupportImpl in component Body
> ------------------------------------------------------
>
>          Key: TAPESTRY-737
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-737
>      Project: Tapestry
>         Type: Improvement
>   Components: Framework
>     Versions: 4.0
>  Environment: 4b12
>     Reporter: Norbert Sándor

>
> Make it possible to use a custom PageRenderSupport implementation in Body, eg. by using a pageRenderSupport parameter.
> BR,
> Norbi

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


[jira] Resolved: (TAPESTRY-737) Support custom PageRenderSupportImpl in component Body

Posted by "Jesse Kuhnert (JIRA)" <ta...@jakarta.apache.org>.
     [ http://issues.apache.org/jira/browse/TAPESTRY-737?page=all ]

Jesse Kuhnert resolved TAPESTRY-737.
------------------------------------

    Fix Version/s: 4.1
       Resolution: Fixed

This has now been implemented by the new ResponseRenderer configuration points.

> Support custom PageRenderSupportImpl in component Body
> ------------------------------------------------------
>
>                 Key: TAPESTRY-737
>                 URL: http://issues.apache.org/jira/browse/TAPESTRY-737
>             Project: Tapestry
>          Issue Type: Improvement
>          Components: Framework
>    Affects Versions: 4.0
>         Environment: 4b12
>            Reporter: Norbert Sándor
>             Fix For: 4.1
>
>         Attachments: patch.txt
>
>
> Make it possible to use a custom PageRenderSupport implementation in Body, eg. by using a pageRenderSupport parameter.
> BR,
> Norbi

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Commented: (TAPESTRY-737) Support custom PageRenderSupportImpl in component Body

Posted by "Norbert Sándor (JIRA)" <ta...@jakarta.apache.org>.
    [ http://issues.apache.org/jira/browse/TAPESTRY-737?page=comments#action_12356778 ] 

Norbert Sándor commented on TAPESTRY-737:
-----------------------------------------

This seems to be a simple and good solution, as I see...

> Support custom PageRenderSupportImpl in component Body
> ------------------------------------------------------
>
>          Key: TAPESTRY-737
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-737
>      Project: Tapestry
>         Type: Improvement
>   Components: Framework
>     Versions: 4.0
>  Environment: 4b12
>     Reporter: Norbert Sándor

>
> Make it possible to use a custom PageRenderSupport implementation in Body, eg. by using a pageRenderSupport parameter.
> BR,
> Norbi

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


[jira] Commented: (TAPESTRY-737) Support custom PageRenderSupportImpl in component Body

Posted by "Ron Piterman (JIRA)" <ta...@jakarta.apache.org>.
    [ http://issues.apache.org/jira/browse/TAPESTRY-737?page=comments#action_12356756 ] 

Ron Piterman commented on TAPESTRY-737:
---------------------------------------

Just curious, maybe howard will also be: usecase?

> Support custom PageRenderSupportImpl in component Body
> ------------------------------------------------------
>
>          Key: TAPESTRY-737
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-737
>      Project: Tapestry
>         Type: Improvement
>   Components: Framework
>     Versions: 4.0
>  Environment: 4b12
>     Reporter: Norbert Sándor

>
> Make it possible to use a custom PageRenderSupport implementation in Body, eg. by using a pageRenderSupport parameter.
> BR,
> Norbi

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


[jira] Updated: (TAPESTRY-737) Support custom PageRenderSupportImpl in component Body

Posted by "Jesse Kuhnert (JIRA)" <ta...@jakarta.apache.org>.
     [ http://issues.apache.org/jira/browse/TAPESTRY-737?page=all ]

Jesse Kuhnert updated TAPESTRY-737:
-----------------------------------

    Attachment: patch.txt

Ok I think this patch would do it. I'll still need to create my own script processor, but this does at least allow a certain level of control.  Unit tests/javadoc/etc were updated as well. Seems like a minimal impact sort of change as this api appears to be a little protected. 

> Support custom PageRenderSupportImpl in component Body
> ------------------------------------------------------
>
>          Key: TAPESTRY-737
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-737
>      Project: Tapestry
>         Type: Improvement
>   Components: Framework
>     Versions: 4.0
>  Environment: 4b12
>     Reporter: Norbert Sándor
>  Attachments: patch.txt
>
> Make it possible to use a custom PageRenderSupport implementation in Body, eg. by using a pageRenderSupport parameter.
> BR,
> Norbi

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


[jira] Commented: (TAPESTRY-737) Support custom PageRenderSupportImpl in component Body

Posted by "Norbert Sándor (JIRA)" <ta...@jakarta.apache.org>.
    [ http://issues.apache.org/jira/browse/TAPESTRY-737?page=comments#action_12356764 ] 

Norbert Sándor commented on TAPESTRY-737:
-----------------------------------------

I have a complex page where I render large component groups conditionally. The components should be rendered because of side effects of their rendering process but the output is not written to the client. It is achieved using NullWriter if certain conditions met. It would work but the scripts generated by these components are rendered as normal while they should be ignored.

Now I solve it by subclassing Body and doing the checks in the addXScript methods.  A better word is copypasting, because Body stores the pagesupportimpl as a private member so subclassing is not really supported.

It is not an important feature (as you see I can solve it using a custom component) but maybe someone else may have such comlex scenario and extensibility is always good in case of framework components I think...
Maybe it was a bad idea to make it a parameter, it would be better as a protected method.

BR,
Norbi

> Support custom PageRenderSupportImpl in component Body
> ------------------------------------------------------
>
>          Key: TAPESTRY-737
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-737
>      Project: Tapestry
>         Type: Improvement
>   Components: Framework
>     Versions: 4.0
>  Environment: 4b12
>     Reporter: Norbert Sándor

>
> Make it possible to use a custom PageRenderSupport implementation in Body, eg. by using a pageRenderSupport parameter.
> BR,
> Norbi

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


[jira] Commented: (TAPESTRY-737) Support custom PageRenderSupportImpl in component Body

Posted by "Jesse Kuhnert (JIRA)" <ta...@jakarta.apache.org>.
    [ http://issues.apache.org/jira/browse/TAPESTRY-737?page=comments#action_12356769 ] 

Jesse Kuhnert commented on TAPESTRY-737:
----------------------------------------

I would say that what I'm doing with this scenerio is probably not the nicest thing in the world, but I override this behaviour by using the EnhancementWorkers hivemind tapestry worker chain to contribute my own custom enhancements to the Body component. One of which is overriding writing the javascript portions of the response. It's not pretty, but getting at the private member of any class is always possible via reflection. 

If this has anything to do with tacos I'd love to hear more specifics about a problem you are trying to solve so that I can change the framework to better support your particular needs. 

> Support custom PageRenderSupportImpl in component Body
> ------------------------------------------------------
>
>          Key: TAPESTRY-737
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-737
>      Project: Tapestry
>         Type: Improvement
>   Components: Framework
>     Versions: 4.0
>  Environment: 4b12
>     Reporter: Norbert Sándor

>
> Make it possible to use a custom PageRenderSupport implementation in Body, eg. by using a pageRenderSupport parameter.
> BR,
> Norbi

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org