Helloo, I found another Error,
Actually I'm trying to run a beanshell script that allows me to run another
script to access entities (according to a tutorial), I did all what they
said however when trying to visualize the URL I get the following error :
(The URL first show a field when I enter the script that I would run, trying
to click on submit I get an error)
"org.ofbiz.webapp.control.RequestHandlerException: Unknown request
[processEntityAccessBSF]; this request does not exist or cannot be called
directly."
here are the files that are involved in this operation :
"processEntityAccessBSF.bsh" it's described above,
"test.bsh"
data = delegator.findAll("PostalAddress");
"Learning Screens.xml"
<screen name="ProcessEntityAccessBSF">
<section>
<actions>
<script
location="component://learning/webapp/learning/WEB-INF/actions/entityaccess/processEntityAccessBSF.bsh"/>
</actions>
<widgets>
<decorator-screen name="main-decorator"
location="${parameters.mainDecoratorLocation}">
<decorator-section name="title">
<label text="Generic
Screen for Displaying Data Retrieved"/>
</decorator-section>
<decorator-section name="body">
<include-form
name="ScriptNameForm"
location="component://learning/widget/learning/LearningForms.xml"/>
<section>
<condition>
<not>
<if-empty field-name="parameters.scriptName"/>
</not>
</condition>
<widgets>
<platform-specific>
<html>
<html-template
location="component://learning/webapp/learning/entityaccess/displaydataretrieved.ftl"/>
</html>
</platform-specific>
</widgets>
</section>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
"LearningForms.xml"
<form name="ScriptNameForm" type="single" target="processEntityAccessBSF">
<field name="scriptName"><text/></field>
<field name="submit"><submit/></field>
</form>
"displaydataretrieved.ftl"
<#if errorMsg?has_content>
${errorMsg}
<#else>
Processed script: "${parameters.scriptName}"
<#if data?has_content && (data?is_sequence || data?is_hash)>
<@displayData data=data/>
<#else>
No data records retrieved.
</#if>
</#if>
<#macro displayData data>
<#if data?is_sequence>
<#assign keys = data?first?keys/>
<#else>
<#assign keys = data?keys/>
</#if>
<#-- Header -->
<#list keys as key>
*${key}*
</#list>
<#-- Data -->
<#if data?is_sequence>
<#list data as record>
<#list keys as key>
${record[key]!""}
</#list>
</#list>
<#else>
<#list keys as key>
${data[key]!""}
</#list>
</#if>
</#macro>
"controller.xml"
<request-map uri="ProcessEntityAccessBSF">
<response name="success" type="view" value="ProcessEntityAccessBSF"/>
</request-map>
<view-map name="ProcessEntityAccessBSF" type="screen"
page="component://learning/widget/learning/LearningScreens.xml#ProcessEntityAccessBSF"/>
Anyhelp please,
I appreciate
Thank you.
Regards.
--
View this message in context:
http://ofbiz.135035.n4.nabble.com/Beanshell-tp4635129p4635148.html
Sent from the OFBiz - User mailing list archive at Nabble.com.