create new tag
, view all tags

EditHiddenTablePluginDev Discussion: Page for developer collaboration, enhancement requests, patches and improved versions on EditHiddenTablePlugin contributed by the TWikiCommunity.
• Please let us know what you think of this extension.
• For support, check the existing questions, or ask a new support question in the Support web!
• Please report bugs below

Feedback on EditHiddenTablePlugin

-- ThomasWeigert - 19 Nov 2006

Thanks Thomas for contributing & sharing yet another plugin!

  • I made some mods to the plugin topic (diff, raw diff), please feel free to roll that back into the next release.
  • I tagged the plugin topic so that it is easier to find. Please help on tag votes.
  • For easier maintenance and better chance of surviving future TWiki upgrades, possibly remove the additional scripts and handle everything in the plugin code? You can borrow ideas from the EditTablePlugin and CommentPlugin.
  • How about measuring and documenting the PluginBenchmarks numbers?

BTW, how does this plugin relate to the EditTablerowPlugin?

-- PeterThoeny - 26 Nov 2006

It is basically the same functionality, except that EditTablerowPlugin puts the table data as ordinary twiki tables, while EditHiddenTablePlugin puts the table data into meta data, and thus hides it from ordinary view/edit. I am using this in some TWikiApplications, such as YetAnotherXpTrackerPlugin, where I want to add some content to a topic via templates, but which should contain tabular data that cannot be stored in the form.

Remember, if you want to have information added in topic specific templates that are dependent on the topic you only have a few places where that information can come from:

  • stored in the form
  • computed
  • stored in the topic text
This adds yet another source of data (the form is not good in storing tabular data, this data cannot be computed, and obviously, storing it in topic text would defeat the purpose).

-- ThomasWeigert - 27 Nov 2006

Can you give a simple example of how we might take advantage of this ?

-- KeithHelfrich - 27 Nov 2006

Here are two use cases:

  • In your topic, you want to show a table, but you do not want the table content to be visible, and editable via a topic (for example, inexperienced users might make a mistake in editing the table and mess it up). You can put the tag %EDITHIDDENTABLE{...}% there, and it will render the table. While you could prevent seeing the table content in the topic by using just an include, in the included topic you then could edit the table as a whole, which you were trying to prevent.
  • Via your topic specific template you want to show a table always at the bottom of the topic. You want to keep the table data with this topic, rather than storing it in another topic and including it.
The current editing model of included topics makes tables in metadata more user friendly, as when you edit an included topic, you have to go to the included topic first and you then have to specifically come back to the current topic. None of this navigation is required using this plugin. All that said, EditSectionPlugin will support better editing of included topics, not requiring this navigation (MultiEditPlugin already supports this under TWiki 4.1).

-- ThomasWeigert - 27 Nov 2006

Thanks Thomas for this plugin! I just completed a project that involved a whole set of template-defined tables which I would have preferred to keep hidden in normal edit and thus would have very much appreciated having this plugin.

-- LynnwoodBrown - 27 Nov 2006

Bummer... you should have said something. We have been using this plugin for years and I just have not gotten around to moving it over to Dakar...

-- ThomasWeigert - 27 Nov 2006

This plugin is not working correctly. When I use %EDITHIDDENTABLE{}% in a topic, I get the following error:

TWiki detected an internal error - please check your TWiki logs and webserver logs for more information.

Can't locate TWikipath in @INC (@INC contains: path path-linux-thread-multi/ path path path . path-linux-thread-multi path-linux-thread-multi path-linux-thread-multi path-linux-thread-multi path-linux-thread-multi path-linux-thread-multi path path path path path path path path-linux-thread-multi path-linux-thread-multi path-linux-thread-multi path-linux-thread-multi path-linux-thread-multi path-linux-thread-multi path path path path path path path path-linux-thread-multi path)

-- AlokNarula - 29 Nov 2006

It sounds like you are using an outdated version of the plugin (in the initial upload one necessary file was omitted from the zip file). Just to be sure, I have reuploaded the plugin once more. Please download again, or at least make sure you have an Edit.pm file in the plugin-specific lib directory.

-- ThomasWeigert - 29 Nov 2006

I've created a TWiki form named "MeetingRequestForm". When I use EDITTABLEROW, I'm able to edit tables row by row, using a form with appropriate controls for each field. However when I use the EDITHIDDENTABLE syntax, nothing works. What is the problem. Here is my code:

%EDITTABLEROW{template="MeetingRequestForm" changerows="on"}%
%EDITHIDDENTABLE{template="MeetingRequestForm" changerows="on"}%

-- AlokNarula - 06 Dec 2006

When you say "nothing works", what do you really mean? I guess you do realize that you will start out with an empty table, and, through clicking on the "Edit table" button start adding rows...? The rows will be stored in metadata, not right after the tag in the text...

