Fix load state error
This commit is contained in:
@@ -37,7 +37,7 @@ feature {WSF_PAGE_CONTROL, WSF_CONTROL} -- State management
|
||||
Result.put_boolean (sort_direction, "sort_direction")
|
||||
end
|
||||
|
||||
set_state (new_state: WSF_JSON_OBJECT)
|
||||
set_state (new_state: JSON_OBJECT)
|
||||
-- Restore sort_column and sort_direction from json
|
||||
do
|
||||
if attached {JSON_STRING} new_state.item ("sort_column") as new_sort_column then
|
||||
|
||||
@@ -44,7 +44,7 @@ feature {WSF_PAGE_CONTROL, WSF_CONTROL} -- State management
|
||||
Result.put_integer (row_count, "row_count")
|
||||
end
|
||||
|
||||
set_state (new_state: WSF_JSON_OBJECT)
|
||||
set_state (new_state: JSON_OBJECT)
|
||||
-- Restore page, page_size and row_count from json
|
||||
do
|
||||
Precursor (new_state)
|
||||
|
||||
@@ -32,7 +32,7 @@ feature {WSF_PAGE_CONTROL, WSF_CONTROL} -- State management
|
||||
create Result.make
|
||||
end
|
||||
|
||||
set_state (new_state: WSF_JSON_OBJECT)
|
||||
set_state (new_state: JSON_OBJECT)
|
||||
-- There is no state to restore states
|
||||
do
|
||||
end
|
||||
|
||||
@@ -38,10 +38,10 @@ feature {WSF_PAGE_CONTROL, WSF_CONTROL} -- State management
|
||||
state_changes.replace (datasource.state, "datasource")
|
||||
end
|
||||
|
||||
set_state (new_state: WSF_JSON_OBJECT)
|
||||
set_state (new_state: JSON_OBJECT)
|
||||
-- Restore datasource state from json
|
||||
do
|
||||
if attached {WSF_JSON_OBJECT} new_state.item ("datasource") as datasource_state then
|
||||
if attached {JSON_OBJECT} new_state.item ("datasource") as datasource_state then
|
||||
datasource.set_state (datasource_state)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user