Camunda Modeler form fields organization - forms

I wanna to use Camunda Modeler to create a complicated form cards for User Tasks consist about 20-30-50 fields divided in several tabs. Many cards will contain the same fields and fields groups. I wanna to have an ability to create and reuse fields groups or somewhat liked on fields groups. How can organize process with Modeler? What is the appropriate template? Or maybe you can recommend another tool?
I have a variant of template, but it's not clear for me now. The complicated form will be divided into several tabs. For example the card consists in 2 Tabs: Tab1 and Tab2. Then I can suppose that the card with active Tab1 is one state of the card, and the same card with active Tab2 - the another state. And then I can configure a scenario for each tab and transitions between tabs. Does it look believable?

Apparently, there are no standard solutions of such kind of issue. I'm going to make an integration form.io formBuilder into Camunda modeler instead standard form constructor. Maybe it looks madly, but I'm sure - it would be working. The formio has angular implementation of the constructor and modeler is based on the electron technologies. There are looks the same, and integration is not imagine as great headache. I hope. But I need a lot of time to do this.

We created our own framework with Scala / Play and Semantic-UI (Here you can use whatever technology you like).
You model the user form in the Camunda Modeler, using additional properties to describe the 'special' components, like File Upload, Field Grouping, Number Field, Radio Buttons etc.
We use then Play Templates / Semantic-UI to implement the generic Forms.
So in our implementation we use the defined properties to generate them in the Form.
So for example you can provide a property width. This value we use for the Semantic-UI layout which allows widths 1 to 16. So you have a simple possibility to have more than one component in one row.

Related

Backpack Laravel Filterable Crud List in Tabbed Content

I have two Crud Controllers, Project & PurchaseOrders.
When I display a particular project content (say URL /project/2/show), its related purchase orders are displayed in table format in one of the tabs like picture below:
Since there will be a lot of purchase orders within same project, I need the table above to be filterable, like in the method SetupListOperation() in PurchaseOrders Controller like picture below:
Basically, how do I put PurchaseOrders Controller List Operation within a Project content Tab?
Thanks
In short, in Backpack version 4.x / 5.x, you can't. The ListOperation wasn't designed to be used that way, so it will be very difficult to do. It will be faster to just code that feature yourself, with a limited set of features - only the ones you need.
The main reason why it wouldn't be simple is that both the ListOperation and the CreateOperation / UpdateOperation would be using the CRUD singleton, whereas you need to show/manipulate entries in two different entities (projects and purchase orders).
The Backpack team is working on a feature that you could use for this (a "table" widget you can include anywhere, including there), but it will probably take 2-3 more months to launch.
Also, there's a Backpack add-on offering something similar (see https://github.com/izica/relations-widgets-for-backpack ) but it's meant for the Show operation (not Update) and it doesn't include filtering, from what I can tell.
So the best you can do, in my opinion, is to just add some rough filters to your custom view - they'll work just like you want, and when an official solution becomes available, you can use that then.

SYMFONY FORM - filter attribute form on top with submit button, that provides a table with other form used to edit each row details

