Update of /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/prolix/web/actions
In directory sc8-pr-cvs1:/tmp/cvs-serv5402/src/org/asturlinux/frade/prolix/web/actions
Modified Files:
SolutionAction.java
Log Message:
Fixed navigation problems - detected null collection of consults
Index: SolutionAction.java
===================================================================
RCS file: /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/prolix/web/actions/SolutionAction.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** SolutionAction.java 15 Jul 2003 22:42:37 -0000 1.4
--- SolutionAction.java 16 Jul 2003 22:48:14 -0000 1.5
***************
*** 14,19 ****
/**
! * @struts.action name="SolutionForm"
! * path="/actions/solution"
* scope="request"
* input="/consult.jsp"
--- 14,19 ----
/**
! * @struts.action name="solutionsForm"
! * path="/actions/solutions"
* scope="request"
* input="/consult.jsp"
***************
*** 44,55 ****
Locale locale = getLocale(request);
MessageResources messages = getResources(request);
try
{
HttpSession session = request.getSession();
ProlixMain interpreter = (ProlixMain)session.getAttribute("interpreter");
! String result = interpreter.step();
! CurrentStateBean ib = (CurrentStateBean)session.getAttribute("prologData");
! if (ib != null)
! ib.setCurrentResult(result);
}
catch (ProgramNotLoadedException pnle)
--- 44,59 ----
Locale locale = getLocale(request);
MessageResources messages = getResources(request);
+ String result;
try
{
HttpSession session = request.getSession();
ProlixMain interpreter = (ProlixMain)session.getAttribute("interpreter");
! result = interpreter.step();
! CurrentStateBean data = (CurrentStateBean)session.getAttribute("prologData");
! if (data != null)
! {
! data.setCurrentResult(result);
! session.setAttribute("prologData",data);
! }
}
catch (ProgramNotLoadedException pnle)
|