You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by gr...@apache.org on 2006/09/26 20:56:51 UTC

svn commit: r450145 - /myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tabbedpane/HtmlTabbedPaneRenderer.java

Author: grantsmith
Date: Tue Sep 26 11:56:50 2006
New Revision: 450145

URL: http://svn.apache.org/viewvc?view=rev&rev=450145
Log:
TOMAHAWK-701: patch applied

Modified:
    myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tabbedpane/HtmlTabbedPaneRenderer.java

Modified: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tabbedpane/HtmlTabbedPaneRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tabbedpane/HtmlTabbedPaneRenderer.java?view=diff&rev=450145&r1=450144&r2=450145
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tabbedpane/HtmlTabbedPaneRenderer.java (original)
+++ myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tabbedpane/HtmlTabbedPaneRenderer.java Tue Sep 26 11:56:50 2006
@@ -542,7 +542,10 @@
                 if (tabIdx != selectedIndex) {
                     writer.writeAttribute(HTML.STYLE_ATTR, "display:none", null);
                 }
-                RendererUtils.renderChild(facesContext, child);
+                if (tabbedPane.isClientSide() || selectedIndex == tabIdx) {
+                  // render all content in client side mode or only the selected in server side mode
+                  RendererUtils.renderChild(facesContext, child);
+                }
                 writer.endElement(HTML.DIV_ELEM);
 
                 tabIdx++;



Re: svn commit: r450145 - /myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tabbedpane/HtmlTabbedPaneRenderer.java

Posted by Martin Marinschek <ma...@gmail.com>.
Yeah, sure - decoding shouldn't happen either. But if both rendering
and decoding isn't done, the not rendered tabs should just retain
their state.

regards,

Martin

On 9/27/06, Volker Weber <we...@googlemail.com> wrote:
> Not shure how the decode works here, but the not rendered tabs should
> not decoded, or they will lost there values.
>
> Is there any ajax partial rendering involved? We currently have a
> problem in tobago with the
> stateSaving/restoring.
> https://issues.apache.org/jira/browse/TOBAGO-137
>
> regards
>    volker
>
>
> 2006/9/27, Martin Marinschek <ma...@gmail.com>:
> > One moment - that's only about rendering, right?
> >
> > The other components will retain their state - so submittedValue and
> > localValue will be retained as well (or am I wrong here?). Shouldn't
> > that be enough?
> >
> > regards,
> >
> > Martin
> >
> > On 9/27/06, Gerald Müllan <bi...@gmail.com> wrote:
> > > Hi Grant,
> > >
> > > to my mind the patch will not work the proper way. If every time only
> > > the content of the active panel tab is rendered out, values of the
> > > others will be lost after the submit.
> > >
> > > If we want this behaviour (e.g. a tab which does only output of
> > > content) we should introduce a separate attribute which performs this
> > > approach.
> > >
> > > regards,
> > >
> > > Gerald
> > >
> > > On 9/26/06, grantsmith@apache.org <gr...@apache.org> wrote:
> > > > Author: grantsmith
> > > > Date: Tue Sep 26 11:56:50 2006
> > > > New Revision: 450145
> > > >
> > > > URL: http://svn.apache.org/viewvc?view=rev&rev=450145
> > > > Log:
> > > > TOMAHAWK-701: patch applied
> > > >
> > > > Modified:
> > > >     myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tabbedpane/HtmlTabbedPaneRenderer.java
> > > >
> > > > Modified: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tabbedpane/HtmlTabbedPaneRenderer.java
> > > > URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tabbedpane/HtmlTabbedPaneRenderer.java?view=diff&rev=450145&r1=450144&r2=450145
> > > > ==============================================================================
> > > > --- myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tabbedpane/HtmlTabbedPaneRenderer.java (original)
> > > > +++ myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tabbedpane/HtmlTabbedPaneRenderer.java Tue Sep 26 11:56:50 2006
> > > > @@ -542,7 +542,10 @@
> > > >                  if (tabIdx != selectedIndex) {
> > > >                      writer.writeAttribute(HTML.STYLE_ATTR, "display:none", null);
> > > >                  }
> > > > -                RendererUtils.renderChild(facesContext, child);
> > > > +                if (tabbedPane.isClientSide() || selectedIndex == tabIdx) {
> > > > +                  // render all content in client side mode or only the selected in server side mode
> > > > +                  RendererUtils.renderChild(facesContext, child);
> > > > +                }
> > > >                  writer.endElement(HTML.DIV_ELEM);
> > > >
> > > >                  tabIdx++;
> > > >
> > > >
> > > >
> > >
> > >
> > > --
> > > http://www.irian.at
> > >
> > > Your JSF powerhouse -
> > > JSF Consulting, Development and
> > > Courses in English and German
> > >
> > > Professional Support for Apache MyFaces
> > >
> >
> >
> > --
> >
> > http://www.irian.at
> >
> > Your JSF powerhouse -
> > JSF Consulting, Development and
> > Courses in English and German
> >
> > Professional Support for Apache MyFaces
> >
>


