Not open popup for action - isis

I'm using Apache Isis v1.16.2.
I created an edit action but when my action is invoked Isis opened the associated form into a popup. I tried to set the property isis.objects.editing to false but in this way the user have to edit each property and click 'Ok' for each one. Which action Isis call to create default edit form? My goal is: the user open the form, edit all properties and click 'Save' once. Is there a way to do it? Thanks in advice.

currently the only way to do this is with an action that takes all the arguments for the properties that you want to change.
We do have a JIRA ticket to allow such an action be associated with a fieldset rather than a property, so that when invoked would "replace" the fieldset (similar to how, today, an action associated with a property temporarily replaces just that one property).
That said, the Apache Isis framework is not intended to be a simple CRUD framework (even though people often mistake it as that). Rather than let the end-user edit all properties in a single operation, instead identify why the fields need updating. This will lead to a richer domain model that encapsulates meaningful business rules, rather than being some sort of glorified spreadsheet.
Still, the Wicket viewer is extensible though. If you absolutely need an edit form yourself, see http://isis.apache.org/guides/ugvw/ugvw.html#_ugvw_extending_replacing-page-elements.
Alternatively, for that particular use case, consider developing a custom viewer and leverage Isis' REST API.
HTH

Related

Add custom control to toolbox and have its properties show up in the properties window

To illustrate what I'm asking, let's say I have a custom TextBox that has 2 modes. Mode 1 only allows numbers, and mode 2 only allows dates in a particular format.
Using a class module I can create this custom TextBox, and I can use a loop when the userform initialises to set which TextBoxes are custom.
What I'd like to happen is have the custom TextBox, or what ever custom control I want, show up in the toolbox. And I also want its custom properties, if they exist, to show up in the property window.
So far, I've been unable to find a way to do this. In fact, I've been unable to find out if it's even possible. It seems, to me anyway, that it's something that should be possible, but maybe I'm barking up the wrong tree. If it's possible I'd really appreciate being pointed to a resource.

undo for non textbox controls

new to .net coming from vba decided to rewrite a management app using vb.net and SQL Server.
Started writing the base library for my application.
I created custom controls to use in my application that would expose a Zoom function, background color for the current active control a .modified property similar to the one available in textbox and some extra other properties (SQLTableName, SQLColumnName, ...) to enable iterating through a container (form) for modified controls and Update/Insert into a SQL table via a SQLProcessClass.
Concurrently I'd like to also implement a simple undo functionality.
My first idea was to add a PrevValue variable set in the OnEnter event if the Modified property is False, exposing an OldValue property and an Undo method in the custom controls.
However I found that the TextBoxBaseClass already exposes an Undo method and that there is an UndoEngineClass available.
Unfortunately the vs helpfile does not give examples of how to use / implement that class.
Could someone explain the usage of the UndoEngine class non-textbox controls and if it is advisable to use it or rather write my own (as I first intended to do - I also found some interesting articles about undo/redo classes) but why reinvent the wheel in case .net already provides a class for it.
thks

"Close" custom entity button

I've built a custom entity in Dynamics CRM. I'd like it to have functionality similar to the opportunity entity, Close as Won or Close as Lost, only this language would be Approved or Denied.
Approved button would set the status to "Approved" and make the entity read only.
Denied button would set the status to "Denied" and make the entity read only.
I've done some research and looked into ribbon workbench, but I've got no idea on how to actually make it lock the entity when the button is pressed. The only tutorial I've found makes it open a webpage, and I'm not sure how to hack that into doing what I want it to do.
Any suggestions or places to read up on how to do this? Thanks!
the request is a little bit generic. I'll try to help. First of all, when people "accept" or "denied" the new entity you created, do you want to deactivate the record? In crm when an opportunity is closed it becomes not editable because it's deactivated. To achieve that you should use the internal status, "active" or "Inactive". So you can catch the event with a plugin and set the status to disable/enabled.
You can managed this case client side too, you can read the field that you are setting as "enable/disable" and put all the fields on the form in read only.
The third option is to use a synchronous workflow, read a specific field, put a condition and change the status of the record based on that condition.
Whatever road you choose a little bit of work is involved :)
I think your question is fine. Instead of having the button open a webpage you can have it call a plugin (using javascript) which updates the instance of the entity that you are viewing. Intuitively it might make sense to just set your record to inactive when the "Denied" button is pressed which also has the side effect of disabling fields.
In this related post the second option is what I am referring to.

Setting up recycle bin functionality in Archer GRC

When deleting records within the platform, this action is not reversible via the front end. Is there a way to allow users to remove a record from their view without actually deleting the record?
You can simulate recycle bin functionality within Archer GRC by adding a record permission field that grants read access to "Everyone". If read access is no longer required then an editor of the record can go in and change "Everyone" to a group called "Recycle Bin."
Please note that if there are other record permission fields in the application, users or groups may still have access if they are selected in those fields. Perhaps You can set up a dropdown status field for the user to select "Recycle Bin" and use this condition for automatic record permissions to revoke permission to the record depending on the requirements or workflow of the application.
Solution shared by Igritte might be somewhat confusing for end users.
End user will see greyed out "Delete" button in the top toolbar, but he has to select "Recycle Bin" in the form. This solution was not accepted by my business owner at some point.
As a work around for "Soft delete", I wrote a custom object overriding "Delete" button functionality.
1. User doesn't have delete access to the record, so JavaScript code will make "Delete" button look like active and available.
2. Once the button is clicked, custom object will populate value in the
hidden value list and simulate the click on the "Save" button.
Update: Note that Custom object needs to hide the value list first once the page is loaded. Here you will need to use a JavaScript and do the following: [a] locate the value list DOM object and [b] set display attribute to none. I used jQuery library to do both. This way your value list is not displayed, but you still can use it to control data driven events.
3. With hidden value populated and submitted, record permission will hide this record from the end user.
Note that custom object hides one value list on the layout as well.
If for some reason JavaScript doesn't load properly, user simply will not be able to click on the grayed out "Delete" button.
Update: Hidden value list can be populated by custom object using JavaScript code as well. You need to identify the form tag "input" in HTML code of the page and set attribute "value" to the desired state. I used jQuery library to do this as well.
I have this solution in production working fine with IE11, FF and Chrome.
I can't share the code, but with WC3Schools JavaScript guides and 4 hours you can write and test it yourself with very little JavaScript skills.
Sometimes you have to use custom objects when you want to get a user-friendly solution of not available functionality.
Good luck!

SharePoint 2010 and Editform.aspx

In one of my custom application user wants to keep EditForm.aspx open once list item is created and he can keep saving the same record without redirecting user to DisplayForm.aspx page.So what I'm doing after list item creation I'm loading EditForm.aspx again.
Now the problem is when form is opened in Edit mode and if existing field is modified that doesn't gets updated in the list item but if something new added to the field then it gets saved to the list. I believe it's postback issue but not sure how to pass latest form data upon save.
If this was my task, I would create a new application page that replaces the edit page on that list.
(You can use powershell / object model to set the url of the new / edit / display pages)
Ignoring the ribbon, the edit page is actually pretty simple. It shouldn't be too difficult to create a custom one, that has the submittal behavior you are interested in. Indeed, since you are keeping the exact same field names and input types, you may be able to simply inherit the default form in yours, and simply override the post call.
I suppose it might be possible instead for you to write some javascript to hijack the submit post of the default edit page, but this seems messy to me, and I probably wouldn't go that route.
If you don't need to complete this task today, I've been meaning to push to github some code I wrote a few months ago. That code is a custom aspx edit/new/display page that is extremely easy to customize / implement. I could forward you the link tonight when I get out of work.