I am looking for best practices on SYMFONY FORM handling to achieve the following standard page (surprisingly I haven't found anything similar existing yet on SO).
Here is a shema of what I want to achieve:
As you can see at the top there is a SYMFONY FORM to filter the results that should be displayed.
It displays a table and each tuple of the table should permit to open another SYMFONY FORM kind linked to the tuple.
I am in the process of learning SYMFONY FORM, so far, I can manage to create the top row FORM to set the filter that'll apply to the table display.
But I wonder if anyone has experience on the second part: Displaying the table that embed as well many forms of a similar kind -That seems a bit more complex. I read about TWIG.EXTENSION and FORM.COLLECTION, I'll investigate that. But if someone could save me to re-invent the wheel and lead me to some direct shortcut, I'd be really grateful.
No idea if it's the best practice, but one way to do it would be to create a new property for your entity being listed in this table, called $editionForm (without mapping it to the database) for example.
Then, either throught a custom loop or by listening to a doctrine (or any ORM you use) hydration event (or triggering such an event if you don't use any ORM), fill the property with the generated form, probably within a dedicated service.
Then, just use it in your template like this :
$entity->getEditionForm()->render()

web2py autocomplete widget not working

need a hint on web2py built-in autocomplete widget.
in controller:
db.otc_products.counterparty.widget = SQLFORM.widgets.autocomplete(request, db.counterparty.Long_Name, limitby=(0,10), min_length=2)
in model:
db.define_table('otc_products',
Field('counterparty','reference counterparty',
widget = SQLFORM.widgets.autocomplete(request, db.counterparty.Long_Name, id_field=db.counterparty.id,
limitby=(0,20), min_length=2 )),
...
db.define_table('counterparty',
Field('Long_Name'),
...
The resulted sqlform.grid returns a grid which features the counterparty field to be a regular table field instead of a widget, let alone autocompelete widget.
What is the configuration that needs to modify here to get a autocomplete widget shown and work.
thanks in advance!
check link above for a snapshot of tge grid.
The .widget attribute of a Field object produces the HTML form input element used for the field in forms created via SQLFORM. The grid is for displaying values stored in the database, not for editing those values. The display of a given field in the grid is therefore determined by the field's .represent attribute, not by the .widget attribute.
As you have mentioned in your comment above, you can use a form widget within the .represent attribute, and the grid will then display the widget. However, in both your model and controller code above, you have set the .widget attribute of the counterparty field rather than the .represent attribute.
In any case, there is really no point to using form widgets within the grid itself, because the grid provides no mechanism for making inline updates to records via those widgets (i.e., you will be able to select/input values in each widget, but you will have no way to submit the changes so they will be persisted in the database).
In theory, you could build your own inline editing functionality on top of the grid (via Javascript that reads the values from the inputs and posts the updated records to the server via Ajax). But this functionality is not built into the grid.
The grid does provide a way to edit individual records. If you configure the grid to be editable, each row will include an "Edit" button, and when you click it, you will be taken to an edit form on a separate page. That edit form will make use of any widgets you have defined, including the autocomplete widget you have configured in your code.
For web2py and stackoverflow communities and the sake of completeness, developer who is leveraging this framework and streamlining the web development:
the sqlform.grid can be secondarily developed to extend its capacity in some ways, just need to be very familiar with the underlying .py files which is open source and modifiable to meet your needs.
folks have posted solutions like below, with this one can in-line edit a gird, which provides convenient editing as well as comparing between sql records, the sql tables can be managed thru the grid with greater transparencies without jumping back and forth for an edit:
http://www.web2pyslices.com/slice/show/1928/basic-inline-editing-in-sqlformgrid-no-plugin-no-javascript
p.s.: I am utilizing web2py for faster development for a financial firm, so there is really no time for me to extend this framework to unclock additional functionalities, like the one above. when I do have some free time, if there is actual development need, I will extend web2py for particular requirement, and post the code on the web.

Repeatable data content in umbraco

I am just wondering is there any plugin to create dynamic content for a page i.e something similar to a data repeaters in .net. To make it simple it should be a section that should contains 5 to 6 fields/property like
heading
heading 2
image
content - rich text editor
info
This must be in repeatable control so that the editor can add any number of these section a page and all these should be displayed in a single page.
Is there a plugin for the above functionality or what is the best way to achieve this.Any help would be greatly appreciated.
Thanks
Aneesh
You can achieve this without any plugins.
Create your repeatable section (containing the relevant fields) as a document type, and then use the multi-node picker in another document type to select one or many of the sections.
So for example, I could have a FAQs page (which uses a document type called "FAQs Page"), and I want to be able to add multiple question and answers to this page. I could set up a document type called "Question". This will contain two fields: Question and Answer.
On the "FAQs Page" document type, I would add a multi-node picker field called "Questions". This way, an author could select multiple "Question" nodes to appear on the FAQs page.
You would obviously need the code to output this, and also you would create a data type that inherited from multi-node picker, so that you could limit the selection to only Question nodes.
There is also the Repeatable Custom Content datatype which works well but does not support all data types. But it does support all the ones you need for your stated purpose (textstring, media picker, richtext area, etc).
You can find it here: http://our.umbraco.org/projects/backoffice-extensions/repeatable-custom-content I've used it a few times and it works really well in certain situations (e.g. where the items will not be shared across different pages of your site).
If you are sharing content components across multiple pages then #Digbyswift's solution is perfect.
I've always Digbyswifts method, but whilst looking for an alternate solution tonight I found this plugin, which is excellent for those situations where creating lots of widget nodes feels like overkill. It's licensed but the free older version is also available.
http://inaboxdesign.dk/blog/widget-builder-for-umbraco/

How to add JFace table to Eclipse RCP New Project Wizard

I have a Wizard with two pages: pageone extending WizardNewProjectCreationPage, and pagetwo is extending WizardPage. I want the user to be able to create the project first, and then add files to the project on the second page.
For the latter I want to use a SWT Table (?) like when you pick an interface in the Java Class Wizard in Eclipse IDE (cf. picture here). Also the "Add" button next to it.
How can I achieve this? Do I have to use Eclipse Forms API for this? Or simply add a SWT Table? I have used the Plug-In Spy but the source code given in NewClassWizardPage and NewTypeWizardPage seems to be very specific to this example and I cannot make sense of it.
I've also had a look at vogella's tutorial for JFace table, but I can't get my head around it.
Just some basic steps would be great, or maybe somebody has done this before?
I can easily understand why you're confused... there are indeed many ways to do this. You even left out Data Binding which provides you with yet another way to populate and decorate the table in question.
To sum up the usage of the different APIs:
SWT provides the basic widgets and controls. Often these have a rather irregular low-level interface - especially compared with Swing - but you need to access the SWT controls to lay them out (an exercise that can be complicated in itself). Also many of the listeners are on the controls.
JFace provides a set of viewers on top of the corresponding structured SWT controls - e.g. TableViewer on top of Table. These viewers provides a high-level interface to the functionality of the underlying control - e.g. with models, label providers, sorting, filtering and more. (The viewers can easily be compared with the Swing counterparts...)
Eclipse Forms provides a (relatively) simple way to create views, dialogs, etc that looks like web pages. Examples of this are the various PDE editors.
Data Binding provides a (somewhat complicated) way to bind controls (including Tables) to a data structure (Bean, EMF or POJO based).
So... you have to decide on whether to use the model facet of JFace and Data Binding, but the rest of the APIs are often combined in the same view or dialog.
NewClassWizardPage and NewTypeWizardPage are both particular complicated examples of wizards - don't base your own work on these!
For your particular case - as I understand it - I would use a simple JFace TableViewer to hold the list of interfaces... (I use a TableViewer rather than a ListViewer as the later cannot have an image as part of the label provider.) The "Add" and "Remove" buttons will manipulate the model of the viewer and then update the viewer. You don't need Eclipse Forms as the wizards usually don't look like web pages. And Data Binding is also an overkill here given the very, very simple data for the wizard.
Please note that the function of a wizard is only performed after all the wizard pages has been shown and the "Finish" button is pressed.