-- 

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces

Re: svn commit: r450145 - /myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tabbedpane/HtmlTabbedPaneRenderer.java

Posted by Volker Weber <we...@googlemail.com>.
Not shure how the decode works here, but the not rendered tabs should
not decoded, or they will lost there values.

Is there any ajax partial rendering involved? We currently have a
problem in tobago with the
stateSaving/restoring.
https://issues.apache.org/jira/browse/TOBAGO-137

regards
   volker


2006/9/27, Martin Marinschek <ma...@gmail.com>:
> One moment - that's only about rendering, right?
>
> The other components will retain their state - so submittedValue and
> localValue will be retained as well (or am I wrong here?). Shouldn't
> that be enough?
>
> regards,
>
> Martin
>
> On 9/27/06, Gerald Müllan <bi...@gmail.com> wrote:
> > Hi Grant,
> >
> > to my mind the patch will not work the proper way. If every time only
> > the content of the active panel tab is rendered out, values of the
> > others will be lost after the submit.
> >
> > If we want this behaviour (e.g. a tab which does only output of
> > content) we should introduce a separate attribute which performs this
> > approach.
> >
> > regards,
> >
> > Gerald
> >
> > On 9/26/06, grantsmith@apache.org <gr...@apache.org> wrote:
> > > Author: grantsmith
> > > Date: Tue Sep 26 11:56:50 2006
> > > New Revision: 450145
> > >
> > > URL: http://svn.apache.org/viewvc?view=rev&rev=450145
> > > Log:
> > > TOMAHAWK-701: patch applied
> > >
> > > Modified:
> > >     myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tabbedpane/HtmlTabbedPaneRenderer.java
> > >
> > > Modified: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tabbedpane/HtmlTabbedPaneRenderer.java
> > > URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tabbedpane/HtmlTabbedPaneRenderer.java?view=diff&rev=450145&r1=450144&r2=450145
> > > ==============================================================================
> > > --- myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tabbedpane/HtmlTabbedPaneRenderer.java (original)
> > > +++ myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tabbedpane/HtmlTabbedPaneRenderer.java Tue Sep 26 11:56:50 2006
> > > @@ -542,7 +542,10 @@
> > >                  if (tabIdx != selectedIndex) {
> > >                      writer.writeAttribute(HTML.STYLE_ATTR, "display:none", null);
> > >                  }
> > > -                RendererUtils.renderChild(facesContext, child);
> > > +                if (tabbedPane.isClientSide() || selectedIndex == tabIdx) {
> > > +                  // render all content in client side mode or only the selected in server side mode
> > > +                  RendererUtils.renderChild(facesContext, child);
> > > +                }
> > >                  writer.endElement(HTML.DIV_ELEM);
> > >
> > >                  tabIdx++;
> > >
> > >
> > >
> >
> >
> > --
> > http://www.irian.at
> >
> > Your JSF powerhouse -
> > JSF Consulting, Development and
> > Courses in English and German
> >
> > Professional Support for Apache MyFaces
> >
>
>
> --
>
> http://www.irian.at
>
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>

Re: svn commit: r450145 - /myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tabbedpane/HtmlTabbedPaneRenderer.java

