Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » scout » extension point for custom columns(How to configure the extension point for a derived column type)
extension point for custom columns [message #1004015] Tue, 22 January 2013 07:34 Go to next message
Thomas Mangold is currently offline Thomas Mangold
Messages: 2
Registered: January 2013
Location: Basel
Junior Member
Deriving a custom FormField is well documented. It's found via the plugin configuration as described in the tutorial:
      <formField
            scope="global"
            active="true"
            modelClass="org.eclipse.scout.rt.client.ui.form.fields.decimalfield.IDecimalField"
            name="decimalfield">
         <uiClass
               class="ch.sbb.cis.scout.rt.ui.swt.form.fields.decimalfield.CisSwtDecimalField">
         </uiClass>
      </formField>

But for a custom table or column this configuration via the Interface does not work
      <formField
            scope="global"
            active="true"
            modelClass="org.eclipse.scout.rt.ui.basic.table.ICisTable"
            name="table">
         <uiClass
               class="ch.sbb.cis.scout.rt.ui.swt.basic.table.ICisSwtScoutTable">
         </uiClass>
      </formField>  


Which tag (if possible) is necessary in the plugin configuration?
In my opinion, is there a missing extension point for org.eclipse.scout.rt.ui.basic or org.eclipse.scout.rt.ui.basic.table


_\|/_ Thomas _\|/_
/|\ Mangold /|\

[Updated on: Tue, 22 January 2013 07:34]

Report message to a moderator

Re: extension point for custom columns [message #1004218 is a reply to message #1004015] Tue, 22 January 2013 15:25 Go to previous messageGo to next message
Beat Schwarzentrub is currently offline Beat Schwarzentrub
Messages: 40
Registered: November 2010
Member
Thomas Mangold wrote on Tue, 22 January 2013 07:34
In my opinion, is there a missing extension point for org.eclipse.scout.rt.ui.basic or org.eclipse.scout.rt.ui.basic.table


You cannot add a custom UI for org.eclipse.scout.rt.client.ui.basic.table.ITable because it is not a form field (i.e. extends org.eclipse.scout.rt.client.ui.form.fields.IFormField). What you can do, is to provide a custom UI representation for org.eclipse.scout.rt.client.ui.form.fields.tablefield.ITableField. ITable is "just" a model for the table, the field itself is subclassed from ITableField (with an ITable as an inner class).

If you look for example at SwingScoutTableField (the mapping class from the Scout model to the Swing widgets) you can see how the ITable is mapped to a SwingScoutTable in setTableFromScout(). You could provide your own CustomSwingScoutTableField class that creates a custom CustomSwingScoutTable.

But beware, because a table is a rather complex widget, the UI implementation is not that simple, too.

Beat
Re: extension point for custom columns [message #1005231 is a reply to message #1004218] Thu, 24 January 2013 12:23 Go to previous message
Jeremie Bresson is currently offline Jeremie Bresson
Messages: 529
Registered: October 2011
Senior Member
Just for my curiosity, can you provide some inputs on why you need a specific column?

I never had a such use case...


If your use case is "add a MyBean Column" (where MyBean is every Object):

If I remember it correctly, you can add a AbstractColumn<MyBean> in your table.

You probably need to override some of the Operation functions. At least execDecorateCell(..)

If you want to reuse the column you can create an abstract class for it (AbstractMyBeanColumn).


Let me know if you want to know more about this approach.


.
Previous Topic:How to use SnapBox
Next Topic:Rayo & rap support with Scout 3.9.0 Milestone 4
Goto Forum:
  


Current Time: Thu Apr 17 14:25:06 EDT 2014

Powered by FUDForum. Page generated in 0.07331 seconds