<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://docs.opentaps.org/docs/index.php?action=history&amp;feed=atom&amp;title=Screen_Widget_Actions_in_Java</id>
	<title>Screen Widget Actions in Java - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://docs.opentaps.org/docs/index.php?action=history&amp;feed=atom&amp;title=Screen_Widget_Actions_in_Java"/>
	<link rel="alternate" type="text/html" href="https://docs.opentaps.org/docs/index.php?title=Screen_Widget_Actions_in_Java&amp;action=history"/>
	<updated>2026-04-05T12:47:12Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.32.1</generator>
	<entry>
		<id>https://docs.opentaps.org/docs/index.php?title=Screen_Widget_Actions_in_Java&amp;diff=4749&amp;oldid=prev</id>
		<title>Sichen at 19:46, 26 October 2009</title>
		<link rel="alternate" type="text/html" href="https://docs.opentaps.org/docs/index.php?title=Screen_Widget_Actions_in_Java&amp;diff=4749&amp;oldid=prev"/>
		<updated>2009-10-26T19:46:13Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 19:46, 26 October 2009&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l4&quot; &gt;Line 4:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 4:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;screen name=&amp;quot;findAndListInvoices&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;screen name=&amp;quot;findAndListInvoices&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;        &lt;/del&gt;&amp;lt;section&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;   &lt;/ins&gt;&amp;lt;section&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;            &lt;/del&gt;&amp;lt;actions&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;      &lt;/ins&gt;&amp;lt;actions&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;                &lt;/del&gt;&amp;lt;java location=&amp;quot;com.opensourcestrategies.financials.invoice.InvoiceActions&amp;quot; invoke=&amp;quot;findInvoices&amp;quot;/&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;         &lt;/ins&gt;&amp;lt;java location=&amp;quot;com.opensourcestrategies.financials.invoice.InvoiceActions&amp;quot; invoke=&amp;quot;findInvoices&amp;quot;/&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;            &lt;/del&gt;&amp;lt;/actions&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;      &lt;/ins&gt;&amp;lt;/actions&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Sichen</name></author>
		
	</entry>
	<entry>
		<id>https://docs.opentaps.org/docs/index.php?title=Screen_Widget_Actions_in_Java&amp;diff=4748&amp;oldid=prev</id>
		<title>Sichen at 19:31, 26 October 2009</title>
		<link rel="alternate" type="text/html" href="https://docs.opentaps.org/docs/index.php?title=Screen_Widget_Actions_in_Java&amp;diff=4748&amp;oldid=prev"/>
		<updated>2009-10-26T19:31:50Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 19:31, 26 October 2009&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;As part of opentaps 1.4, we are introducing Java actions for the ofbiz screen widget based on [&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;https&lt;/del&gt;://issues.apache.org/jira/browse/OFBIZ-44 OFBIZ-44]. This allows you to write the data preparation logic of a screen in Java instead of scripting languages.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;As part of opentaps 1.4, we are introducing Java actions for the ofbiz screen widget based on [&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;http&lt;/ins&gt;://issues.apache.org/jira/browse/OFBIZ-44 OFBIZ-44]. This allows you to write the data preparation logic of a screen in Java instead of scripting languages.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;To use this feature, in your screen widget XML, use the &amp;lt;tt&amp;gt;java&amp;lt;/tt&amp;gt; directive to invoke your Java class and method:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;To use this feature, in your screen widget XML, use the &amp;lt;tt&amp;gt;java&amp;lt;/tt&amp;gt; directive to invoke your Java class and method:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Sichen</name></author>
		
	</entry>
	<entry>
		<id>https://docs.opentaps.org/docs/index.php?title=Screen_Widget_Actions_in_Java&amp;diff=4747&amp;oldid=prev</id>
		<title>Sichen: Protected &quot;Screen Widget Actions in Java&quot;: Sysop page [edit=sysop:move=sysop]</title>
		<link rel="alternate" type="text/html" href="https://docs.opentaps.org/docs/index.php?title=Screen_Widget_Actions_in_Java&amp;diff=4747&amp;oldid=prev"/>
		<updated>2009-10-26T19:30:00Z</updated>

		<summary type="html">&lt;p&gt;Protected &amp;quot;&lt;a href=&quot;/docs/index.php?title=Screen_Widget_Actions_in_Java&quot; title=&quot;Screen Widget Actions in Java&quot;&gt;Screen Widget Actions in Java&lt;/a&gt;&amp;quot;: Sysop page [edit=sysop:move=sysop]&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 19:30, 26 October 2009&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Sichen</name></author>
		
	</entry>
	<entry>
		<id>https://docs.opentaps.org/docs/index.php?title=Screen_Widget_Actions_in_Java&amp;diff=4746&amp;oldid=prev</id>
		<title>Sichen: New page: As part of opentaps 1.4, we are introducing Java actions for the ofbiz screen widget based on [https://issues.apache.org/jira/browse/OFBIZ-44 OFBIZ-44]. This allows you to write the data p...</title>
		<link rel="alternate" type="text/html" href="https://docs.opentaps.org/docs/index.php?title=Screen_Widget_Actions_in_Java&amp;diff=4746&amp;oldid=prev"/>
		<updated>2009-10-26T19:29:58Z</updated>

		<summary type="html">&lt;p&gt;New page: As part of opentaps 1.4, we are introducing Java actions for the ofbiz screen widget based on [https://issues.apache.org/jira/browse/OFBIZ-44 OFBIZ-44]. This allows you to write the data p...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;As part of opentaps 1.4, we are introducing Java actions for the ofbiz screen widget based on [https://issues.apache.org/jira/browse/OFBIZ-44 OFBIZ-44]. This allows you to write the data preparation logic of a screen in Java instead of scripting languages.&lt;br /&gt;
&lt;br /&gt;
To use this feature, in your screen widget XML, use the &amp;lt;tt&amp;gt;java&amp;lt;/tt&amp;gt; directive to invoke your Java class and method:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;screen name=&amp;quot;findAndListInvoices&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;section&amp;gt;&lt;br /&gt;
            &amp;lt;actions&amp;gt;&lt;br /&gt;
                &amp;lt;java location=&amp;quot;com.opensourcestrategies.financials.invoice.InvoiceActions&amp;quot; invoke=&amp;quot;findInvoices&amp;quot;/&amp;gt;&lt;br /&gt;
            &amp;lt;/actions&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your Java method must be a static method which accepts a Map of the context as a parameter:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
public static void findInvoices(Map&amp;lt;String, Object&amp;gt; context) throws GeneralException, ParseException {&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The context contains environment variables as well as parameters for your screen.   Opentaps has an &amp;lt;tt&amp;gt;org.opentaps.foundation.action.ActionContext&amp;lt;/tt&amp;gt; which takes the Map and allows you to obtain environment variables from it and put values back into the context for your screen:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
final ActionContext ac = new ActionContext(context);&lt;br /&gt;
// ... for example&lt;br /&gt;
String invoiceTypeId = ac.getString(&amp;quot;invoiceTypeId&amp;quot;);&lt;br /&gt;
// ... for example&lt;br /&gt;
ac.put(&amp;quot;processingStatuses&amp;quot;, processingStatusList);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sichen</name></author>
		
	</entry>
</feed>