Jacques Le Roux a écrit :
Hi Nicolas,
Are you not using an XML editor with completion tool ?
Yes, I use xml plugin in eclipse, but to understand more, I read the
source code associate
Comments in XSD files are intended to help you. If you use a such tool
they will pop when writing code, as for Java methods for instance.
The save-last-view not correspond. I want save the "last" search and
save-current-view is better for do that. But I have always problem
parameters present in request when I use the requestType request and
security problem when I use request-redirect
Nicolas
Jacques
From: "Malin Nicolas" <[email protected]>
Jacques Le Roux a écrit :
Hi Nicolas,
The attributes are save-last-view, view-last and view-home. They are
documented in site-conf.xsd. Did you try to use save-last-view ?
HTH (I did not look into all code details)
Jacques
Hi jacques,
My problem, I read only the source code and not documentation :) I
try it tomorow.
Nicolas
From: "Malin Nicolas" <[email protected]>
Hi,
I work to create a simple system in ofbiz to return on the previous
screen after creating or updating a record by a specific screen.
all the solutions I have tested are too complex and too difficulte
to create. I found the new request type "save-*" and this solution
is really nice. After some tests on the example component I have
just a problem with actual possibility.
I want follow this process :
1. do a search on example entity by FindExample screen
2. create a new example by EditExample screen
3. When commit with success, I want return on FindExample screen
with the result of the last search, which was done at the 1rst point
I've done for that some modifications :
Index: framework/example/webapp/example/WEB-INF/controller.xml
===================================================================
--- framework/example/webapp/example/WEB-INF/controller.xml
(révision 766684)
+++ framework/example/webapp/example/WEB-INF/controller.xml
(copie de travail)
@@ -53,15 +53,14 @@
<request-map uri="authview"><security https="true"
auth="true"><response name="success" type="view"
value="main"></request-map>
<!-- Example Requests -->
- <request-map uri="FindExample"><security https="true"
auth="true"><response name="success" type="view"
value="FindExample"></request-map>
+ <request-map uri="FindExample"><security https="true"
auth="true"><response name="success" type="view"
value="FindExample" save-current-view="true"></request-map>
<request-map uri="EditExample"><security https="true"
auth="true"><response name="success" type="view"
value="EditExample"></request-map>
<request-map uri="ExampleReportHtml"><security https="true"
auth="true"><response name="success" type="view"
value="ExampleReportHtml"></request-map>
<request-map uri="ExampleReportPdf"><security https="true"
auth="true"><response name="success" type="view"
value="ExampleReportPdf"></request-map>
<request-map uri="createExample">
<security https="true" auth="true">
<event type="service" invoke="createExample">
- <response name="success" type="request-redirect"
value="EditExample">
- <redirect-parameter name="exampleId"/>
+ <response name="success" type="request-redirect"
value="backLast">
</response>
<response name="error" type="view" value="EditExample"/>
</request-map>
@@ -140,7 +139,8 @@
The problem, when backLast is called, the request return on Http
and not Https. I have then added a new request-map in
common-controller.xml :
Index: framework/common/webcommon/WEB-INF/common-controller.xml
===================================================================
--- framework/common/webcommon/WEB-INF/common-controller.xml
(révision 766684)
+++ framework/common/webcommon/WEB-INF/common-controller.xml
(copie de travail)
@@ -147,6 +147,10 @@
<request-map uri="backLast">
<response name="success" type="view-last"/>
</request-map>
+ <request-map uri="backLast-security">
+ <security auth="true" https="true">
+ <response name="success" type="view-last">
+ </request-map>
<!-- View Mappings -->
<view-map name="error" page="/error/error.jsp"/>
I used first a request-type="request" to keep the security but all
parameters that were created in the example go to search. When I
return to FindExample screen, the search operate isn't the same. I
solved this problem with a request-type="request_redirect"
Am I on the right path or do I not understand the new save request
system ?
--
Nicolas MALIN
Consultant
Tél : 06.17.66.40.06
Site projet : http://www.neogia.org/
-------
Société LibrenBerry
Tél : 02.48.02.56.12
Site : http://www.librenberry.net/
--
Nicolas MALIN
Consultant
Tél : 06.17.66.40.06
Site projet : http://www.neogia.org/
-------
Société LibrenBerry
Tél : 02.48.02.56.12
Site : http://www.librenberry.net/
--
Nicolas MALIN
Consultant
Tél : 06.17.66.40.06
Site projet : http://www.neogia.org/
-------
Société LibrenBerry
Tél : 02.48.02.56.12
Site : http://www.librenberry.net/