• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item5913: EditTablePlugin does not update label fields upon save

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Extension EditTablePlugin Normal New   n/a  

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

Ran into a new interesting bug:

EditTablePlugin is very nice in that you can combine it with other plugins that generate tables to then edit the resultant table structure and have the edited result saved into the topic. In other words, the table to be edited may be the result of another TWiki tag, rather than have been loaded from the topic. Examples of this are when the table can be optionally retrieved from somewhere other than the saved topic (e.g., a web site, a data base), but we then want to be able to edit the table and save into the topic. This works very well, almost. However, there is one gotcha.

In order to explain this better, let me review the algorithm this plugin uses when saving:

  1. if it is determined that a save button was pressed, call processText again in saveMode
  2. now load the saved text for the topic
  3. merge the text from the query with the saved text in the topic for the edited table:
    1. for each row in the saved text, replace its fields with fields passed in from the query
    2. if there are added rows in the query, add these to the table
  4. save the topic

The problem occurs if the table in the query is different from the stored table, but there are fields that were formatted as labels. These fields will not be passed to the plugin for update, and consequentially will not be updated in the text. The stored values will be chosen instead.

-- TWiki:Main/ThomasWeigert - 10 Aug 2008

ItemTemplate
Summary EditTablePlugin does not update label fields upon save
ReportedBy TWiki:Main.ThomasWeigert
Codebase 4.2.0, 4.2.1
SVN Range TWiki-5.0.0, Sun, 03 Aug 2008, build 17280
AppliesTo Extension
Component EditTablePlugin
Priority Normal
CurrentState New
WaitingFor

Checkins

TargetRelease n/a
ReleasedIn

Topic revision: r1 - 2008-08-10 - ThomasWeigert
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback