Hi all, we have a own application if a new customer login to the application there will be new button and view button ,once the form is filled the view button should be visible if not it should not be visible to the new customer. can someone suggest the idea, Thanks in advance.
Create a Non persistable entity with the any boolean attribute.
Place the two datagrid inside the dataview which connected to Non persistable entity.
Your one datagrid should have view and new button
Other datagrid should have only new button.
Hide the datagrid based on the boolean attribute present in NonPersistable entity.
For example keep boolean attribute name IsFormFilled. And Enable Datagrid which has new & view button when IsFormFilled attribute becames true if it false enable the datagrid which has only new button
When user fills the form update the IsFormFilled boolean to true otherwise it should be false.
If you follow this approach, then you can hide view button when user is not filled the form
This is one way to accomplish that:
Add an additional boolean attribute to MyEntity: IsFilled, default false
Create a validation-nanoflow (Val_MyEntity) that validates if the form is filled or not, setting MyEntity.IsFilled to true or false. Make sure it is a lightweight nanoflow, taking only 10millisec or so to complete.
Trigger Val_MyEntity every time one of the form's attributes has changed.
Set visibility on the View-button based on attribute MyEntity.IsFilled