-- ThomasWeigert - 06 Dec 2006

Thomas, I see the following text in EditHiddenTablePlugin "Add a %EDITHIDDENTABLE{...}% variable just before an existing table to make it editable, or add the variable anywhere in a topic to start a new table.". So using my EDITHIDDENTABLE statement, I should be able to display an Edit table button in my topic. When I click this button, I should be able to add rows to the table and save the rows in the Meta fields. Do I read you correctly?

-- AlokNarula - 06 Dec 2006

Aah. The doc is incorrect (copy from EditTablerowPlugin). This plugin does nothing to existing tables. You start a table by just putting the tag in and click the edit table button... I will fix the doc.

-- ThomasWeigert - 06 Dec 2006

Thanks Thomas for the clarification. Coming back to the question of how to use EditHiddenTable. I have a MeetingRequestForm with 5 fields like this:

---+ Meeting Form Definition
   | *Name* | *Type* | *Size* | *Values* | *Tooltip messages* | *Attributes* | 
   | Chairman | label | | %WIKIUSERNAME% | Meeting Chairman | |
   | Date | date | 0 | %SERVERTIME{$mo/$day/$year}% | Enter Date | |
   | Subject | textarea | | | Enter Subject| |
   | Location | select | 1 | Falcon, Flamingo, Heron, Lapwing, Sarus | Select Meeting Room | |
   | Bridge Code | select | 1 | somenumber, anothernumber | Select Bridge Code | |
I would like to populate this from via the EDITHIDDENTABLE. I don't want to use EDITTABLEROW because it will insert the data in my topic. How do I achieve that?

-- AlokNarula - 07 Dec 2006

Put this form into file MeetingRequestForm, say. Then put in a topic

assuming that topic and form are in the same web, otherwise add web prefix.

-- ThomasWeigert - 08 Dec 2006

That is precisely what I did, but I don't see an Edit button in my topic. I created a topic TestingEditHiddenPlugin and entered the above text in TestingEditHiddenPlugin. If the plugin is working fine, then I should see an Edit button in TestingEditHiddenPlugin. Clicking this button should enable me to add rows to my Meeting Request Form and the data should be saved as Meta information in TestingEditHiddenPlugin.

-- AlokNarula - 08 Dec 2006

I have exactly the same problem. If I use the %EDITHIDDENTABLE{...}% syntax, nothing shows up. What could be the problem?

-- LuisEnrique - 01 May 2007

The Problem is realtivly simple to solve add an argument tablename to the PluginCall to get it to work.

%EDITHIDDENTABLE{template="TestTopic3" tablename="test1" changerows="on"}%

To enable the Changerow function you need to add an extra row to your table

---+ Meeting Form Definition
   | *Name* | *Type* | *Size* | *Values* | *Tooltip messages* | *Attributes* | 
   | Editlink | label | |  | Link for Row editing | |
   | Chairman | label | | Main.JensDienst | Meeting Chairman | |
   | Date | date | 0 | 06/21/2007 | Enter Date | |
   | Subject | textarea | | | Enter Subject| |
   | Location | select | 1 | Falcon, Flamingo, Heron, Lapwing, Sarus | Select Meeting Room | |
   | Bridge Code | select | 1 | somenumber, anothernumber | Select Bridge Code | |
-- JensDienst - 22 Jun 2007

I added slashes to some input fields in Edit.pm (line 152–156) to be valid XHTML, see attached EditHiddenTablePluginModified20070925.zip

-- FrankSpangenberg - 25 Sep 2007

Has anyone come up with a way to search and return this data? I like the other functionality, but without it being searchable, it's almost useless for my purposes.

-- MatthewCardozo - 15 Oct 2007

You mean searching for table data? Look at: SearchPatternCookbook#Pattern_1_Extract_values_from_a

-- FrankSpangenberg - 16 Oct 2007

In this case, the search needs to be able to access the data that is stored by the EditHiddenTablePlugin. This plugin stores things in a format of:

%META:TABLE{name="119873984" fieldname1="" fieldname2="" fieldname3="" tablename="sometablename" template="TopicWithDifinitionForm"}%

There is a line like that for each row in the hidden table. The problem is that I can't extract those field values with $pattern() and they aren't in the right format for META or METASEARCH.

-- MatthewCardozo - 16 Oct 2007

Topic attachments
I Attachment History Action Size Date Who Comment
Compressed Zip archivezip EditHiddenTablePluginModified20070925.zip r1 manage 5.5 K 2007-09-25 - 11:28 FrankSpangenberg Modified: Added slashes to some input fields in Edit.pm (line 152–156) to be valid XHTML
Edit | Attach | Watch | Print version | History: r23 < r22 < r21 < r20 < r19 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r23 - 2007-10-16 - MatthewCardozo
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.