Hi guys,

Where developing in the personal cloud and started using the reactive. There is a maintenance screen where I normally would use the editable. But in reactive the editable is not there. What do you advice as a alternative to do this?

Kind regards!

Hello freek,


You can simply use the Table widget instead. Since the table is now reactive, you can design it to behave just like the editable one from web. One way to do this is to add event handlers like onblur which would then reflect your changes each time you leave focus to an input inside the table.


Hope this helps =)

Hi Emman, sorry for asking but do you have a example? Because I'm still a bit confused.

Hello Freek

There is no replacement for Editable table. 

You can use the normal pattern PageList + PageDetail. 

You can also make the Detail into a Popup. 

You can edit inline, field by fiels, chabging the expression, on click, into an input. 

You can use other patterns. 

Butbyou have to create the UI and Logic to edit the item. 

Cheers 

I did this on the fly, so it's really simple.


Here I created a table and an Add button which simply adds an item to a sample entity.



The table has the target entity as the source as usual, and notice that there is an event "onblur" with a corresponding handler.


Inside the handler it contains an update to the sample database, wherein the source to be updated is the current item (this is the one which had the focus early on).


With this structure, any change to the table is saved automatically to the database.



Hello Emman, 

This approach will hit the server and the database every time your table looses focus. Even if the user does not change anything.

Cheers 

Hello Ed,


Yes, I agree. Although that is because I did the utmost minimum to demonstrate the editable functionality.

My design can be further optimize with a number of ways to address possible concerns. =)

I added a + add link on the bottom of the table. When clicking on it a record is added to the table. Default the table has already input fields. So we know can work with it :) Feels only a bit stupid to build this your self....

Do you guys have any tips on how to build when the table row is clicked a class is added to the input fields? I can do a onclick event op the column and trigger a user action. But then what?

Hi

I've created a table with some "+", delete, edit and save icons and as you click edit, it shows all the fields in a table. It works fine.

The problem is that this is not a form and so the "validate form" is not being completed. Therefore  have all these warnings although I did put some custom validations...

Any ideas?