Olivier
|
|
Group: StrataFrame Users
Posts: 96,
Visits: 805
|
Hello ben,
You don't need to do postback on each textbox, cause it's heavy way for the server process. (i have 600 users , and 30 variable session (bo ) by user) On the web app, we must save the transfer between server and client, it's for the reason, that ajax was create.
Strataframe is made for the winform concept, i try to find a way to work in the web form. I'm sorry to see that no other develop web who saw this problem. May be they made only website not web app, or more developer for the winform. i don't know.
The session variable is not the solution to save the state cause they are not permanent because of the number of resource user , and the other bo like entity or hibernate, not refresh the binding field when i postback on the server with expired session.
is It possible to desactivate the binding field refresh during an Editing or Adding state ?
If we found a solution, we have the best Bo all over the world, cause the other on the web work there are a web approach not fox approach !
thanks again for your help Olivier
============================================== Asp.net C# - Strataframe - telerik ==============================================
|
|
|
StrataFrame Team
|
|
Group: StrataFrame Developers
Posts: 3K,
Visits: 2.5K
|
You can probably set the AutoPostBack="True" on each of your textboxes that collects data. This will cause the form to post back to the web server each time one of the text boxes loses control. That way, the user would only lose the last text box they were typing in when their session times out. Each time the user tabs to a new textbox, the postback will copy the value back into the business object. There's definitely a way to do it, we just need to find the right combination of properties on the UI controls.
|
|
|
Olivier
|
|
Group: StrataFrame Users
Posts: 96,
Visits: 805
|
Hello Ben,
Thanks for this approach ! it can help a little for the starting.
I have a question , if my app has 40 min time session.
My user start to fill the textbox , in new record, so i put StateAdding on strataframe,
if my user left his computer to go outdoor to see a customer, or take a call, when he restart his input , the session are ended.
He push validate button, and he lose his customer form.
Can i save the state of bo with the fill textbox when he click on the validate button ?
How can save the state ?
i think, if i load editing state or adding state only on push validate button, i lose my binding field.
I don't know if you can see what i mean, with my poor english.
thanks for your help i appreciate that.
Olivier
============================================== Asp.net C# - Strataframe - telerik ==============================================
|
|
|
StrataFrame Team
|
|
Group: StrataFrame Developers
Posts: 3K,
Visits: 2.5K
|
There is already a way to save the BOs to XML. You can use bo.CurrentDataTable.WriteXml(filename) to save the file and bo.CurrentDataTable.ReadXml(filename) to read it back in. The only sticky point you may have to work with is determining the folder for your user. You could create a folder with a GUID for it's name and store the path in a SQL table with the username and the time when the session was created. When the user loads a page, check SQL to see if there is an existing session for them and then load the XML file from disk. For that matter, you could also store the raw XML in a VARCHAR(MAX) field in SQL. Then you only have to do one lookup. Take the raw XML string, put it into an XmlReader and call bo.CurrentDataTable.ReadXml(reader).
|
|
|
Olivier
|
|
Group: StrataFrame Users
Posts: 96,
Visits: 805
|
Hello
i forget to tell, i have test to use viewstate to save a session bo, but asp.net say "Out Of Memory"
Thanks Olivier,
============================================== Asp.net C# - Strataframe - telerik ==============================================
|
|
|
Olivier
|
|
Group: StrataFrame Users
Posts: 96,
Visits: 805
|
Hello I get a idea about the solution. It's possible like foxpro and cursor temp to store in Xml (dir temp for each session) or Sql Server, the state of Bo Stratra. We can set up timeout on parameters Bo, if the temps are too old strat delete this. It's a real problem, i understand we have plus to save the state session against entity or other bo. But we need to understand , it's not the best way to work in the app web, only in winform. Please accept my enhancement to have no problem with my user. I know we can save on sql server session, but i use the classic session in proc , the problem is only for stratra http://msdn.microsoft.com/en-us/library/ms178586.aspxDo you know a simple way to save a Bo in xml file ? Can you read the third post here ? http://stackoverflow.com/questions/1725925/how-to-set-session-timeout-more-than-20-minthanks Olivier,
============================================== Asp.net C# - Strataframe - telerik ==============================================
|
|
|
Olivier
|
|
Group: StrataFrame Users
Posts: 96,
Visits: 805
|
Hello Ben,
In the version 2.0 , the Bo inherit from Entity ? it's exact ?
Do you know how entity store the Business object during the session ?
============================================== Asp.net C# - Strataframe - telerik ==============================================
|
|
|
Olivier
|
|
Group: StrataFrame Users
Posts: 96,
Visits: 805
|
|
|
|
StrataFrame Team
|
|
Group: StrataFrame Developers
Posts: 3K,
Visits: 2.5K
|
Thanks, Michel. I was thinking about the problem over the weekend. To store the business objects in the ViewState, you would need to modify the source code or copy out the source code and create your own BasePage class that works similar to the SF one. If he wants to store the variables in the session, he could increase the session timeout and move the session state storage to SQL Server to preserve resources on the server.
|
|
|
Michel Levy
|
|
Group: StrataFrame Users
Posts: 193,
Visits: 9K
|
Hi Ben,
I'll translate your answer on the French speaking SF forum, and I'll come back here if we need more help.
|
|
|