Posted by Martin Marinschek <ma...@gmail.com>.
One moment - that's only about rendering, right?

The other components will retain their state - so submittedValue and
localValue will be retained as well (or am I wrong here?). Shouldn't
that be enough?

regards,

Martin

On 9/27/06, Gerald Müllan <bi...@gmail.com> wrote:
> Hi Grant,
>
> to my mind the patch will not work the proper way. If every time only
> the content of the active panel tab is rendered out, values of the
> others will be lost after the submit.
>
> If we want this behaviour (e.g. a tab which does only output of
> content) we should introduce a separate attribute which performs this
> approach.
>
> regards,
>
> Gerald
>
> On 9/26/06, grantsmith@apache.org <gr...@apache.org> wrote:
> > Author: grantsmith
> > Date: Tue Sep 26 11:56:50 2006
> > New Revision: 450145
> >
> > URL: http://svn.apache.org/viewvc?view=rev&rev=450145
> > Log:
> > TOMAHAWK-701: patch applied
> >
> > Modified:
> >     myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tabbedpane/HtmlTabbedPaneRenderer.java
> >
> > Modified: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tabbedpane/HtmlTabbedPaneRenderer.java
> > URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tabbedpane/HtmlTabbedPaneRenderer.java?view=diff&rev=450145&r1=450144&r2=450145
> > ==============================================================================
> > --- myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tabbedpane/HtmlTabbedPaneRenderer.java (original)
> > +++ myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tabbedpane/HtmlTabbedPaneRenderer.java Tue Sep 26 11:56:50 2006
> > @@ -542,7 +542,10 @@
> >                  if (tabIdx != selectedIndex) {
> >                      writer.writeAttribute(HTML.STYLE_ATTR, "display:none", null);
> >                  }
> > -                RendererUtils.renderChild(facesContext, child);
> > +                if (tabbedPane.isClientSide() || selectedIndex == tabIdx) {
> > +                  // render all content in client side mode or only the selected in server side mode
> > +                  RendererUtils.renderChild(facesContext, child);
> > +                }
> >                  writer.endElement(HTML.DIV_ELEM);
> >
> >                  tabIdx++;
> >
> >
> >
>
>
> --
> http://www.irian.at
>
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>


-- 

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces

Re: svn commit: r450145 - /myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tabbedpane/HtmlTabbedPaneRenderer.java

Posted by Gerald Müllan <bi...@gmail.com>.
Hi Grant,

to my mind the patch will not work the proper way. If every time only
the content of the active panel tab is rendered out, values of the
others will be lost after the submit.

If we want this behaviour (e.g. a tab which does only output of
content) we should introduce a separate attribute which performs this
approach.

regards,

Gerald

On 9/26/06, grantsmith@apache.org <gr...@apache.org> wrote:
> Author: grantsmith
> Date: Tue Sep 26 11:56:50 2006
> New Revision: 450145
>
> URL: http://svn.apache.org/viewvc?view=rev&rev=450145
> Log:
> TOMAHAWK-701: patch applied
>
> Modified:
>     myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tabbedpane/HtmlTabbedPaneRenderer.java
>
> Modified: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tabbedpane/HtmlTabbedPaneRenderer.java
> URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tabbedpane/HtmlTabbedPaneRenderer.java?view=diff&rev=450145&r1=450144&r2=450145
> ==============================================================================
> --- myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tabbedpane/HtmlTabbedPaneRenderer.java (original)
> +++ myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tabbedpane/HtmlTabbedPaneRenderer.java Tue Sep 26 11:56:50 2006
> @@ -542,7 +542,10 @@
>                  if (tabIdx != selectedIndex) {
>                      writer.writeAttribute(HTML.STYLE_ATTR, "display:none", null);
>                  }
> -                RendererUtils.renderChild(facesContext, child);
> +                if (tabbedPane.isClientSide() || selectedIndex == tabIdx) {
> +                  // render all content in client side mode or only the selected in server side mode
> +                  RendererUtils.renderChild(facesContext, child);
> +                }
>                  writer.endElement(HTML.DIV_ELEM);
>
>                  tabIdx++;
>
>
>


-- 
http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces