WebMethods binding table data - business-process-management

I have a simple WebMethods user task which has some simple string data and also a document list in the input document. This document list has 4 fields.
The task view has fields for the strings and an aysnc table for the document list to which I have added a 'Add Row' table button.
The problem is the data. Any existing rows that are edited are reflected in the pipeline after the task has been completed but if I add a new row along with values, then the new row is ignored. I have bound the data directly to the table and also tried a content provider to handle the data but neither method passes the updated table data to the output.
Thanks
Rich

Richard,
Try with below options.
As the table is getting edited on UI - remove the sourceArray/sourceList binding of the content provider/ table provider. (To Populate this provider with list of values,
create a new action
Using data flow implementation assign the provider sourceArray/sourceList to the actual source data list/Array.
Invoke this service before rendering the page (ie., in Initialize method if at the loading of page).
2.Change the provider class to "com.webmethods.caf.faces.data.object.ListTableContentProvider" manually inside the source code and all respective places. (To verify open bindings view and expand the provider. It should not show the "Refresh" action.)
3.On submit form button invoke a action with assigns the provider sourceArray/sourceList to the Target data array/list.

Related

avoid GET_ENTITY call on bindElement for data already loaded in get_entityset

I have a Master Detail Detail-Detail Application:
Master: List of Users
Detail: Table with Qualifications of the user
Detail-Detail: Form to Edit the Qualifications
In the Detail View I have all the informations I need for the Form in the Detail-Detail view.
when I get the path of the selected listItem in the Detail View and then do a bindElement in my DetailDetail View a new Request for GET_ENTITY is called in my backend. How can I avoid this call as I already have all the data I need in my Detail View?
I could work around this issue by using a local JSON Model for the data I want to edit, but as I would like to use .hasPendingChanges in my Edit View I guess I need to bind to the original oDataModel, but as mentioned would like to avoid the GET_ENTITY backend call.
When you are binding an OData context if you call an entity the you will end in a request. i.e:
Think in a /Order('123') context then you need to bind another entity like /Order('123')/Location this is going to trigger a network request but in the case of any data like ID /Order('123')/ID this dont do any network request because properties do not trigger requests.
OData Model
Requests to the back end are triggered by list bindings
(ODataListBinding), context bindings (ODataContextBinding), and CRUD
functions provided by the ODataModel. Property bindings
(ODataPropertyBindings) do not trigger requests.
As you said you can workaround it using a JSONModel but then you will need to maintain two models, create validations, etc.
Hope this clarification helps.

Datatable for a child record asp.net mvc

I have a cshtml view to perform crud operations on a client record. In the same view i want a data table to perform crud operations on children of each client , so one client can have multiple children. I want to add edit those child records however only when the entire client record is saved then the child record should be updated or created , deleted etc. Can i know if jquery datatable is the best for this , and how will i save child in memory and perform save all at once...thanks
Used javascript arrays, and hidden variables to make sure that added/edited data is not lost when posted back to controller .
You can load load the datatable child using Ajax (on click event of the client table). Then read all rows from the datatable child to get the data that you need.

Umbraco, how to add onChange functionality on dropdown content backoffice?

I am having one document type which contains a dropdown list, I need to add a couple of things in it:
I need to display the Database table names in drop-down dynamically.
On the change of dropdown option, i need to display the selected table columns names in another drop-down.
Are above things possible by using only existing data types or it will require creating a custom template using razor syntaxes (if it is so then how the template will display directly in the back office content node?)
Can you please provide your views and any links for code/tutorials?
screen shot of content form
If this is for the back office, you will need to do it in HTML and Angular, with an API controller to handle the DB lookup stuff.
As far as I'm aware, there's nothing built in to do dropdowns that depend on each other, so you'd have to create a new DataType to do it.
The process is to long to detail here, but here are some useful links on creating custom DocTypes in Umbraco 7.
https://our.umbraco.org/documentation/tutorials/Creating-a-Property-Editor/
http://velstand.info/tips/umbraco/to-create-a-datatype-by-using-external-data-sources/
https://24days.in/umbraco-cms/2016/custom-property-editor-tutorial/

Using a command object chain command with a view

I am using grails v2.3.3 and I am trying to work with a set of instances of a command object across two actions.
In the first action I create the set of command object instances which I then display in a view to be edited.
I then use a link in the view to submit this data to another action in the same controller that needs to access the updated set of command object instances.
I have looked at the 'chain' command which enables command objects to be accessible across different actions but it seems to offer a direct link from one action to another without the option to display a view and enable some user interface.
I cannot see how to implement this with a view in order to update the contents of these command object instances which then get sent to the 2nd action to be processed.
I have the command object set to a 'session' scope and am surprised that by default it is not accessible across all actions of the controller anyway - what does the scope mean?
-mike
The normal way of doing this is to recreate the command objects from posted form data in the second action. This means that the view's form must include all of the fields of the command object either as visible (editable) or hidden (pass through) input fields. Grails command object binding support will automatically populate new command objects if you place them as parameters to the action. Also, you can always manually construct new command object instances using the "params" map values which contains all of the posted form fields.
See the sections on Command Objects and Data Binding in the Grails manual for details and examples.

pass multiple values present in ListBoxFor to controller, while postback

I am using asp.net mvc 2.0 in my application and the application requires to get multiple values from a ListBox, from view to controller.
The scenerio is like that, I have two listbox say ListBox1 and ListBox2 and on the load of a page, I initally load Listbox1 with some data.
Now a user can transfer some of the data from one Listbox1 to Listbox2 and then want to select multiple data present in ListBox2 in the controller.
I have used two "ListBoxFor" for this purpose and provide "IEnumerable" to the ListBox control in view as a property of a class.
Now when I post back the data to controller, I don't get the the data correspond to "ListBox2" in my class object.
In short, I want to select multiple data which is present in ListBox2, in my controller on postback of form.
Please help and provide sample for this.
An http post will not contain all values in a select box, only the one(s) selected. You could use javascript to select all values (make sure select is set to multiple), but that's not my preferred way since it changes the way the page looks to the user.
I would recommend using javascript to add the selected values to hidden fields. It would work something like this:
Your model has a List selections
on select, javascript is used to move from ListBox1 to ListBox2
in addition, a new and the second
On unselect, you would remove the input and update all inputs with a higher index to index - 1 in order to retain sequential-ness
Then when you post, the data will be automatically bound to your model's selections list.

Resources