FAQ
Hello



I'm trying to code a single page JSF application to get familiar with
Trinidad components (1.0.1) and the JSF framework.



I simply click on a command button to execute a method initialising a
List property of a managed bean (scope=request) and use a tr:table
component to display the 25 first element of the list.



If I use the built-in paging support of the tr:table component to see
the 25 next elements, the list elements disappears and a new managed
bean gets instantiated.



I just want to be sure that it's a normal behaviour and not something
I'm doing wrong.



If I set the managed bean with the session scope attribute it works fine
but I thought it wouldn't be necessary to deal with session beans till I
add some complexities like selecting an element in the list to display
its detailed information on a second page.



Please help clarifying this.

Search Discussions

  • Arvind Pandey at Jul 13, 2007 at 6:03 am
    Hi All,

    I am using t:panelGrid . I have two columns. in first column we have
    large data to be displayed.
    in second column there is very small data but the problem is this small data
    get displayed in the center of column.
    Can we make it to be displayed at the top left corner of second column?

    regards........
    Arvind

    Disclaimer: The information contained in this e-mail and attachments if any are privileged and confidential and are intended for the individual(s) or entity(ies) named in this e-mail. If the reader or recipient is not the intended recipient, or employee or agent responsible for delivering to the intended recipient, you are hereby notified that dissemination, distribution or copying of this communication or attachments thereof is strictly prohibited. IF YOU RECEIVE this communication in error, please immediately notify the sender and return the original message.
  • Angel Miralles Arevalo at Jul 13, 2007 at 6:22 am
    You have to play with the following attributes:

    <t:panelGrid columns="2" columnsClasses="column1Style, column2Style"></t:panelGrid>

    column2Style{
    vertical-align: top;
    text-align: right;
    ......
    }

    ----- Mensaje original ----
    De: Arvind Pandey <arvind_p@datamatics.com>
    Para: MyFaces Discussion <users@myfaces.apache.org>
    Enviado: viernes, 13 de julio, 2007 8:12:18
    Asunto: panelgrid


    Hi All,

    I am using t:panelGrid . I have two columns. in first column we have
    large data to be displayed.
    in second column there is very small data but the problem is this small data
    get displayed in the center of column.
    Can we make it to be displayed at the top left corner of second column?

    regards........
    Arvind

    Disclaimer: The information contained in this e-mail and attachments if any are privileged and confidential and are intended for the individual(s) or entity(ies) named in this e-mail. If the reader or recipient is not the intended recipient, or employee or agent responsible for delivering to the intended recipient, you are hereby notified that dissemination, distribution or copying of this communication or attachments thereof is strictly prohibited. IF YOU RECEIVE this communication in error, please immediately notify the sender and return the original message.



    ______________________________________________
    LLama Gratis a cualquier PC del Mundo.
    Llamadas a fijos y móviles desde 1 céntimo por minuto.
    http://es.voice.yahoo.com
  • Francisco Passos at Jul 13, 2007 at 9:00 am
    As I have come to understand, this is expected. Although personally I
    believe it is not intuitive at all for any user.

    What happens is your bean is request scoped and as such its contents are
    lost when you make the second request. What you need is either
    request-scoped state saving (for instance using Tomahawk's saveState
    component) or using Trinidad's processScope, which I'm convinced uses
    session-scoped variables to keep state in a clever way.

    Personally I'm using t:saveState and everything works like a charm - table
    paging and inner table support (having tables render inside a column of a
    table) with paging.
    On 7/12/07, Laperle, Denis wrote:

    Hello



    I'm trying to code a single page JSF application to get familiar with
    Trinidad components (1.0.1) and the JSF framework.



    I simply click on a command button to execute a method initialising a List
    property of a managed bean (scope=request) and use a tr:table component to
    display the 25 first element of the list.



    If I use the built-in paging support of the tr:table component to see the
    25 next elements, the list elements disappears and a new managed bean gets
    instantiated.



    I just want to be sure that it's a normal behaviour and not something I'm
    doing wrong.



    If I set the managed bean with the session scope attribute it works fine
    but I thought it wouldn't be necessary to deal with session beans till I add
    some complexities like selecting an element in the list to display its
    detailed information on a second page.



    Please help clarifying this.

  • Laperle, Denis at Jul 13, 2007 at 1:11 pm
    Francisco



    I'm now using the process scope feature of Trinidad and it's works fine but it means that I will have to clear the process scope context manually at the appropriate time within the application to avoid high memory consumption on the server side.



    I will add some navigation cases and see what else I need to save within process scope variables in a typical CRUD application.



    Thank you



    Denis



    ________________________________

    De : Francisco Passos
    Envoyé : 13 juillet 2007 05:00
    À : MyFaces Discussion
    Objet : Re: Trinidad table paging



    As I have come to understand, this is expected. Although personally I believe it is not intuitive at all for any user.

    What happens is your bean is request scoped and as such its contents are lost when you make the second request. What you need is either request-scoped state saving (for instance using Tomahawk's saveState component) or using Trinidad's processScope, which I'm convinced uses session-scoped variables to keep state in a clever way.

    Personally I'm using t:saveState and everything works like a charm - table paging and inner table support (having tables render inside a column of a table) with paging.

    On 7/12/07, Laperle, Denis wrote:

    Hello



    I'm trying to code a single page JSF application to get familiar with Trinidad components (1.0.1) and the JSF framework.



    I simply click on a command button to execute a method initialising a List property of a managed bean (scope=request) and use a tr:table component to display the 25 first element of the list.



    If I use the built-in paging support of the tr:table component to see the 25 next elements, the list elements disappears and a new managed bean gets instantiated.



    I just want to be sure that it's a normal behaviour and not something I'm doing wrong.



    If I set the managed bean with the session scope attribute it works fine but I thought it wouldn't be necessary to deal with session beans till I add some complexities like selecting an element in the list to display its detailed information on a second page.



    Please help clarifying this.
  • Francisco Passos at Jul 13, 2007 at 2:34 pm
    Great to know you've got it working.

    I'm now using the process scope feature of Trinidad and it's works fine but
    it means that I will have to clear the process scope context manually at the
    appropriate time within the application to avoid high memory consumption on
    the server side.

    That is exactly why I'm choosing to avoid to use process scope as much as
    I'm avoiding session. I guess I'll only use it if I need to do something
    session-scoped that requires support for tabbed browsing, for instance.

    Until then, I'll try to stick to Tomahawk's saveState component for as long
    as I can.

    On 7/13/07, Laperle, Denis wrote:

    Francisco



    I'm now using the process scope feature of Trinidad and it's works fine
    but it means that I will have to clear the process scope context manually at
    the appropriate time within the application to avoid high memory consumption
    on the server side.



    I will add some navigation cases and see what else I need to save within
    process scope variables in a typical CRUD application.



    Thank you



    Denis


    ------------------------------

    *De :* Francisco Passos
    *Envoyé :* 13 juillet 2007 05:00
    *À :* MyFaces Discussion
    *Objet :* Re: Trinidad table paging



    As I have come to understand, this is expected. Although personally I
    believe it is not intuitive at all for any user.

    What happens is your bean is request scoped and as such its contents are
    lost when you make the second request. What you need is either
    request-scoped state saving (for instance using Tomahawk's saveState
    component) or using Trinidad's processScope, which I'm convinced uses
    session-scoped variables to keep state in a clever way.

    Personally I'm using t:saveState and everything works like a charm - table
    paging and inner table support (having tables render inside a column of a
    table) with paging.

    On 7/12/07, *Laperle, Denis* wrote:

    Hello



    I'm trying to code a single page JSF application to get familiar with
    Trinidad components (1.0.1) and the JSF framework.



    I simply click on a command button to execute a method initialising a List
    property of a managed bean (scope=request) and use a tr:table component to
    display the 25 first element of the list.



    If I use the built-in paging support of the tr:table component to see the
    25 next elements, the list elements disappears and a new managed bean gets
    instantiated.



    I just want to be sure that it's a normal behaviour and not something I'm
    doing wrong.



    If I set the managed bean with the session scope attribute it works fine
    but I thought it wouldn't be necessary to deal with session beans till I add
    some complexities like selecting an element in the list to display its
    detailed information on a second page.



    Please help clarifying this.



  • Laurie Harper at Jul 13, 2007 at 9:39 pm

    Francisco Passos wrote:
    Great to know you've got it working.

    I'm now using the process scope feature of Trinidad and it's works fine but
    it means that I will have to clear the process scope context manually
    at the
    appropriate time within the application to avoid high memory
    consumption on
    the server side.
    That is exactly why I'm choosing to avoid to use process scope as much as
    I'm avoiding session. I guess I'll only use it if I need to do something
    session-scoped that requires support for tabbed browsing, for instance.
    I haven't played much with process scope and haven't used it recently,
    so I could be wrong, but:

    That's the point of process scope, though; the clean-up is handled for
    you automatically. That's the difference between process scope and
    session scope.

    IIRC, the way it works is that data you place *into* process scope in
    request N will be available *from* process scope in request N+1, but
    will be gone in request N+2 unless you explicitly refresh it.


    L.
  • Laperle, Denis at Jul 16, 2007 at 1:06 pm
    You're right about the automatic clean-up upon process termination but only a new window starts a new process so it's not very useful unless a new window is associated to each process and sub-process you need.

    I read the documentation about the Spring Webflow JSF integration and it seems very interesting to handle managed-beans state and navigation with this framework. I will seriously consider it for any serious JSF application development requiring conversation scope.

    -----Message d'origine-----
    De : news De la part de Laurie Harper
    Envoyé : 13 juillet 2007 17:38
    À : users@myfaces.apache.org
    Objet : Re: Trinidad table paging

    Francisco Passos wrote:
    Great to know you've got it working.

    I'm now using the process scope feature of Trinidad and it's works fine but
    it means that I will have to clear the process scope context manually
    at the
    appropriate time within the application to avoid high memory
    consumption on
    the server side.
    That is exactly why I'm choosing to avoid to use process scope as much as
    I'm avoiding session. I guess I'll only use it if I need to do something
    session-scoped that requires support for tabbed browsing, for instance.
    I haven't played much with process scope and haven't used it recently,
    so I could be wrong, but:

    That's the point of process scope, though; the clean-up is handled for
    you automatically. That's the difference between process scope and
    session scope.

    IIRC, the way it works is that data you place *into* process scope in
    request N will be available *from* process scope in request N+1, but
    will be gone in request N+2 unless you explicitly refresh it.


    L.
  • Francisco Passos at Jul 16, 2007 at 1:50 pm
    You are probably right about the automatic clean-up. That is actually what
    makes sense. However I should point to what caused me to think otherwise.

    In the Trinidad developer manual, on the page
    http://myfaces.apache.org/trinidad/devguide/communicatingBetweenPages.html

    it is stated:

    pageFlowScope never empties itself; the only way to clear pageFlowScope is
    to manually force it to clear

    What do you make of this? Am I interpreting it wrongly, is it not
    up-to-date?

    I imagine the scope is emptied at specific points, but I can't make out
    specifically when. Or conversely when the scope is kept between requests.
    Can anyone clarify this?

    On 7/16/07, Laperle, Denis wrote:


    You're right about the automatic clean-up upon process termination but
    only a new window starts a new process so it's not very useful unless a new
    window is associated to each process and sub-process you need.

    I read the documentation about the Spring Webflow JSF integration and it
    seems very interesting to handle managed-beans state and navigation with
    this framework. I will seriously consider it for any serious JSF
    application development requiring conversation scope.

    -----Message d'origine-----
    De: news De la part de Laurie Harper
    Envoyé: 13 juillet 2007 17:38
    À: users@myfaces.apache.org
    Objet: Re: Trinidad table paging

    Francisco Passos wrote:
    Great to know you've got it working.

    I'm now using the process scope feature of Trinidad and it's works fine
    but
    it means that I will have to clear the process scope context manually
    at the
    appropriate time within the application to avoid high memory
    consumption on
    the server side.
    That is exactly why I'm choosing to avoid to use process scope as much as
    I'm avoiding session. I guess I'll only use it if I need to do something
    session-scoped that requires support for tabbed browsing, for instance.
    I haven't played much with process scope and haven't used it recently,
    so I could be wrong, but:

    That's the point of process scope, though; the clean-up is handled for
    you automatically. That's the difference between process scope and
    session scope.

    IIRC, the way it works is that data you place *into* process scope in
    request N will be available *from* process scope in request N+1, but
    will be gone in request N+2 unless you explicitly refresh it.


    L.


  • Adam Winer at Jul 16, 2007 at 7:48 pm
    pageFlowScope doesn't empty itself, but:- it is window-specific
    - there's a limited number of pageFlowScope tokens saved

    So, in that sense, it does clean up. The point of the sentence
    you quote is that as you move from page to page, pageFlowScope
    keeps accumulating objects, unless you manually remove them.

    -- Adam


    On 7/16/07, Francisco Passos wrote:

    You are probably right about the automatic clean-up. That is actually what
    makes sense. However I should point to what caused me to think otherwise.

    In the Trinidad developer manual, on the page http://myfaces.apache.org
    /trinidad/devguide/communicatingBetweenPages.html

    it is stated:

    pageFlowScope never empties itself; the only way to clear pageFlowScope is
    to manually force it to clear

    What do you make of this? Am I interpreting it wrongly, is it not
    up-to-date?

    I imagine the scope is emptied at specific points, but I can't make out
    specifically when. Or conversely when the scope is kept between requests.
    Can anyone clarify this?


    On 7/16/07, Laperle, Denis wrote:


    You're right about the automatic clean-up upon process termination but
    only a new window starts a new process so it's not very useful unless a new
    window is associated to each process and sub-process you need.

    I read the documentation about the Spring Webflow JSF integration and it
    seems very interesting to handle managed-beans state and navigation with
    this framework. I will seriously consider it for any serious JSF
    application development requiring conversation scope.

    -----Message d'origine-----
    De: news De la part de Laurie Harper
    Envoyé: 13 juillet 2007 17:38
    À: users@myfaces.apache.org
    Objet: Re: Trinidad table paging

    Francisco Passos wrote:
    Great to know you've got it working.

    I'm now using the process scope feature of Trinidad and it's works
    fine but
    it means that I will have to clear the process scope context manually
    at the
    appropriate time within the application to avoid high memory
    consumption on
    the server side.
    That is exactly why I'm choosing to avoid to use process scope as much as
    I'm avoiding session. I guess I'll only use it if I need to do something
    session-scoped that requires support for tabbed browsing, for
    instance.

    I haven't played much with process scope and haven't used it recently,
    so I could be wrong, but:

    That's the point of process scope, though; the clean-up is handled for
    you automatically. That's the difference between process scope and
    session scope.

    IIRC, the way it works is that data you place *into* process scope in
    request N will be available *from* process scope in request N+1, but
    will be gone in request N+2 unless you explicitly refresh it.


    L.


Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupusers @
categoriesmyfaces
postedJul 12, '07 at 10:05p
activeJul 16, '07 at 7:48p
posts10
users6
websitemyfaces.apache.org

People

Translate

site design / logo © 2018 Grokbase