Docstoc

Dialog - OpenRules

Document Sample
Dialog - OpenRules Powered By Docstoc
					Layout TableLayout html(Dialog d)
<html>
<head>
<title><C> d.getName() </C> </title>
<style type="text/css" media="all">
   @import "/openrules.forms.lib/css/lib.css";
   @import "css/project.css";
</style>

<script type="text/javascript">
function setFocus(question) {
  var q = document.getElementById(question);
  q.focus();
}
</script>

</head>
<body> <form method="post" action=".">
 <C>
  dialogs[0].sessionDialog = d;
  dialog().setErrors(0);
  TableLayout mainLayout = main(d);
  dialog().setCurrent(dialog().getNext());
  mainLayout;
</C></form>
</body>
</html>



NOTES.
1. The method main(Dialog d) should be defined in an application.
    This method will be executed during every interaction cycle
    and it should return a main layout that corresponds to a web
    page to be displayed during the next processing step.
2. The stylesheet .\war\css\project.css can be defined in an
   application to provide project specific styles if any. Otherwise,
   the styles defined in openrules.forms.lib\lib\css\lib.css
   will be used.
Datatype SessionDialog
String                             id
Dialog                             sessionDialog

Data SessionDialog dialogs
id
Dialog ID
1


Method Dialog dialog()
return dialogs[0].sessionDialog;


We created method dialog() to provide a global
access to the session's dialog inside the Open
Class defined by the main XLS file. The actual
instanse of Dialog also comes as the first
parameter of the main method.
Layout TableLayout actionButton(String name)


<F type="submit">[name][] [dialog().setLastAction(name)] </F>




//Layout TableLayout actionButton(String name)
<F type="submit" value="{name}"> dialog().lastAction </F>
Layout TableLayout actionHyperlink(String name)
<F type="submit" style="background-color:lightblue; color:blue; padding:0px; border:0px; text-
decoration:underline"> [name][][dialog().setLastAction(name)]
</F>

//Layout TableLayout actionHyperlink(String name)

<F type="submit" class="hyperlink_submit">[name][][dialog().setLastAction(name)]</F>




//Layout TableLayout hyperlink(String name)
<F type="submit">[name][][dialog().setLastAction(name)]</F>

//Layout TableLayout hyperlink1(String name)
                      <F type="href"> <C>dialog().setLastAction(name); name; </C> </F>

//Layout TableLayout hyperlink(String name)
<F type="submit" class="button_as_link" onmouseover="this.className='button_as_link_hover'"
 tionHyperlink(String name)
="background-color:lightblue; color:blue; padding:0px; border:0px; text-
 [name][][dialog().setLastAction(name)]



 ctionHyperlink(String name)

s="hyperlink_submit">[name][][dialog().setLastAction(name)]</F>




 yperlink(String name)
me][][dialog().setLastAction(name)]</F>

yperlink1(String name)
<F type="href"> <C>dialog().setLastAction(name); name; </C> </F>

 yperlink(String name)
s="button_as_link" onmouseover="this.className='button_as_link_hover'"
Layout TableLayout actionImage(String imageSource, String actionName)
<F type="image" src="{imageSource}">
  [] [] [dialog().setLastAction(actionName)]
</F>


Layout TableLayout actionDelete(String actionName)
<F type="image" src="../openrules.forms.lib/images/delete.png">
   [][] [dialog().setLastAction(actionName)]
</F>


Layout TableLayout actionOpen(String actionName)
<F type="image" src="../openrules.forms.lib/images/open.png">
   [][] [dialog().setLastAction(actionName)]
</F>

Layout TableLayout actionRight(String actionName)

<F type="image" src="../openrules.forms.lib/images/right.png">
   [][] [dialog().setLastAction(actionName)]
</F>


Layout TableLayout actionLeft(String actionName)
<F type="image" src="../openrules.forms.lib/images/left.png">
   [][] [dialog().setLastAction(actionName)]
</F>
Layout TableLayout checkedButton(Checkable object, String attribute)
<F type="image" src="../openrules.forms.lib/images/checked.jpg">
   [][] [object.setChecked(attribute,false); dialog().setLastAction("Uncheck");]
</F>

Layout TableLayout uncheckedButton(Checkable object, String attribute)
<F type="image" src="../openrules.forms.lib/images/unchecked.jpg">
   [][] [object.setChecked(attribute, true); dialog().setLastAction("Check");]
</F>

Layout TableLayout actionCheck(Checkable object, String attribute)
<C>
    TableLayout button = uncheckedButton(object,attribute);
    if (object.isChecked(attribute)) button = checkedButton(object,attribute);
    button;
</C>
Layout TableLayout fatalErrorLayout(String comment)

                           <b>FATAL INTERACTION ERROR </b>

                                               <br/>

                                           comment




Layout TableLayout stringLayout(String text)

                                        <C> text </C>




Layout TableLayout stringBoldLayout(String text)

                                    <b><C> text </C></b>

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:1
posted:11/27/2011
language:English
pages:8