#7 Problems with Persist on admin forms: remembers too much

closed-fixed
5
2003-05-11
2003-03-07
No

When switching between different objects on admin
screens, the list sort field/order should not persist
across objects. It seems there's code to store a sort
field/order for each object type, but I don't see this
working. For example, if I'm viewing a document list
and I have it sorted descending by name, when I switch
to People, I should see this sorted by the default, not
by name,DESC.

As I mentioned, there seems to be code to remember the
sort order for each object type -- so if I'm viewing
Documents by name-DESC, switch to People and sort it by
lname-ASC, then switch back to Documents, I should see
it name-DESC again. This behaviour would be ideal,
although just making it NOT apply the current sort when
you click to a new object would be better than current.

Overall, it seems that more control is needed on what
values frmpersist stores. The same problem as above
occurs when adding a search box -- the search term
persists across objects, and only goes away when
manually cleared.

Discussion

  • Jase Roberts

    Jase Roberts - 2003-03-11

    Logged In: YES
    user_id=662162

    Session seems to have stored info about the other datatypes
    you have viewed, including a stored sort order. Seems it's
    supposed to restore this when you return to the datatype,
    but does not.

    [object:press_release] => Array
    (
    [persist] => Array
    (
    [path] =>
    object:spokesperson
    [save_path] =>
    object:spokesperson
    [memorize] =>
    [orderby_field] => date1
    [orderby_direction] => ASC
    [current_page] => 1
    [approval_view] => approved
    )

    )

    [object:document] => Array
    (
    [persist] => Array
    (
    [path] => object:document
    [save_path] =>
    object:document
    [memorize] =>
    [orderby_field] => name
    [orderby_direction] => ASC
    [current_page] => 1
    [approval_view] => approved
    )

    )

    [object:experts_and_sources] => Array
    (
    [persist] => Array
    (
    [path] =>
    object:experts_and_sources
    [save_path] =>
    object:experts_and_sources
    [memorize] =>
    [orderby_field] => name
    [orderby_direction] => ASC
    [current_page] => 1
    [approval_view] => approved
    )

    )

     
  • Nyk Cowham

    Nyk Cowham - 2003-03-11
    • assigned_to: nobody --> sandys1
     
  • Jase Roberts

    Jase Roberts - 2003-03-12
    • summary: List order field/direction should reset with loadTab() --> Problems with Persist on admin forms
     
  • Jase Roberts

    Jase Roberts - 2003-03-12
    • summary: Problems with Persist on admin forms --> Problems with Persist on admin forms: remembers too much
     
  • Jase Roberts

    Jase Roberts - 2003-03-12

    Logged In: YES
    user_id=662162

    One element of Persist that should certainly be regarded as
    a bug is that the current page number is remembered when
    switching between objects. E.g if I'm on page 4 of
    Documents and switch to Press Releases, I'm on page 4 of
    Press Releases.

     
  • Sandy Smith

    Sandy Smith - 2003-05-11

    Logged In: YES
    user_id=688456

    Got it. Made sorting and searching datatype-specific. The
    path information only gets transmitted when load_tab() is
    called in Javascript. However, since load_tab() isn't called
    every time a sort is changed, I surmise that top-level
    (non-path-specific) variables were used to store them as a
    workaround.

    Rather than mess with that, I just made every sorting and
    searching var stored in path persist as the form variable
    plus _{numeric datatype id}.

    I also added a "clear search" function, which was
    desperately needed.

    This should all be in the upcoming 0.0.5 release.

     
  • Sandy Smith

    Sandy Smith - 2003-05-11
    • status: open --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks