When a form is normally openend, its going through its create and then (by the caller) a method is called, and all works fine:
- Code: Select all
TIWFormDashboardManagerProfile(ShowForm(fDashboardManagerProfile.TIWFormDashboardManagerProfile)).LoadManager(UserID, Currency);
Now we also work with Handlers , a person gets a email with a link and the on the link we have servercontroller code do:
- Code: Select all
with THandlers.Add('/tokenizem/','', TContentForm.Create(TIWFormDashboardManagerProfile)) do
begin
CanStartSession := True;
RequiresSessionStart := True;
end;
In the create of the form i have a procedure DotokenLogin
- Code: Select all
procedure TIWFormDashboardManagerProfile.DotokenLogin;
var
Token: String;
TokenPos: Integer;
begin
// Token := WebApplication.RunParams.Text; //werkt niet meer na upgrade
Token := WebApplication.Request.Query;
TokenPos := Pos('Token=', Token);
if (TokenPos > 0) then
begin
Token := Trim(Copy(Token, TokenPos + 6, 32));
if (Length(Token) = 32) and UserSession.IMSession.LoginWithToken(Token) then
begin
UserSession.IMSession.UserType := wutCostCentreManager;
LoadManager(UserSession.IMSession.UserID, UserSession.IMSession.Currency);
FrameChat.LoadUserTasks;
end;
end;
end;
The problem comes with the LoadManager method who wants to reload grids and ajaxrerender some comboxBox .
This is where i got the error "Method "RenderRegionAsync"its only allowed in AjaxProcessing"
When LoadManager method is called after the create , as done in normal processing of the form, all is ok
How to handle these kind of cases?
Eric