diff --git a/build.xml b/build.xml index 7346aca8d..f2bb93ae7 100644 --- a/build.xml +++ b/build.xml @@ -35,7 +35,9 @@ ldap/build.xml, crowd/build.xml, webpos/build.xml - googlecheckout/build.xml"/> + googlecheckout/build.xml, + example/build.xml + "/> diff --git a/component-load.xml b/component-load.xml index 3a84e66a5..801b343f8 100644 --- a/component-load.xml +++ b/component-load.xml @@ -37,6 +37,8 @@ under the License. + + diff --git a/example/build.xml b/example/build.xml new file mode 100644 index 000000000..70ec24c15 --- /dev/null +++ b/example/build.xml @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/example/config/ExampleEntityLabels.xml b/example/config/ExampleEntityLabels.xml new file mode 100644 index 000000000..ab02887ab --- /dev/null +++ b/example/config/ExampleEntityLabels.xml @@ -0,0 +1,199 @@ + + + + + Desired + Désiré + Desiderato + ความต้องการ + 期望的 + + + Not Allowed + Non laissé + Non Permesso + ไม่อนุญาต + 不允许 + + + Required + Requis + Richiesto + ความต้องการ + 必须的 + + + Contrived + Arrangé + Inventato + เป็นไปตามที่วางแผนไว้ + 人为的 + + + Inspired + Inspiré + Ispirato + ยอดเยี่ยม + 受启发的 + + + Made Up + Composé + Composto + ทำขึ้น + 制定 + + + + Real World + Monde réel + Mondo Reale + สภาพที่เป็นจริง + 真实世界 + + + + + Example Entity + + + + + + A unique Example ID. If you don't assign an ID, one will be generated automatically + Une réf. unique d'exemple. Si vous n'entrez pas de réf., elle sera générée automatiquement + Un codice esempio univoco. Se tu non assegni un codice, uno verrà generato automaticamente + รหัสตัวอย่าง ถ้าไม่มีการกำหนดรหัส จะต้องมีการสร้างขึ้นอัตโมัติ + 一个唯一的样例表示。如果你没有指定一个标识,那么会自动生成一个 + + + A unique Example Item sequence ID. If you don't assign an ID, one will be generated automatically + Une réf. unique d'article exemple. Si vous n'entrez pas de réf., elle sera générée automatiquement + Un codice riga esempio univoco. Se tu non assegni un codice, uno verrà generato automaticamente + รหัสตัวอย่างสินค้า ถ้าไม่มีการกำหนดรหัส จะต้องมีการสร้างขึ้นอัตโมัติ + 一个唯一的样例明细序号。如果你没有指定一个标识,那么会自动生成一个 + + + A unique Example Type ID. If you don't assign an ID, one will be generated automatically + Une réf. unique de type exemple. Si vous n'entrez pas de réf., elle sera générée automatiquement + Un tipo esempio univoco. Se tu non assegni un codice, uno verrà generato automaticamente + รหัสตัวอย่างประเภท ถ้าไม่มีการกำหนดรหัส จะต้องมีการสร้างขึ้นอัตโมัติ + 一个唯一的样例类型序号。如果你没有指定一个标识,那么会自动生成一个 + + + The type of Example. + Le type de l'exemple. + + + Betrag + Amount + Montant + Importo + Import + จำนวน + 金额 + + + Another Date + Une autre date + Altra Data + วันที่อื่น ๆ + 另一个日期 + + + Another Text + Une autre texte + Altro Testo + ตัวอักษรอื่น ๆ + 另一个文本 + + + Kommentare + Comments + Commentaires + Commenti + Comentarii + ความคิดเห็น + 评论 + + + Example Date + Exemple de date + Esempio Data + Data Exemplu + ตัวอย่างวันที่ + 样例日期 + + + Example ID + Réf. d'exemple + Codice Esempio + Cod Exemplu + รหัสตัวอย่าง + 样例标识 + + + Example Item sequence ID + Réf. de séquence exemple d'article + Riga esempio + รหัสลำดับตัวอย่างสินค้า + 样例明细序号 + + + Example Name + Nom d'exemple + Nome Esempio + Nume Exemplu + ชื่อตัวอย่าง + 样例名称 + + + Example Size + Exemple de taille + Esempio Taglia + Marime-size Exemplu + ขนาดตัวอย่าง + 样例尺寸 + + + Example Type ID + Réf. de type d'exemple + Tipo esempio + รหัสประเภทตัวอย่าง + 样例类型标识 + + + Long Description + Longue description + Descrizione Lunga + Descriere Lunga + รายละเอียด + 详细描述 + + diff --git a/example/config/ExampleHelpUiLabels.xml b/example/config/ExampleHelpUiLabels.xml new file mode 100644 index 000000000..f21e94aca --- /dev/null +++ b/example/config/ExampleHelpUiLabels.xml @@ -0,0 +1,28 @@ + + + + + An example of a Help screen. + Un exemple d'écran d'aide + Un esempio di schermata di aiuto. + 帮助屏幕的样例 + + diff --git a/example/config/ExampleUiLabels.xml b/example/config/ExampleUiLabels.xml new file mode 100644 index 000000000..321de99bd --- /dev/null +++ b/example/config/ExampleUiLabels.xml @@ -0,0 +1,872 @@ + + + + + Datei herunterladen + Download file + + + Content öffnen. + Open content. + + + Datei öffnen + Open file + + + Content löschen. + Remove content. + + + Datei löschen + Remove file + + + Einen neuen Content Eintrag hinzufügen + Add a new content entry + + + Füge einen neuen Node Pfad hinzu, z.B. /Foo/Baa speichert die Datei im Ordner "Baa" + Add a (new) node path like /Foo/Baa will store the file under the folder "Baa" + + + Ajax Examples + Exemples Ajax + Esempi Ajax + Ajax样例 + + + To use this Ajax demonstration, you must have JavaScript enabled on your browser. + Pour utiliser cette démonstration Ajax, vous devez avoir activé Javascript + Per usare questa dimostrazione Ajax, tu devi avere JavaScript abilitato sul tuo browser. + 要使用这个Ajax演示,你必须让你的浏览器启用JavaScript。 + + + + Example Application + Application exemple + Applicazione Esempi + Aplicatie Exemple + Приложение Пример + ตัวอย่างโปรแกรมคอมพิวเตอร์ + 样例应用 + + + Autocomplete Dropdown + Liste déroulante à auto complétion + + + COUNTRY type based example, use Geo.Geoid and Geo.GeoName Entity.fields for completion + Exemple sur le type COUNTRY et utilisant Geo.Geoid et Geo.GeoName comme Entité.champs pour la complétion + + + Verion des Content Knoten + Version of the base content node + + + BIRT Examples + ตัวอย่าง BIRT + + + HTML chart report + Graphiques HTML + + + PDF chart report + Graphiques PDF + + + Send any format through Mail + + + HTML + + + PDF + + + Calendar field (only test purp.) + Calendrier (only test) + + + OFBiz: Example + OFBiz : Exemple + OFBiz: Esempi + OFBiz: Exemple + OFBiz: Пример + OFBiz: ตัวอย่าง + OFBiz: 样例 + + + + جزء من عائلة أوفبيز للتطبيقات الحرة للتسيير + Teil der Open For Business Familie von Open Source Software + Part of the Open For Business Family of Open Source Software + + Parte de la familia de software Open For Business de código abierto + Un module de la famille Open For Business, logiciel libre de gestion d'entreprise. + Un modulo della famiglia di software open source Open For Business + + Deel van de Open For Business-suite van Open Source Software + Parte da família OfBiz de software de fonte aberta + + Parte da família OfBiz de software de fonte aberta + + Partea de Deschidere Pentru Afaceri Familiale din Open Source Software + + Входит в состав семейства Open For Business + + ส่วนหนึ่งของธุรกิจแบบครอบครัวที่เป็นซอฟต์แวร์โอเพนซอส + + 开源软件OFBiz家族的一部分 + OFBiz的一部分 + + + Dashboard + Personnalisation des pages + Cruscotto + 个人主页 + + + Field10: date and time selection field with default value + Champ 10 : sélection de date et temps (valeur par défaut) + Campo10: campo di selezione con valore di default per data e ora + 数据项10:带有缺省值的日期和时间选择 + + + Same as above, uses the nowTimestamp variable (always available in the form context) to set the default value to now + La même chose mais la variable nowTimestamp (toujours disponible dans context) est utilisée pour affecter la valeur par défaut à "maintenant" + Lo stesso di sopra, usare la variabile nowTimestamp (sempre disponibile nel contesto della form) per impostare il valore di default ad adesso + 同上,使用nowTimstamp变量(在表单中总是可用的)来把缺省值设置为现在 + + + Field11: date and time selection field with default value + Champ 11 : sélection de date et temps (valeur par défaut) + Campo11: campo di selezione con valore di default per data e ora + 数据项11:带有缺省值的日期和时间选择 + + + Uses the \${date:dayStart(nowTimestamp, timeZone, locale)} UEL expression to set the default value to the start of today + 使用\${date:dayStart(nowTimestamp, timeZone, locale)}表达式来把缺省值设置为今天的开始时间 + + + Field12: advanced date time selection with a step value for minutes + Champ 12 : Sélection avancée date et temps avec la possibilité de choisir un pas pour les minutes + + + Use step=1 (default), 5, 10, 15, 30 + Utiliser 1 (valeur par défaut), 5, 10, 15, 30 pour la valeur du pas + + + Field1: date and time selection field + Champ 1 : sélection de date et temps + Campo1: campo di selezione data e ora + 数据项1:日期和时间选择 + + + Field2: date selection field + Champ 2 : sélection de date + Campo2: campo di selezione data + 数据项2:日期选择 + + + Field3: time selection field + Champ 3 : sélection de temps + Campo3: campo di selezione ora + 数据项3:时间选择 + + + Field4: advanced date time selection + Champ 4 : sélection avancée de date et temps + Campo4: selezione avanzata data e ora + 数据项4:高级日期时间选择 + + + Use the input-method (time-dropdown) and clock (24) attributes to create drop down boxes for hour and minute selections + Utilise des listes déroulantes pour définir les heures et minutes + Usare il metodo di input (time-dropdown) e gli attributi ora (24) per creare i box per la selezione ore e minuti + 使用输入方法(时间下拉框)和时钟(24)属性来创建小时和分钟的下拉框 + + + Field5: advanced date time selection (AM/PM) + Champ 5 : sélection avancée de date et temps (AM/PM) + Campo5: selezione avanzata data e ora (AM/PM) + 数据项5:高级日期时间选择(上午/下午) + + + Field6: date and time simple display + Champ 5 : affichage simple de date et temps + Campo6: data e ora semplice da visualizzare + 数据项6:日期和时间简单显示 + + + Field7: date and time display with custom format + Champ 7 : affichage de date et temps à un format spécifique + Campo7: data e ora da visualizzare con un formato personalizzato + 数据项7:使用定制格式显示日期和时间 + + + This is an example of MM/dd/yyyy format + Exemple auformat MM/dd/yyyy + Questo è un'esempio di formato data MM/gg/aaaa + 这是MM/dd/yyyy格式样例 + + + Field8: date and time display with custom format + Champ 8 : affichage de date et temps à un format spécifique + Campo8: data e ora da visualizzare con un formato personalizzato + 数据项8:使用定制格式显示日期和时间 + + + This is an example of MMMM, dd, yyyy format + Exemple au format MMMM, dd, yyyy + Questo è un'esempio di formato data MMMM, gg, aaaa + 这是MMMM, dd, yyyy格式样例 + + + Field9: date and time selection field with default value + Champ 9 : sélection de date et temps avec valeur par défaut + Campo9: campo di selezione con valore di default per data e ora + 数据项9:日期和时间选择带有缺省值 + + + Same as above, uses the \${groovy:...} notation to call an util method to get the now timestamp + La même chose mais utilise la notation \${groovy:...} pour appeler un méthode utilitaire pour obtenir l'heure du moment + Lo stesso di sopra, usare la notazione \${groovy:...} per eseguire un metodo di utilità per ottenere un nuovo timestamp + 同上,使用\${groovy:...}来调用一个应用方法来获得现在的时间戳 + + + Date/Time fields + Champs de date et temps + Campi data/ora + 日期/时间数据项 + + + in the file: + dans le fichier : + nel file: + 在文件: + + + framework/example/widget/example/FormWidgetExampleForms.xml + framework/example/widget/example/FormWidgetExampleForms.xml + framework/example/widget/example/FormWidgetExampleForms.xml + + + - see the form definition with name + - voir la défintion avec la form de nom + - vedi la definizione della form con il nome + - 参见表单定义,名称为 + + + Needs some fields to be set, see in FormWidgetExampleScreens.xml (begins with dependentForm) + Nécessite de définir certains champs, voir dans FormWidgetExampleScreens.xml (commence avec dependentForm) + + + Dependent drop-downs + liste déroulante dépendantes + + + drop-down + liste déroulante + drop-down + 下拉框 + + + entity-options + entity-options + entity-options + 实体选项 + + + All these fields retrieve the list of values from another entity by using the entity-options element. + Tous ces champs récupèrent leurs listes de valeurs depuis une autre entité en utilisant l'élement entity-options + Tutti questi campi ricavano la lista di valori da un'altra entità che usa l'elemento entity-options. + 全部这些数据项是通过使用实体选项元素从另一个实体抽取数据列表得到的。 + + + entity-options will look up options for the field in the given entity. + entity-options recherchera les options de ce champ en fonction de l'entité utilisée + entity-options ricercherà le opzioni per il campo nell'entità specificata. + 实体选项会查找指定实体的数据项选项 + + + The complete syntax is... TODO + La syntaxe complète est... A FAIRE + La sintassi completa è.... DA FARE + 完整的语法是... 待实现 + + + Field1: optional + Champ1 : optionnel + Campo1: opzionale + 数据项1:可选的 + + + This is an example of a drop-down field with allow-empty set to true: as you can see, an empty entry is automatically added. + Exemple de champ à liste déroulante ayant allow-empty définit comme vrai. Comme vous le voyez, une option vide est automatiquement ajoutée en tête + Questo è un'esempio di un campo drop-down con allow-empty impostato a vero: come tu puoi vedere, una riga automatica verrà aggiunta + 这是一个下拉数据项的例子,允许空设置为是:如你所见,会自动添加一个空的记录。 + + + Field2: mandatory + Champ 2 : obligatoire + Campo2: obbligatorio + 数据项2:强制 + + + The same as above, but here allow-empty is set to false (the default, if not specified): as you can see, there is no empty selection. + La même chose mais ici allow-empty est faux (la valeur par défaut n'est pas spécifiée). Comme vous pouvez le voir, il n'y a pas d'option vide en tête + Lo stesso di spota, ma qui allow-empty è falso (di default, se non specificato): come puoi vedere, non c'è nessuna selezione vuota. + 同上,但是这里允许空设置为否(如果没有指明的话,否是缺省值):如你所见,没有空的选择。 + + + Field3: sort in descending order + Champ 3 : tri descendant + Campo3: ordinato in ordine discendente + 数据项3:按降序排序 + + + Field4: combined description + Champ 4 : description combinée + Campo4: descrizione combinata + 数据项4:组合的描述 + + + Field5: selection of a default value from the list + Champ 5 : choix d'une valeur par défaut dans la liste + Campo5: seleziona un valore di default dalla lista + 数据项5:从列表选择一个缺省值 + + + How to use the no-current-selected-key to select a default value from the options + Comment utiliser no-current-selected-key pour choisir une valeur par défaut parmi les options + Come usare no-current-selected-key per selezionare un valore di default dalle opzioni + 怎样使用没有当前选择键来从选项中选择一个缺省值 + + + Field6: (exampleTypeId): shortest notation + Champ 6 : (exampleTypeId): notation plus courte + Campo6: (exampleTypeId): notazione breve + 数据项6:(样例类型标识):最短注释 + + + Field7: additional constraint + Champ 8 : contrainte additionnelle + Campo7: costrizioni aggiuntive + 数据项7:额外限制 + + + Field8: Javascript event + Champ 8 : évènement Javascript + Campo8: evento Javascript + 数据项8:Javascript事件 + + + How to use the event and action attributes (in the field element) to trigger a Javascript action (in this example a popup message when the option is changed). + Comment utiliser les attributs évènement (event) et action, dans l'élément champ (field) pour déclencher une action Javascript, dans cet exemple un message surgissant quand l'option est changée + Come usare gli eventi a l'azione attributi (nell'elemento field) per avviare l'azione Javascript (nell'esempio un messaggio popup quando l'opzione viene cambiata). + 怎样使用事件和操作属性(在数据项元素(field))中触发一个Javascript操作(在这个样例中,当选项变化时会弹出一个信息)。 + + + Drop down fields + Champs à listes déroulantes + Campi drop down + 下拉框数据项 + + + First of all you have to define a drop-down element inside of the field element that you want to render as a drop down field. + Pour commencer vous définissez un élément liste déroulante (drop-down) à l'intérieur de l'élément champ (field) que vous voulez créer comme liste déroulante + Prima di tutto tu devi definire un'elemento drop-down dentro un'elemento field che tu visualizzerai come campo drop down. + 首先,你必须在数据项元素内定义一个下拉元素,来修饰为下拉数据项。 + + + Example + Exemple + Esempio + Exemplu + Пример + ตัวอย่าง + 样例 + + + Example Feature + Caractéristique exemple + Caratteristica Esempio + Caracteristica Exemplu + Особенность примера + ลักษณะตัวอย่าง + 样例特征 + + + Example Feature ID + Réf. de caractéristique exemple + Codice Caratteristica Esempio + Cod Caracteristica Exemplu + Код особенности примера + ตัวอย่างรหัสลักษณะ + 样例特征标识 + + + Example ID + Réf. exemple + Codice esempio + Cod Exemplu + Код примера + รหัสตัวอย่าง + 样例标识 + + + Examples + Exemples + Esempi + Exemple + Примеры + ตัวอย่าง + 样例 + + + Explicit Option + Option explicite + Opzione Esplicita + ทางเลือกที่ชัดเจน + 显在选项 + + + Feature + Caractéristique + Caratteristica + Caracteristica + Особенность + ลักษณะ + 特征 + + + Feature Source + Caractéristique d'origine + Caratteristica Origine + Origine Caracteristici + Источник особенности + ที่มา + 特征源 + + + Features + Caractéristiques + Caratteristiche + Caracteristici + Особенности + ลักษณะ + 特征 + + + Field + Campo + 数据项 + + + This will print a simple PDF file which will show the FOP fonts avalaible in OFBiz + Impression d'un simple fichier PDF qui montre les polices FOP disponibles dans OFBiz + Questo stampa un file PDF semplice che mostrerà i font FOP disponibili in OFBiz + 这将打印一个简单的PDF文件,这个文件会显示OFBiz中可用的FOP字体 + + + Form Widget Examples + Exemple de Form Widget + Esempi form widget + ตัวอย่างรูปแบบ Widget + 表单挂件样例 + + + Group + Gruppo + 组 + + + Fields groups + Gruppi campi + 数据项组 + + + Repository aufräumen + Clean repository + + + Löscht alle Nodes aus dem Repository, die keine Verkünpfung in der Content Tabelle haben. + Removes all nodes which are not linked in the content table. + + + Liste alles Knoten + List Nodes + + + Das Repository kann mit Hilfe der SQL2 oder JQOM Query Language durchsucht werden: z.B. SELECT * FROM [nt:unstructured] gibt alle nodes vom Typ nt:unstructured zurück. + You can search the repository by using SQL2 or JQOM query syntax: i.e. SELECT * FROM [nt:unstructured] gives all nodes with the typ nt:unstructured. + + + Content Schnellauswahl - Content Node auswählen und Sprache bestimmen. + Content quick select - Choose your content node and select a language. + + + (Text) Content anzeigen + Show (text) content + + + Dateien anzeigen + Show uploaded Files + + + Wähle eine Datei und versuche einen Rechtklick + Choose a file and try a 'right click' + + + Eine neue Datei speichern + Upload a new file + + + Verion der gewählten sprache + Version of the choosen language + + + Layered lookup field (only test purp.) + Lookup de type layer (only test) + + + Long Description + Descrizione lunga + 详细描述 + + + Lookup Fields: First of type popup, second layered and showing use of set_values underneath, ie returning not only Id but also another value. Both using also autocomplete + Champs de recherche: le premier de type popup, le second de type layer avec usage sous-jacent de set_values qui permet de traiter non seulement une référence mais aussi une autre valeur. Les 2 utilisent aussi l'autocompletion + + + Lookup Fields + Champs de recherche + + + Example Main Page + Exemple de page principale + Pagina principale esempi + ตัวอย่างหน้าหลัก + 样例首页 + + + For something interesting make sure you are logged in, try username:admin, password:ofbiz. + Pour voir les exemples, vérifiez que vous être connecté, essayez l'utilisateur admin et le mot de passe ofbiz + Per qualsiasi interesse devi essere sicuro di essere entrato, provare nome utente:admin, password:ofbiz. + Pentru a fi sigur ca te-ai logat, incearca username:admin, password:ofbiz. + Для того чтобы иметь возможность сделать что-нибудь интересное убедитесь что вы зарегистрировались в системе, попробуйте имя:admin, пароль:ofbiz. + สำหรับท่านที่สนใจสามารถเข้าสู่ระบบได้, โดยใช้ ชื่อผู้ใช้:admin, รหัสผ่าน:ofbiz + 如果对某部分感兴趣,请先确信你已登录,可以尝试用 用户名:admin、密码:ofbiz登录。 + + + Needs some fields to be set, see in FormWidgetExampleScreens.xml (begins with multipleSelect) + Nécessite de définir certains champs, voir dans FormWidgetExampleScreens.xml (commence avec multipleSelect) + + + Multiple drop-downs + liste déroulante avec choix multiples + + + New Example + Nouvel exemple + Nuovo Esempio + Nou Exemplu + Новый пример + ตัวอย่างใหม่ + 新建样例 + + + New Example Feature + Nouvelle caractéristique exemple + Nuova Caratteristica Esempio + Noua Caracteristica Exemplu + Новая особенность примера + ลักษณะตัวอย่างใหม่ + 新建样例特征 + + + No SpecificTitle attribute set for this portlet. You can use the Portlet attribute editing button to set them. + Non si è specificato nessun valore per l'attributo SpecificTitle in questo Portlet. Utilizza la funzione editing dei parametri per impostarlo. + + + Original Example + Exemple original + Esempio originale + Оригинальный пример + ตัวอย่างเดิม + 原样例 + + + Security Error: to run ${resourceDescription} you must have the EXAMPLE_${mainAction} or EXAMPLE_ADMIN permission + Erreur de sécurité : pour exécuter ${resourceDescription} vous devez avoir l'autorisation EXAMPLE_${mainAction} ou EXAMPLE_ADMIN + Errore Sicurezza: per eseguire ${resourceDescription} tu devi avere il permesso EXAMPLE${mainAction} o EXAMPLE_ADMIN + Eroare Siguranta: pentru executare ${resourceDescription} trebuie sa ai permisul EXAMPLE${mainAction} sau EXAMPLE_ADMIN + Ошибка безопасности: для выполнения ${resourceDescription} у вас должны быть права EXAMPLE_${mainAction} или EXAMPLE_ADMIN + ข้อผิดพลาดในส่วนของความปลอดภัย: ในการรัน ${resourceDescription} คุณต้องได้รับอนุญาตจาก EXAMPLE_${mainAction} หรือ EXAMPLE_ADMIN ก่อน + 安全错误: 要运行${methodShortDescription},你必须具有EXAMPLE${securityAction}或EXAMPLE_ADMIN权限 + + + In the permission-service element for the exampleGenericPermission service the main-action attribute was missing but is required + Nell'elemento permission-service per il servizio exampleGenericPermission l'attributo è mancancate ma è richiesto + + + Geolocation via address + Géolocalisation par l'adresse + + + Portlet Attribut need to be define, click here to resolve it + Les attributs de la portlet doivent être definie. Cliquez ici pour résoudre le problème. + + + Hi, this is a first example of portlet + Salve, questo è il primo esempio di portlet + 你好,这是第一个Portlet样例 + + + Go to configured portal page -> + Allez à la page portail configurée -> + + + Hi, this is a second example of portlet + Salve, questo è il secondo esempio di portlet + 你好,这是第二个Portlet样例 + + + Specific Sub Title + Sotto-titolo specifico + 指定的子标题 + + + Specific Title + Titolo specifico + 指定的标题 + + + Hi, this is a third example of portlet with editable parameters. + Salve, questo è il terzo esempio di portlet con parametri modificabili. + 你好,这是第三个Portlet样例,具有编辑参数。 + + + Print Button + Bottone di stampa + 打印按钮 + + + Datei + File + + + Ordner + Folder + + + Text Nachricht + Text message + + + Knoten + Node + + + Repository Struktur überprüfen + Scan repository structure + + + Selection boxes + Boutons de sélection + + + Source Code + Codice sorgente + 源代码 + + + This example text means we are in the extended form. + Questo testo di esempio significa che noi siamo nella form estesa di esempio. + 这个样例文本意味着我们处于扩展表单中。 + + + Explanation TODO + Explication à faire + DA FARE + 待实现 + + + You do not have permission to view this page. ("EXAMPLE_VIEW" or "EXAMPLE_ADMIN" needed) + Vous n'avez pas l'autorisation de voir cette page ("EXAMPLE_VIEW" ou "EXAMPLE_ADMIN" nécessaire) + Tu non sei autorizzare a vedere questa pagina. (Permesso "EXAMPLE_VIEW" o "EXAMPLE_ADMIN" necessario) + Nu esti autorizat sa vezi aceasta pagina. (Este necesar Permisul "EXAMPLE_VIEW" sau "EXAMPLE_ADMIN") + У вас нет прав для просмотра этой страницы. (необходимы права "EXAMPLE_VIEW" или "EXAMPLE_ADMIN") + คุณไม่ได้รับอนุญาตให้เข้าดูหน้านี้ได้ (หน้า "EXAMPLE_VIEW" หรือ "EXAMPLE_ADMIN" ที่ต้องการ) + 你没有浏览这个页面的权限。(需要"EXAMPLE_VIEW"或"EXAMPLE_ADMIN") + + + Welcome to the Example application! + Bienvenue dans l'application exemple + Benvenuto nell'Applicazione Esempi! + Bine ai venit in Aplicatia Exemple! + Добро пожаловать в учебное приложение Пример! + ยินดีต้อนรับสู่ตัวอย่างโปรแกรม! + 欢迎使用样例应用! + + + Another Date + Une autre date + Altra Data + วันที่อื่น ๆ + 另一个日期 + + + Another Text + Un autre texte + Altro testo + ตัวหนังสืออื่น ๆ + 另一个文本 + + + Another Text + Testo alternativo + 另一个文本 + + + Example Date + Exemple de date + Esempio Data + Data Exemplu + Дата примера + ตัวอย่างวันที่ + 样例日期 + + + + Example Name + Nom d'exemple + Nome Esempio + Nume Exemplu + Имя примера + ตัวอย่างชื่อ + 样例名称 + + + Example Size + Exemple de taille + Esempio Taglia + Marime-size Exemplu + Размер примера + ตัวอย่างขนาด + 样例尺寸 + + + Example Text + Testo esempio + 样例文本 + + + Edit Example + Modifier l'exemple + Aggiorna Esempio + Actualizeaza Exemplu + Изменить пример + แก้ไขตัวอย่าง + 编辑样例 + + + Edit Example Feature + Modifier la caractéristique de l'exemple + Aggiorna Caratteristica Esempio + Actualizeaza Caracteristica Exemplu + Изменить особенности примера + แก้ไขลักษณะตัวอย่าง + 编辑样例特征 + + + Edit Example Features + Modifier les caractéristiques de l'exemple + Aggiorna Caratteristiche Esempio + Actualizeaza Carateristici Exemplu + Изменить особенность примера + แก้ไขลักษณะตัวอย่าง + 编辑样例特征 + + + Edit Example Feature Examples + Modifier la caractéristique exemple des exemples + Aggiorna Esempio Caratteristica Esempi + Actualizeaza Exemplu Caratteristica Exemple + Изменить примеры особенностей + แก้ไขตัวอย่างลักษณะตัวอย่าง + 编辑样例特征的样例 + + + Edit Example Items + Modifier la ligne de l'exemple + Aggiorna Righe Esempio + Actualizeaza Linii Exemplu + Изменить позиции примера + แก้ไขสินค้าตัวอย่าง + 编辑样例明细 + + + Jackrabbit + Jackrabbit + + + + Find Example + Recherche d'un exemple + Ricerca Esempio + Cauta Exemplu + Найти пример + ค้นหาตัวอย่าง + 查找样例 + + + Find Example Feature + Rechercher la caractéristique de l'exemple + Ricerca Caratteristica Esempio + Cauta Caracteristica Exemplu + Найти особенность примера + ค้นหาลักษณะตัวอย่าง + 查找样例特征 + + + Form Widget Examples + Exemples Form Widget + Esempio form widget + ตัวอย่าง Widget + 表单挂件样例 + + + Lookup Example Feature + Rechercher une ou des caractéristiques exemple + Ricerca Caratteristica Esempio + Cauta Caracteristica Exemplu + Искать особенности примера + ดูลักษณะตัวอย่าง + 查找样例特征 + + + Sie haben den Wert in der Select Box geändert. + You have changed the value in the select box + + diff --git a/example/config/config.txt b/example/config/config.txt new file mode 100644 index 000000000..115f4aca7 --- /dev/null +++ b/example/config/config.txt @@ -0,0 +1,21 @@ +##################################################################### +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +##################################################################### + +This directory is usually placed on the classpath for configuration and +property files. diff --git a/example/data/ExampleDemoData.xml b/example/data/ExampleDemoData.xml new file mode 100644 index 000000000..08c602f04 --- /dev/null +++ b/example/data/ExampleDemoData.xml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/example/data/ExampleHelpData.xml b/example/data/ExampleHelpData.xml new file mode 100644 index 000000000..bb3adfacd --- /dev/null +++ b/example/data/ExampleHelpData.xml @@ -0,0 +1,26 @@ + + + + + + + diff --git a/example/data/ExamplePortalSeedData.xml b/example/data/ExamplePortalSeedData.xml new file mode 100644 index 000000000..43c3742d3 --- /dev/null +++ b/example/data/ExamplePortalSeedData.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + diff --git a/example/data/ExamplePortletData.xml b/example/data/ExamplePortletData.xml new file mode 100644 index 000000000..b0a857ce0 --- /dev/null +++ b/example/data/ExamplePortletData.xml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + diff --git a/example/data/ExampleSecurityData.xml b/example/data/ExampleSecurityData.xml new file mode 100644 index 000000000..93b9fade5 --- /dev/null +++ b/example/data/ExampleSecurityData.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + diff --git a/example/data/ExampleTypeData.xml b/example/data/ExampleTypeData.xml new file mode 100644 index 000000000..58393d463 --- /dev/null +++ b/example/data/ExampleTypeData.xml @@ -0,0 +1,22 @@ + + + + + diff --git a/example/data/helpdata/HELP_EXAMPLE.xml b/example/data/helpdata/HELP_EXAMPLE.xml new file mode 100644 index 000000000..ae4fb9017 --- /dev/null +++ b/example/data/helpdata/HELP_EXAMPLE.xml @@ -0,0 +1,55 @@ + + +
+ The Example Main Help page. + + The Example application will allow you to discover the possibilities to create an application, with a lot of search boxes, lists and many more. + This application could be used to have an example of the bests practices in user interface development in Apache - OFBiz. + Look help for each example screen, help will explain which part of development is used in this case. + For example, if you want to see how you should do to add some help you can look to help files in data/helpdata directory in example + component and data/ExempleHelpData.xml in content component. + +
+ Help file organization + Help is managed by using content component functionality. + Help can be for : + + one component or sub-component, access is possible by navigation in help index tree and select it, contentId is associated to + HELP_ROOT with contentAssocTypeId="TREE_CHILD" ; + one screen, access is done by help icon in screen (most of time on top), contentId is search on ContentAssoc.mapKey with + a value (helpTopic) build with component webSite and uri used to show this screen ; + one portlet, access is done by a link on the portalPages (which contain this portlet) help, link is a showHelp (like + for a screen) with helpTopic build with "HELP_" and portletId + one portal page, access is done by help icon if parameters.portalPageId is not empty, contentId is read on PortalPage + (or originalPortalPage if exist) and is show on top of portlet list contain on it. + + +
+ +
+ Development help sub-subject + To have the complete list you should click on index button and look to example tree option, but here is a list of + main shortcut : + + How is organize The Apache OFBiz documentation system + What it's possible to do in help file + + +
+
diff --git a/example/data/helpdata/HELP_EXAMPLE_FR.xml b/example/data/helpdata/HELP_EXAMPLE_FR.xml new file mode 100644 index 000000000..3298c899a --- /dev/null +++ b/example/data/helpdata/HELP_EXAMPLE_FR.xml @@ -0,0 +1,44 @@ + + +
+ Page principale de l'aide du composant Exemple + + L'application exemple vous permet de découvrir les possibilités pour créer une application contenant, entre autres, des + boîtes de recherche, des listes et beaucoup d'autres choses. + + + Cette application peut être utilisée pour avoir un aperçu des bonnes pratiques d'interface utilisateur pour OFBiz. + + Par exemple, si vous voulez voir comment vous pouvez ajouter des textes d'aide, vous pouvez regarder les fichiers contenus dans le + répertoire data/heldata dans le composant Example et dans le fichier contenu dans data/ExempleHelpData.xml au niveau de l'application + content + + +
+ Sous-menus dans l'aide + + Pour avoir la liste complète, cliquez sur le bouton "Index" et regardez l'arborescence de l'aide. Voici aussi une liste + de raccourcis : + + Comment fonctionne le système de documentation d'Apache OFBiz + Ce qu'il est possible de faire dans les fichiers d'aide + + +
+
diff --git a/example/data/helpdata/HELP_EXAMPLE_docbook.xml b/example/data/helpdata/HELP_EXAMPLE_docbook.xml new file mode 100644 index 000000000..21dbb54e3 --- /dev/null +++ b/example/data/helpdata/HELP_EXAMPLE_docbook.xml @@ -0,0 +1,72 @@ + + +
+ + Help on writing docBook documents +
+ Example of an ordered list + The orderedlist will put numbers in front of each item. + + First item of my list + Second item + Third... + 4th... + and this can go longer... + +
+
+ Example of an itemized list + The itemizedlist will put a bullet in front of each item. + + First item of my list + Second item + Third... + 4th... + and this can go longer... + +
+ +
+ Examples of text formatting + + Caution title + Here is a caution text + + + Important title + Here is an important text + + + Note title + Here is a note + + + Tip title + Here is a tip + + + Here is a warning + +
+
diff --git a/example/data/helpdata/HELP_EXAMPLE_main.xml b/example/data/helpdata/HELP_EXAMPLE_main.xml new file mode 100644 index 000000000..a421dfc03 --- /dev/null +++ b/example/data/helpdata/HELP_EXAMPLE_main.xml @@ -0,0 +1,25 @@ + + +
+ The Example Main page. + About the Example application + + In this page, you can create or search an example + +
diff --git a/example/dtd/dtd.txt b/example/dtd/dtd.txt new file mode 100644 index 000000000..de6b448dd --- /dev/null +++ b/example/dtd/dtd.txt @@ -0,0 +1,21 @@ +##################################################################### +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +##################################################################### + +Place all DTDs / schemas which need to be included on the classpath here. +All files located in this directory will be placed in the root of the built jar. diff --git a/example/entitydef/entitydef.txt b/example/entitydef/entitydef.txt new file mode 100644 index 000000000..70a148234 --- /dev/null +++ b/example/entitydef/entitydef.txt @@ -0,0 +1,25 @@ +##################################################################### +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +##################################################################### + +Entity model, Entity ECA, and Entity group definitions. +Usually in the format of: + +entitymodel.xml +entitygroup.xml +eecas.xml diff --git a/example/entitydef/entitymodel.xml b/example/entitydef/entitymodel.xml new file mode 100644 index 000000000..fd46394dc --- /dev/null +++ b/example/entitydef/entitymodel.xml @@ -0,0 +1,151 @@ + + + + + + + + Entity of an Open For Business Project Component + None + 1.0 + ExampleEntityLabels + + + + + + + + + + + + + + primary sequenced ID + + + + + + + + + + + + + + + + + + + + + secondary sequenced ID + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + primary sequenced ID + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/example/entitydef/entitymodel_view.xml b/example/entitydef/entitymodel_view.xml new file mode 100644 index 000000000..67d305fd2 --- /dev/null +++ b/example/entitydef/entitymodel_view.xml @@ -0,0 +1,155 @@ + + + + + + + + Entity of an Open For Business Project Component + None + 1.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/example/lib/lib.txt b/example/lib/lib.txt new file mode 100644 index 000000000..570b39f39 --- /dev/null +++ b/example/lib/lib.txt @@ -0,0 +1,20 @@ +##################################################################### +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +##################################################################### + +External (thirdparty) libraries which are required for running and building this component. diff --git a/example/ofbiz-component.xml b/example/ofbiz-component.xml new file mode 100644 index 000000000..01b235717 --- /dev/null +++ b/example/ofbiz-component.xml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/example/script/org/ofbiz/example/ExamplePermissionServices.xml b/example/script/org/ofbiz/example/ExamplePermissionServices.xml new file mode 100644 index 000000000..387f34af5 --- /dev/null +++ b/example/script/org/ofbiz/example/ExamplePermissionServices.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/example/script/org/ofbiz/example/example/ExampleServices.xml b/example/script/org/ofbiz/example/example/ExampleServices.xml new file mode 100644 index 000000000..b9f0f6796 --- /dev/null +++ b/example/script/org/ofbiz/example/example/ExampleServices.xml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/example/script/script.txt b/example/script/script.txt new file mode 100644 index 000000000..b36499167 --- /dev/null +++ b/example/script/script.txt @@ -0,0 +1,20 @@ +##################################################################### +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +##################################################################### + +The script directory is for static resources that are interpreted at run time rather than being compiled. This goes on the classpath, but does not get built or put into a JAR file. diff --git a/example/servicedef/secas.xml b/example/servicedef/secas.xml new file mode 100644 index 000000000..8343a075e --- /dev/null +++ b/example/servicedef/secas.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + diff --git a/example/servicedef/servicedef.txt b/example/servicedef/servicedef.txt new file mode 100644 index 000000000..bcb5846c4 --- /dev/null +++ b/example/servicedef/servicedef.txt @@ -0,0 +1,25 @@ +##################################################################### +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +##################################################################### + +Service definitions including group and eca definitions. +Usually formatted as: + +services.xml +groups.xml +secas.xml diff --git a/example/servicedef/services.xml b/example/servicedef/services.xml new file mode 100644 index 000000000..b9be4eab4 --- /dev/null +++ b/example/servicedef/services.xml @@ -0,0 +1,129 @@ + + + + + Example Services + OFBiz + 1.0 + + + + Create a Example + + + + + + + + + Update a Example + + + + + + + Delete a Example + + + + + Create a ExampleStatus + + + + + + + + + Create a ExampleItem + + + + + + + + Update a ExampleItem + + + + + + Delete a ExampleItem + + + + + + + Create a ExampleFeature + + + + + + + Update a ExampleFeature + + + + + + Delete a ExampleFeature + + + + + + Create a ExampleFeatureAppl + + + + + + + Update a ExampleFeatureAppl + + + + + + Delete a ExampleFeatureAppl + + + + + + + + + + + + + + diff --git a/example/src/org/ofbiz/example/ExamplePrintServices.java b/example/src/org/ofbiz/example/ExamplePrintServices.java new file mode 100644 index 000000000..28239f1fd --- /dev/null +++ b/example/src/org/ofbiz/example/ExamplePrintServices.java @@ -0,0 +1,145 @@ +/******************************************************************************* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + *******************************************************************************/ +package org.ofbiz.example; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.StringReader; +import java.io.StringWriter; +import java.io.Writer; +import java.util.Map; + +import javax.print.Doc; +import javax.print.DocFlavor; +import javax.print.DocPrintJob; +import javax.print.PrintException; +import javax.print.PrintService; +import javax.print.PrintServiceLookup; +import javax.print.SimpleDoc; +import javax.print.attribute.HashPrintRequestAttributeSet; +import javax.print.attribute.PrintRequestAttributeSet; +import javax.print.attribute.standard.Copies; +import javax.print.attribute.standard.Sides; +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.transform.stream.StreamSource; + +import javolution.util.FastMap; + +import org.apache.fop.apps.FOPException; +import org.apache.fop.apps.Fop; +import org.apache.fop.apps.MimeConstants; +import org.ofbiz.base.util.Debug; +import org.ofbiz.base.util.GeneralException; +import org.ofbiz.service.DispatchContext; +import org.ofbiz.service.ServiceUtil; +import org.ofbiz.webapp.view.ApacheFopWorker; +import org.ofbiz.widget.html.HtmlScreenRenderer; +import org.ofbiz.widget.screen.ScreenRenderer; +import org.xml.sax.SAXException; + +public class ExamplePrintServices { + public static final String module = ExamplePrintServices.class.getName(); + + private static HtmlScreenRenderer htmlScreenRenderer = new HtmlScreenRenderer(); + + public static Map printReportPdf(DispatchContext dctx, Map context) { + String screenLocation = "component://example/widget/example/ExampleReportScreens.xml"; + String reportScreenName = "ExampleReport"; + Map workContext = FastMap.newInstance(); + workContext.putAll(context); + + // render a screen to get the XML document + Writer reportWriter = new StringWriter(); + ScreenRenderer reportScreenRenderer = new ScreenRenderer(reportWriter, null, htmlScreenRenderer); + reportScreenRenderer.populateContextForService(dctx, workContext); + + // put the exampleId in the screen context, is a parameter coming into the service + //reportScreenRenderer.getContext().put("exampleId", context.get("exampleId")); + + try { + reportScreenRenderer.render(screenLocation, reportScreenName); + } catch (GeneralException e) { + String errMsg = "General error rendering screen [" + screenLocation + "]: " + e.toString(); + Debug.logError(e, errMsg, module); + return ServiceUtil.returnError(errMsg); + } catch (IOException e) { + String errMsg = "IO error rendering screen [" + screenLocation + "]: " + e.toString(); + Debug.logError(e, errMsg, module); + return ServiceUtil.returnError(errMsg); + } catch (SAXException e) { + String errMsg = "SAX (XML parse) error rendering screen [" + screenLocation + "]: " + e.toString(); + Debug.logError(e, errMsg, module); + return ServiceUtil.returnError(errMsg); + } catch (ParserConfigurationException e) { + String errMsg = "Parser configuration error rendering screen [" + screenLocation + "]: " + e.toString(); + Debug.logError(e, errMsg, module); + return ServiceUtil.returnError(errMsg); + } + + // set the input source (XSL-FO) and generate the PDF + StreamSource src = new StreamSource(new StringReader(reportWriter.toString())); + + // create the output stream for the generation + ByteArrayOutputStream out = new ByteArrayOutputStream(); + + try { + Fop fop = ApacheFopWorker.createFopInstance(out, MimeConstants.MIME_PDF); + ApacheFopWorker.transform(src, null, fop); + } catch (FOPException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + + /* + // set the content type and length + response.setContentType("application/pdf"); + response.setContentLength(out.size()); + + // write to the browser + try { + out.writeTo(response.getOutputStream()); + response.getOutputStream().flush(); + } catch (IOException e) { + throw new ViewHandlerException("Unable write to browser OutputStream", e); + } + */ + + DocFlavor docFlavor = DocFlavor.BYTE_ARRAY.PDF; + Doc myDoc = new SimpleDoc(out.toByteArray(), docFlavor, null); + PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet(); + aset.add(new Copies(1)); + //aset.add(MediaSize.A4); + aset.add(Sides.ONE_SIDED); + + PrintService[] services = PrintServiceLookup.lookupPrintServices(docFlavor, aset); + if (services.length > 0) { + DocPrintJob job = services[0].createPrintJob(); + try { + job.print(myDoc, aset); + } catch (PrintException pe) { + String errMsg = "Unable to print PDF from XSL-FO: " + pe.toString(); + Debug.logError(pe, errMsg, module); + return ServiceUtil.returnError(errMsg); + } + } + + return ServiceUtil.returnSuccess(); + } +} diff --git a/example/src/org/ofbiz/example/JackrabbitEvents.java b/example/src/org/ofbiz/example/JackrabbitEvents.java new file mode 100644 index 000000000..fca25fe0d --- /dev/null +++ b/example/src/org/ofbiz/example/JackrabbitEvents.java @@ -0,0 +1,482 @@ +package org.ofbiz.example; + +import java.io.IOException; +import java.io.InputStream; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.GregorianCalendar; +import java.util.List; +import java.util.Map; + +import javax.jcr.ItemExistsException; +import javax.jcr.Node; +import javax.jcr.NodeIterator; +import javax.jcr.PathNotFoundException; +import javax.jcr.RepositoryException; +import javax.jcr.Session; +import javax.jcr.ValueFormatException; +import javax.jcr.nodetype.NodeType; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import javolution.util.FastMap; +import net.sf.json.JSONArray; +import net.sf.json.JSONObject; + +import org.apache.commons.fileupload.FileItem; +import org.apache.commons.fileupload.FileUploadException; +import org.apache.commons.fileupload.disk.DiskFileItemFactory; +import org.apache.commons.fileupload.servlet.ServletFileUpload; +import org.apache.commons.io.IOUtils; +import org.apache.jackrabbit.ocm.exception.ObjectContentManagerException; +import org.ofbiz.base.util.Debug; +import org.ofbiz.base.util.FileUtil; +import org.ofbiz.base.util.StringUtil; +import org.ofbiz.base.util.UtilGenerics; +import org.ofbiz.base.util.UtilHttp; +import org.ofbiz.base.util.UtilValidate; +import org.ofbiz.entity.GenericValue; +import org.ofbiz.jcr.access.JcrRepositoryAccessor; +import org.ofbiz.jcr.access.jackrabbit.JackrabbitRepositoryAccessor; +import org.ofbiz.jcr.api.JcrDataHelper; +import org.ofbiz.jcr.api.JcrFileHelper; +import org.ofbiz.jcr.api.jackrabbit.JackrabbitArticleHelper; +import org.ofbiz.jcr.api.jackrabbit.JackrabbitFileHelper; +import org.ofbiz.jcr.orm.OfbizRepositoryMapping; +import org.ofbiz.jcr.orm.jackrabbit.JackrabbitArticle; +import org.ofbiz.jcr.orm.jackrabbit.JackrabbitFile; +import org.ofbiz.jcr.orm.jackrabbit.JackrabbitFolder; +import org.ofbiz.jcr.orm.jackrabbit.JackrabbitHierarchyNode; +import org.ofbiz.jcr.util.jackrabbit.JackrabbitUtils; + +public class JackrabbitEvents { + + public static final String module = JackrabbitEvents.class.getName(); + + /** + * + * @param request + * @param response + * @return + */ + public static String addNewTextMessageToJcrRepository(HttpServletRequest request, HttpServletResponse response) { + GenericValue userLogin = (GenericValue) request.getSession().getAttribute("userLogin"); + JcrDataHelper articleHelper = new JackrabbitArticleHelper(userLogin); + + String contentPath = request.getParameter("path"); + String language = request.getParameter("msgLocale"); + String title = request.getParameter("title"); + Calendar pubDate = new GregorianCalendar(); // TODO + String content = request.getParameter("message"); + + try { + articleHelper.storeContentInRepository(contentPath, language, title, content, pubDate); + } catch (ObjectContentManagerException e) { + Debug.logError(e, module); + request.setAttribute("_ERROR_MESSAGE_", e.getMessage()); + return "error"; + } catch (ItemExistsException e) { + Debug.logError(e, module); + request.setAttribute("_ERROR_MESSAGE_", e.getMessage()); + return "error"; + } finally { + articleHelper.closeContentSession(); + } + + return "success"; + } + + /** + * + * @param request + * @param response + * @return + */ + public static String scanRepositoryStructure(HttpServletRequest request, HttpServletResponse response) { + GenericValue userLogin = (GenericValue) request.getSession().getAttribute("userLogin"); + try { + List> listIt = JackrabbitUtils.getRepositoryNodes(userLogin, ""); + request.setAttribute("listIt", listIt); + } catch (RepositoryException e) { + Debug.logError(e, module); + request.setAttribute("_ERROR_MESSAGE_", e.getMessage()); + return "error"; + } + + return "success"; + } + + /** + * + * @param request + * @param response + * @return + */ + public static String getNodeContent(HttpServletRequest request, HttpServletResponse response) { + GenericValue userLogin = (GenericValue) request.getSession().getAttribute("userLogin"); + + String contentPath = request.getParameter("path"); + + String version = request.getParameter("versions"); + String language = request.getParameter("language"); + + if (UtilValidate.isEmpty(contentPath)) { + String msg = "A node path is missing, please pass the path to the node which should be read from the repository."; // TODO + Debug.logError(msg, module); + request.setAttribute("_ERROR_MESSAGE_", msg); + return "error"; + } + + JcrDataHelper articleHelper = new JackrabbitArticleHelper(userLogin); + JackrabbitArticle ormArticle = null; + try { + if (UtilValidate.isEmpty(version)) { + ormArticle = articleHelper.readContentFromRepository(contentPath, language); + } else { + ormArticle = articleHelper.readContentFromRepository(contentPath, language, version); + } + } catch (ClassCastException e) { + Debug.logError(e, module); + request.setAttribute("_ERROR_MESSAGE_", e.getMessage()); + return "error"; + } catch (PathNotFoundException e) { + Debug.logError(e, module); + request.setAttribute("_ERROR_MESSAGE_", e.getMessage()); + return "error"; + } + + request.setAttribute("path", ormArticle.getPath()); + request.setAttribute("language", ormArticle.getLanguage()); + request.setAttribute("title", ormArticle.getTitle()); + request.setAttribute("version", ormArticle.getVersion()); + request.setAttribute("versionList", articleHelper.getVersionListForCurrentArticle()); + request.setAttribute("languageList", articleHelper.getAvailableLanguageList()); + request.setAttribute("createDate", ormArticle.getCreationDate()); + request.setAttribute("content", ormArticle.getContent()); + + return "success"; + } + + /** + * + * @param request + * @param response + * @return + */ + public static String updateRepositoryData(HttpServletRequest request, HttpServletResponse response) { + GenericValue userLogin = (GenericValue) request.getSession().getAttribute("userLogin"); + + String contentPath = request.getParameter("path"); + JcrDataHelper articleHelper = new JackrabbitArticleHelper(userLogin); + + JackrabbitArticle ormArticle = null; + try { + ormArticle = articleHelper.readContentFromRepository(contentPath); + } catch (ClassCastException e1) { + Debug.logError(e1, module); + request.setAttribute("_ERROR_MESSAGE_", e1.getMessage()); + return "error"; + } catch (PathNotFoundException e1) { + Debug.logError(e1, module); + request.setAttribute("_ERROR_MESSAGE_", e1.getMessage()); + return "error"; + } + + ormArticle.setTitle(request.getParameter("title")); + ormArticle.setContent(request.getParameter("content")); + + try { + articleHelper.updateContentInRepository(ormArticle); + } catch (ObjectContentManagerException e) { + Debug.logError(e, module); + request.setAttribute("_ERROR_MESSAGE_", e.toString()); + } catch (RepositoryException e) { + Debug.logError(e, module); + request.setAttribute("_ERROR_MESSAGE_", e.toString()); + } finally { + articleHelper.closeContentSession(); + } + + return "success"; + } + + /** + * + * @param request + * @param response + * @return + */ + public static String removeRepositoryNode(HttpServletRequest request, HttpServletResponse response) { + GenericValue userLogin = (GenericValue) request.getSession().getAttribute("userLogin"); + + String contentPath = request.getParameter("path"); + + JcrDataHelper helper = new JackrabbitArticleHelper(userLogin); + helper.removeContentObject(contentPath); + + return "success"; + } + + /** + * + * @param request + * @param response + * @return + */ + public static String uploadFileData(HttpServletRequest request, HttpServletResponse response) { + GenericValue userLogin = (GenericValue) request.getSession().getAttribute("userLogin"); + ServletFileUpload fu = new ServletFileUpload(new DiskFileItemFactory(10240, FileUtil.getFile("runtime/tmp"))); + List list = null; + Map passedParams = FastMap.newInstance(); + + try { + list = UtilGenerics.checkList(fu.parseRequest(request)); + } catch (FileUploadException e) { + Debug.logError(e, module); + request.setAttribute("_ERROR_MESSAGE_", e.toString()); + return "error"; + } + + byte[] file = null; + for (FileItem fi : list) { + String fieldName = fi.getFieldName(); + + if (fi.isFormField()) { + String fieldStr = fi.getString(); + passedParams.put(fieldName, fieldStr); + } else if (fieldName.startsWith("fileData")) { + passedParams.put("completeFileName", fi.getName()); + file = fi.get(); + } + } + + JcrFileHelper fileHelper = new JackrabbitFileHelper(userLogin); + + try { + + fileHelper.storeContentInRepository(file, passedParams.get("completeFileName"), passedParams.get("path")); + + } catch (ObjectContentManagerException e) { + Debug.logError(e, module); + request.setAttribute("_ERROR_MESSAGE_", e.toString()); + } catch (ItemExistsException e) { + Debug.logError(e, module); + request.setAttribute("_ERROR_MESSAGE_", e.toString()); + } catch (RepositoryException e) { + Debug.logError(e, module); + request.setAttribute("_ERROR_MESSAGE_", e.toString()); + } finally { + fileHelper.closeContentSession(); + } + + return "success"; + } + + /** + * Creates the FILE Tree as JSON Object + * + * @param request + * @param response + * @return + */ + public static String getRepositoryFileTree(HttpServletRequest request, HttpServletResponse response) { + GenericValue userLogin = (GenericValue) request.getSession().getAttribute("userLogin"); + + JcrRepositoryAccessor repositoryAccess = new JackrabbitRepositoryAccessor(userLogin); + try { + JSONArray fileTree = repositoryAccess.getJsonFileTree(); + request.setAttribute("fileTree", StringUtil.wrapString(fileTree.toString())); + } catch (RepositoryException e) { + Debug.logError(e, module); + request.setAttribute("dataTree", new JSONArray()); + request.setAttribute("_ERROR_MESSAGE_", e.toString()); + return "error"; + } finally { + repositoryAccess.closeAccess(); + } + + return "success"; + } + + /** + * Creates the DATA (TEXT) Tree as JSON Object + * + * @param request + * @param response + * @return + */ + public static String getRepositoryDataTree(HttpServletRequest request, HttpServletResponse response) { + GenericValue userLogin = (GenericValue) request.getSession().getAttribute("userLogin"); + + JackrabbitRepositoryAccessor repositoryAccess = new JackrabbitRepositoryAccessor(userLogin); + try { + JSONArray fileTree = repositoryAccess.getJsonDataTree(); + request.setAttribute("dataTree", StringUtil.wrapString(fileTree.toString())); + } catch (RepositoryException e) { + Debug.logError(e, module); + request.setAttribute("dataTree", new JSONArray()); + request.setAttribute("_ERROR_MESSAGE_", e.toString()); + repositoryAccess.closeAccess(); + return "error"; + } + + List contentList = new ArrayList(); + Map> languageList = FastMap.newInstance(); + Session session = repositoryAccess.getSession(); + Node root; + try { + root = session.getRootNode(); + getContentList(root, contentList); + } catch (RepositoryException e) { + Debug.logError(e, module); + request.setAttribute("_ERROR_MESSAGE_", e.toString()); + repositoryAccess.closeAccess(); + return "error"; + } finally { + } + + try { + for (String path : contentList) { + Node parent = session.getNode(path); + NodeIterator ni = parent.getNodes(); + List language = new ArrayList(); + while (ni.hasNext()) { + Node t = ni.nextNode(); + if (t.hasProperty("localized") && t.getProperty("localized").getBoolean()) { + String l = t.getPath(); + language.add(l.substring(l.lastIndexOf("/") + 1)); + } + } + languageList.put(path, language); + } + } catch (ValueFormatException e) { + Debug.logError(e, module); + } catch (PathNotFoundException e) { + Debug.logError(e, module); + } catch (RepositoryException e) { + Debug.logError(e, module); + } finally { + repositoryAccess.closeAccess(); + } + + request.setAttribute("contentList", contentList); + JSONObject jo = new JSONObject(); + jo.putAll(languageList); + request.setAttribute("languageList", jo); + + return "success"; + } + + public static String getFileFromRepository(HttpServletRequest request, HttpServletResponse response) { + GenericValue userLogin = (GenericValue) request.getSession().getAttribute("userLogin"); + + String contentPath = request.getParameter("path"); + + if (UtilValidate.isEmpty(contentPath)) { + String msg = "A node path is missing, please pass the path to the node which should be read from the repository."; // TODO + Debug.logError(msg, module); + request.setAttribute("_ERROR_MESSAGE_", msg); + return "error"; + } + + JcrFileHelper fileHelper = new JackrabbitFileHelper(userLogin); + JackrabbitHierarchyNode orm = null; + try { + orm = fileHelper.getRepositoryContent(contentPath); + } catch (ClassCastException e1) { + Debug.logError(e1, module); + request.setAttribute("_ERROR_MESSAGE_", e1.getMessage()); + return "error"; + } catch (PathNotFoundException e1) { + Debug.logError(e1, module); + request.setAttribute("_ERROR_MESSAGE_", e1.getMessage()); + return "error"; + } + + if (fileHelper.isFileContent()) { + JackrabbitFile file = (JackrabbitFile) orm; + InputStream fileStream = file.getResource().getData(); + + String fileName = file.getPath(); + if (fileName.indexOf("/") != -1) { + fileName = fileName.substring(fileName.indexOf("/") + 1); + } + + try { + UtilHttp.streamContentToBrowser(response, IOUtils.toByteArray(fileStream), file.getResource().getMimeType(), fileName); + } catch (IOException e) { + Debug.logError(e, module); + request.setAttribute("_ERROR_MESSAGE_", e.getMessage()); + return "error"; + } + } else { + Debug.logWarning("This content is no file content, the content is from the type: " + orm.getClass().getName(), module); + } + return "success"; + } + + public static String getFileInformation(HttpServletRequest request, HttpServletResponse response) { + GenericValue userLogin = (GenericValue) request.getSession().getAttribute("userLogin"); + String contentPath = request.getParameter("path"); + + JcrFileHelper fileHelper = new JackrabbitFileHelper(userLogin); + OfbizRepositoryMapping orm; + try { + orm = fileHelper.getRepositoryContent(contentPath); + } catch (ClassCastException e) { + Debug.logError(e, module); + request.setAttribute("_ERROR_MESSAGE_", e.getMessage()); + return "error"; + } catch (PathNotFoundException e) { + Debug.logError(e, module); + request.setAttribute("_ERROR_MESSAGE_", e.getMessage()); + return "error"; + } + + // Here we can differentiate between a file or folder content + if (fileHelper.isFileContent()) { + JackrabbitFile file = (JackrabbitFile) orm; + request.setAttribute("fileName", file.getPath()); + request.setAttribute("fileLastModified", file.getResource().getLastModified().getTime()); + request.setAttribute("fileMimeType", file.getResource().getMimeType()); + request.setAttribute("fileCreationDate", file.getCreationDate().getTime()); + } else if (fileHelper.isFolderContent()) { + JackrabbitFolder folder = (JackrabbitFolder) orm; + request.setAttribute("fileName", folder.getPath()); + request.setAttribute("fileCreationDate", folder.getCreationDate().getTime()); + } + + return "success"; + } + + public static String queryRepositoryData(HttpServletRequest request, HttpServletResponse response) { + GenericValue userLogin = (GenericValue) request.getSession().getAttribute("userLogin"); + + String searchQuery = request.getParameter("queryData"); + + JcrDataHelper helper = new JackrabbitArticleHelper(userLogin); + + try { + request.setAttribute("queryResult", helper.queryData(searchQuery)); + } catch (RepositoryException e) { + Debug.logError(e, module); + request.setAttribute("_ERROR_MESSAGE_", e.getMessage()); + return "error"; + } + + return "success"; + } + + private static void getContentList(Node startNode, List contentList) throws RepositoryException { + NodeIterator ni = startNode.getNodes(); + while (ni.hasNext()) { + Node tmpNode = ni.nextNode(); + if (tmpNode.getPrimaryNodeType().isNodeType(NodeType.NT_UNSTRUCTURED) && (!tmpNode.hasProperty("localized") || !tmpNode.getProperty("localized").getBoolean())) { + contentList.add(tmpNode.getPath()); + if (tmpNode.hasNodes()) { + getContentList(tmpNode, contentList); + } + } + } + } +} \ No newline at end of file diff --git a/example/src/src.txt b/example/src/src.txt new file mode 100644 index 000000000..b8f9e6cca --- /dev/null +++ b/example/src/src.txt @@ -0,0 +1,20 @@ +##################################################################### +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +##################################################################### + +All source code related to the component. \ No newline at end of file diff --git a/example/testdef/assertdata/TestUserLoginData.xml b/example/testdef/assertdata/TestUserLoginData.xml new file mode 100644 index 000000000..435d3044b --- /dev/null +++ b/example/testdef/assertdata/TestUserLoginData.xml @@ -0,0 +1,26 @@ + + + + + + + + + diff --git a/example/testdef/selenium/NewExample.html b/example/testdef/selenium/NewExample.html new file mode 100644 index 000000000..9b3c72cb2 --- /dev/null +++ b/example/testdef/selenium/NewExample.html @@ -0,0 +1,189 @@ + + + + + + + +NewExample + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NewFeature
open/example/control/setSessionLocale?newLocale=en
open/example/control/logout
typeUSERNAMEadmin
typePASSWORDofbiz
clickAndWait//input[@value='Login']
assertTitleOFBiz: Example: Find Example
open/example/control/FindExample?portalPageId=Example
waitForTextPresentNew Example
clicklink=New Example
waitForElementPresentEditExample_statusId
selectEditExample_statusIdlabel=Defined
typeEditExample_exampleNameNew Example 1
typeEditExample_descriptionThis is a description
typeEditExample_longDescriptionLong description goes here
typeEditExample_commentscomments go here
typeEditExample_exampleSize10
click//button[@class='ui-datepicker-trigger'][1]
click//button[contains(text(),'Now')]
click//button[contains(text(),'Done')]
selectEditExample_anotherTextlabel=Contrived
clickAndWaitsubmitButton
waitForElementPresent//div[@id='search-results']//a[@class='buttontext']
clickAndWait//div[@id='search-results']//a[@class='buttontext']
clickAndWaitlink=Items
typedescriptionItem 1
typeamount100
selectamountUomIdlabel=Weight: Stone (st)
clickAndWait//input[@name='submitButton' and @value='Add']
assertConfirmationDo you confirm ?
clickAndWaitlink=Example
open/example/control/logout
+ + diff --git a/example/testdef/selenium/testSuite.html b/example/testdef/selenium/testSuite.html new file mode 100644 index 000000000..66fe1c4ee --- /dev/null +++ b/example/testdef/selenium/testSuite.html @@ -0,0 +1,32 @@ + + + + + + + Test Suite + + + + + +
Test Suite
new example
+ + diff --git a/example/testdef/tests.xml b/example/testdef/tests.xml new file mode 100644 index 000000000..0f2732074 --- /dev/null +++ b/example/testdef/tests.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + diff --git a/example/webapp/appheader.ftl b/example/webapp/appheader.ftl new file mode 100644 index 000000000..7a31ca1f0 --- /dev/null +++ b/example/webapp/appheader.ftl @@ -0,0 +1,44 @@ +<#-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +<#assign selected = headerItem?default("void")> +
+ +
+
diff --git a/example/webapp/birt/WEB-INF/birt.tld b/example/webapp/birt/WEB-INF/birt.tld new file mode 100644 index 000000000..f00d7e8c4 --- /dev/null +++ b/example/webapp/birt/WEB-INF/birt.tld @@ -0,0 +1,1175 @@ + + + + + 1.0 + 1.2 + BIRT Tag Library + http://www.eclipse.org/birt/taglibs/birt.tld + + This Tag Library makes user develope JSP with BIRT Viewer component easily. + + + + + + + viewer + org.eclipse.birt.report.taglib.ViewerTag + JSP + + The viewer tag is to specify how to import and control BIRT Report Viewer into JSP page. + This tag will use Ajax framework to retrieve report content. + + + + id + true + true + + Specifies the current viewer id. It should be unique. + It can contain number,letter or underline. + + + + + pattern + false + true + + Specifies which servlet pattern to be used to preview report. + Default value is frameset. + ( frameset or run ) + + + + + baseURL + false + true + + Specifies base URL of BIRT viewer. + Default to the current context. + + + + + title + false + true + + Specifies the report title displayed at the top. + + + + + isHostPage + false + true + + Specifies whether the viewer occupies the whole page. + Default to false. + + + + + scrolling + false + true + + Sets the IFrame style "scrolling ". + If isHostPage is true, ignore this attribute. + ( auto | yes | no ) + + + + + position + false + true + + Sets the style "position" of report container. + If isHostPage is true, ignore this attribute. + ( static | absolute | fixed | relative ) + + + + + style + false + true + + Sets the style of report container. + If isHostPage is true, ignore this attribute. + + + + + height + false + true + + Sets the height of report container in pixels. + If isHostPage is true, ignore this attribute. + + + + + width + false + true + + Sets the width of report container in pixels. + If isHostPage is true, ignore this attribute. + + + + + top + false + true + + Sets the top of report container in pixels. + If isHostPage is true, ignore this attribute. + + + + + left + false + true + + Sets the left of report container in pixels. + If isHostPage is true, ignore this attribute. + + + + + frameborder + false + true + + Specifies whether displays the iframe border. + Default to no. + If isHostPage is true, ignore this attribute. + ( Yes | No ) + + + + + reportDesign + false + true + + Specifies the report design file name. + ( Absolute path, relative path or URL ) + + + + + reportDocument + false + true + + Specifies the report document file name. + Noted: only support "file:" URL format. + ( Absolute path, relative path or URL ) + + + + + reportletId + false + true + + Specifies the instance id of reportlet. + The "reportDocument" attribute should be required. + Noted: frameset pattern doesn't support reportlet. + + + + + bookmark + false + true + + Specifies the targeted bookmark name. + + + + + locale + false + true + + Specifies the Locale information. + + + + + timeZone + false + true + + Specifies a time zone id. For example: "America/Los_Angeles" or "GMT+1" or "GMT+01:00". + + + + + svg + false + true + + Specifies whether supports the SVG output format or not. + + + + + format + false + true + + Specifies the output format of report. + + + + + emitterId + false + true + + Specifies the emitter id for the report output. + + + + + pageOverflow + false + true + + Specifies the page overflow setting for the PDF format. + One of the following values: + 0 for "auto", 1 for "actual size", 2 for "fit to page". + + + + + rtl + false + true + + Specifies whether supports rtl page or not. + + + + + pageNum + false + true + + Specifies output page number when render document file. + + + + + pageRange + false + true + + Specifies page range when render document file. + + + + + resourceFolder + false + true + + Specifies the referenced resource folder. + Default value is defined in web.xml. + + + + + forceOverwriteDocument + false + true + + Specifies whether forces to overwrite the generated document. + If allowPageBreak is false,ignore this attribute. + Default value is defined in web.xml. + + + + + showTitle + false + true + + Specifies whether shows the report title. + Default to true. + + + + + showToolBar + false + true + + Specifies whether shows the toolbar. + Default to true. + + + + + showNavigationBar + false + true + + Specifies whether shows the Navigation Bar. + If allowPageBreak is false,ignore this attribute. + Default to true. + + + + + showParameterPage + false + true + + Specifies whether show the parameter dialog or not. + Default to true. + + + + + isReportlet + false + true + + Specifies whether render reportlet by bookmark. + Default to false. + + + + + + + + + + report + org.eclipse.birt.report.taglib.ReportTag + JSP + + The report tag can provide fast report preview without Ajax framework. + The report content can be output to web browser directly. + + + + id + true + true + + Specifies the current viewer id. It should be unique. + It can contain number,letter or underline. + + + + + baseURL + false + true + + Specifies base URL of BIRT viewer. + Default to the current context. + If report container is DIV, ignore this attribute. + + + + + isHostPage + false + true + + Specifies whether the viewer occupies the whole page. + Default to false. + + + + + scrolling + false + true + + Sets the DIV/IFrame style "scrolling ". + If isHostPage is true, ignore this attribute. + ( auto | yes | no ) + + + + + position + false + true + + Sets the style "position" of report container. + If isHostPage is true, ignore this attribute. + ( static | absolute | fixed | relative ) + + + + + style + false + true + + Sets the style of report container. + If isHostPage is true, ignore this attribute. + + + + + height + false + true + + Sets the height of report container in pixels. + If isHostPage is true, ignore this attribute. + + + + + width + false + true + + Sets the width of report container in pixels. + If isHostPage is true, ignore this attribute. + + + + + top + false + true + + Sets the top of report container in pixels. + If isHostPage is true, ignore this attribute. + + + + + left + false + true + + Sets the left of report container in pixels. + If isHostPage is true, ignore this attribute. + + + + + frameborder + false + true + + Specifies whether displays the iframe border. + Available when user IFrame. + Default to no. + ( Yes | No ) + + + + + reportDesign + false + true + + Specifies the report design file name. + ( Absolute path, relative path or URL ) + + + + + reportDocument + false + true + + Specifies the report document file name. + Noted: only support "file:" URL format. + ( Absolute path, relative path or URL ) + + + + + reportletId + false + true + + Specifies the instance id of reportlet. + The "reportDocument" attribute should be required. + + + + + bookmark + false + true + + Specifies the targeted bookmark name. + + + + + locale + false + true + + Specifies the Locale information. + + + + + timeZone + false + true + + Specifies a time zone id. For example: "America/Los_Angeles" or "GMT+1" or "GMT+01:00". + + + + + svg + false + true + + Specifies whether supports the SVG output format or not. + + + + + format + false + true + + Specifies the output format of report. + + + + + emitterId + false + true + + Specifies the emitter id for the report output. + + + + + pageOverflow + false + true + + Specifies the page overflow setting for the PDF format. + One of the following values: + 0 for "auto", 1 for "actual size", 2 for "fit to page". + + + + + rtl + false + true + + Specifies whether supports rtl page or not. + + + + + showParameterPage + false + true + + Specifies whether show the parameter dialog or not. + Default to true. + If report container is DIV, ignore this attribute. + + + + + resourceFolder + false + true + + Specifies the referenced resource folder. + Default value is defined in web.xml. + + + + + reportContainer + false + true + + Specifies iframe or div as report container. + Default to iframe. + ( iframe | div ) + + + + + pageNum + false + true + + Specifies output page number when render document file. + + + + + pageRange + false + true + + Specifies page range when render document file. + + + + + isReportlet + false + true + + Specifies whether render reportlet by bookmark. + Default to false. + + + + + + + + + + param + org.eclipse.birt.report.taglib.ParamTag + JSP + + The param tag specifies the parameters defined in report design file. + + + name + true + true + + Specifies the report parameter name. + + + + pattern + false + true + + Specifies the report parameter pattern format. + + + + value + false + true + + Specifies the report parameter value. If doesn't set, value is null. + + + + displayText + false + true + + Specifies the report parameter display text. + + + + delim + false + true + + Specifies the delimiter for multiple values. + Defaults to pipe "|". + + + + isLocale + false + true + + Specifies whether the report parameter value is a locale/format related string. + + + + + + + + + value + org.eclipse.birt.report.taglib.ParamValueTag + JSP + + The param value tag specifies multiple values for a given param tag. + + + value + false + true + + Specifies the report parameter value. If doesn't set, value is null. + + + + displayText + false + true + + Specifies the report parameter display text. + + + + + + + + + parameterPage + org.eclipse.birt.report.taglib.RequesterTag + JSP + + The parameterPage tag can help developers to display BIRT parameter page or create a user-defined parameter page. + This tag can collect these parameters and submit to BIRT servlet to handle request. + + + + id + true + true + + Specifies the parameter page id.It should be unique. + It can contain number,letter or underline. + + + + + name + false + true + + Specifies the parameter page name. + If attribute 'isCustom' is true, this name should be required and unique. + + + + + isCustom + false + true + + Specifies whether uses the user-defined parameter page. + If false, use the BIRT parameter dialog. + Default to false. + + + + + title + false + true + + Specifies the report title displayed at the top. + + + + + baseURL + false + true + + Specifies base URL of BIRT viewer. + Default to the current context. + + + + + scrolling + false + true + + Sets the DIV/IFrame style "scrolling ". + ( auto | yes | no ) + + + + + position + false + true + + Sets the style "position" of parameter page. + ( static | absolute | fixed | relative ) + + + + + style + false + true + + Sets the style of parameter page. + + + + + height + false + true + + Sets the height of parameter page in pixels. + + + + + width + false + true + + Sets the width of parameter page in pixels. + + + + + top + false + true + + Sets the top of parameter page in pixels. + + + + + left + false + true + + Sets the left of parameter page in pixels. + + + + + frameborder + false + true + + Specifies whether displays the iframe border. + Default to no. + If set "isCustom" to true, ignore this attribute. + ( Yes | No ) + + + + + reportDesign + false + true + + Specifies the report design file name. + ( Absolute path, relative path or URL ) + + + + + reportDocument + false + true + + Specifies the report document file name. + Noted: only support "file:" URL format. + ( Absolute path, relative path or URL ) + + + + + reportletId + false + true + + Specifies the instance id of reportlet. + The "reportDocument" attribute should be required. + Noted: frameset pattern doesn't support reportlet. + + + + + pattern + false + true + + Specifies the servlet pattern for request submit. + BIRT supports three patterns: frameset, run and preview. + Can refer to the user-defined servlet pattern. + Default to frameset. + + + + + target + false + true + + Specifies the target window for request submit. + + + + + bookmark + false + true + + Specifies the targeted bookmark name. + + + + + locale + false + true + + Specifies the Locale information. + + + + + timeZone + false + true + + Specifies a time zone id. For example: "America/Los_Angeles" or "GMT+1" or "GMT+01:00". + + + + + svg + false + true + + Specifies whether supports the SVG output format or not. + + + + + format + false + true + + Specifies the output format of report. + + + + + emitterId + false + true + + Specifies the emitter id for the report output. + + + + + pageOverflow + false + true + + Specifies the page overflow setting for the PDF format. + One of the following values: + 0 for "auto", 1 for "actual size", 2 for "fit to page". + + + + + rtl + false + true + + Specifies whether supports rtl page or not. + + + + + resourceFolder + false + true + + Specifies the referenced resource folder. + Default value is defined in web.xml. + + + + + forceOverwriteDocument + false + true + + Specifies whether forces to overwrite the generated document. + If allowPageBreak is false,ignore this attribute. + Default value is defined in web.xml. + + + + + showTitle + false + true + + Specifies whether shows the report title. + Default to true. + + + + + showToolBar + false + true + + Specifies whether shows the toolbar. + Default to true. + + + + + showNavigationBar + false + true + + Specifies whether shows the Navigation Bar. + If allowPageBreak is false,ignore this attribute. + Default to true. + + + + + isReportlet + false + true + + Specifies whether render reportlet by bookmark. + Default to false. + + + + + + + + + + paramDef + org.eclipse.birt.report.taglib.ParamDefTag + JSP + + The param tag is used to generate html code for defined parameter in ParameterPage tag. + + + id + true + true + + Specifies the id of parameter control.It should be unique. + It can contain number,letter or underline. + + + + name + true + true + + Specifies the report parameter name. + + + + pattern + false + true + + Specifies the report parameter pattern format. + It is used to parse defined parameter value string. + + + + value + false + true + + Specifies the report parameter value. If doesn't set, use default value. + + + + displayText + false + true + + Specifies the report parameter display text. + + + + isLocale + false + true + + Specifies whether the report parameter value is a locale/format related string. + It is used to parse defined parameter value string. + + + + title + false + true + + Specifies the title attribute of parameter control. + + + + cssClass + false + true + + Specifies the css class attribute of parameter control. + + + + style + false + true + + Specifies the parameter control style. + + + + \ No newline at end of file diff --git a/example/webapp/birt/WEB-INF/controller.xml b/example/webapp/birt/WEB-INF/controller.xml new file mode 100644 index 000000000..60c891b60 --- /dev/null +++ b/example/webapp/birt/WEB-INF/controller.xml @@ -0,0 +1,105 @@ + + + + + + + + BIRT Component Site Configuration File + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/example/webapp/birt/WEB-INF/server-config.wsdd b/example/webapp/birt/WEB-INF/server-config.wsdd new file mode 100644 index 000000000..768e7905b --- /dev/null +++ b/example/webapp/birt/WEB-INF/server-config.wsdd @@ -0,0 +1,970 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +http://schemas.eclipse.org/birt + + + + + + + http://xml.apache.org/axis/wsdd/ + + + + + + + + + + + + + + + + + + + + diff --git a/example/webapp/birt/WEB-INF/web.xml b/example/webapp/birt/WEB-INF/web.xml new file mode 100644 index 000000000..0705c7e7d --- /dev/null +++ b/example/webapp/birt/WEB-INF/web.xml @@ -0,0 +1,292 @@ + + + + + + Open For Business - BIRT Component + BIRT Component of the Open For Business Project + + + localDispatcherNamebirt + A unique name used to identify/recognize the local dispatcher for the Service Engine + + + entityDelegatorNamedefault + The Name of the Entity Delegator to use, defined in entityengine.xml + + + mainDecoratorLocation + component://example/widget/example/CommonScreens.xml + The location of the main-decorator screen to use for this webapp; referred to as a context variable in screen def XML files. + + + widgetVerbose + false + Enable widget boundary comments. See org.ofbiz.widget.ModelWidget.widgetBoundaryCommentsEnabled(). + + + compressHTML + false + Remove unnecessary whitespace from HTML output. + + + + + BIRT_VIEWER_LOCALE + en-US + + + + + BIRT_VIEWER_TIMEZONE + + + + + + BIRT_VIEWER_WORKING_FOLDER + ${ofbiz.home}/runtime/tempfiles + + + + + BIRT_VIEWER_DOCUMENT_FOLDER + ${ofbiz.home}/runtime/tempfiles/documents + + + + + WORKING_FOLDER_ACCESS_ONLY + true + + + + + BIRT_VIEWER_IMAGE_DIR + ${ofbiz.home}/runtime/tempfiles/images + + + + + BIRT_VIEWER_LOG_DIR + ${ofbiz.home}/runtime/logs + + + + + BIRT_VIEWER_LOG_LEVEL + WARNING + + + + + BIRT_VIEWER_SCRIPTLIB_DIR + ${ofbiz.home}/framework/birt/lib/scriptlib + + + + + BIRT_RESOURCE_PATH + ${ofbiz.home}/runtime/tempfiles + + + + + BIRT_VIEWER_MAX_ROWS + + + + + + BIRT_VIEWER_MAX_CUBE_ROWLEVELS + + + + BIRT_VIEWER_MAX_CUBE_COLUMNLEVELS + + + + + + BIRT_VIEWER_CUBE_MEMORY_SIZE + + + + + + BIRT_VIEWER_CONFIG_FILE + WEB-INF/viewer.properties + + + + + BIRT_VIEWER_PRINT_SERVERSIDE + ON + + + + + HTML_ENABLE_AGENTSTYLE_ENGINE + true + + + + + BIRT_FILENAME_GENERATOR_CLASS + org.eclipse.birt.report.utility.filename.DefaultFilenameGenerator + + + + ContextFilter + ContextFilter + org.ofbiz.webapp.control.ContextFilter + disableContextSecurityN + + allowedPaths + /error:/control:/select:/index.html:/index.jsp:/default.html:/default.jsp:/images:/includes/maincss.css:/frameset:/run:/preview:/download:/parameter:/document:/output:/extract:/webcontent:/CancelTask.jsp + + errorCode403 + redirectPath/control/main + + + + ViewerFilter + org.eclipse.birt.report.filter.ViewerFilter + + + ContextFilter/* + + ViewerFilter + ViewerServlet + + + ViewerFilter + EngineServlet + + + org.ofbiz.webapp.control.ControlEventListener + org.ofbiz.webapp.control.LoginEventListener + + + + + + org.eclipse.birt.report.listener.ViewerHttpSessionListener + + + + ControlServlet + ControlServlet + Main Control Servlet + org.ofbiz.webapp.control.ControlServlet + 1 + + + + + + EngineServlet + org.ofbiz.birt.report.servlet.BirtEngineServlet + + ControlServlet/control/* + + + + + EngineServlet + /preview + + + + EngineServlet + /download + + + + EngineServlet + /parameter + + + + EngineServlet + /document + + + + EngineServlet + /output + + + + EngineServlet + /extract + + + 60 + + + index.jsp + index.html + index.htm + + diff --git a/example/webapp/birt/birt/chartReport.ftl b/example/webapp/birt/birt/chartReport.ftl new file mode 100644 index 000000000..08e7b5f6e --- /dev/null +++ b/example/webapp/birt/birt/chartReport.ftl @@ -0,0 +1,30 @@ +<#-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +<#assign birt = JspTaglibs["/WEB-INF/birt.tld"]/> + +<@birt.report id="birtReport" + reportDesign="component://example/webapp/birt/report/chart.rptdesign" + baseURL="/birt" + height="700" + width="900" + format="html" + isHostPage="false" + pageNum="2"> + \ No newline at end of file diff --git a/example/webapp/birt/birt/report.ftl b/example/webapp/birt/birt/report.ftl new file mode 100644 index 000000000..ff22cb98d --- /dev/null +++ b/example/webapp/birt/birt/report.ftl @@ -0,0 +1,30 @@ +<#-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +<#assign birt = JspTaglibs["/WEB-INF/birt.tld"]/> + +<@birt.report id="birtReport" + reportDesign="component://example/webapp/birt/report/example.rptdesign" + baseURL="/birt" + height="700" + width="900" + format="html" + isHostPage="false" + pageNum="2"> + \ No newline at end of file diff --git a/example/webapp/birt/error/error.jsp b/example/webapp/birt/error/error.jsp new file mode 100644 index 000000000..522a2387d --- /dev/null +++ b/example/webapp/birt/error/error.jsp @@ -0,0 +1,52 @@ +<%-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--%> +<%@ page import="org.ofbiz.base.util.*" %> + + +Open For Business Message + + + +<% String errorMsg = (String) request.getAttribute("_ERROR_MESSAGE_"); %> + + +
+
+ + + + +
+ + + + + + + +
+
:ERROR MESSAGE:
+
+
<%=UtilFormatOut.replaceString(errorMsg, "\n", "
")%>
+
+
+
+
+ + diff --git a/example/webapp/birt/index.jsp b/example/webapp/birt/index.jsp new file mode 100644 index 000000000..9d916ea0e --- /dev/null +++ b/example/webapp/birt/index.jsp @@ -0,0 +1,19 @@ +<%-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--%> +<%response.sendRedirect("control/main");%> diff --git a/example/webapp/birt/report/chart.rptdesign b/example/webapp/birt/report/chart.rptdesign new file mode 100644 index 000000000..97c288410 --- /dev/null +++ b/example/webapp/birt/report/chart.rptdesign @@ -0,0 +1,2185 @@ + + + + Eclipse BIRT Designer Version 2.6.0.v20100531 Build <2.6.0.v20100609-1613> + in + + /templates/blank_report.gif + ltr + + + + + + + + 1 + exampleTypeId + string + + + 2 + total + string + + + + + exampleTypeId + exampleTypeId + + + total + total + + + + + + 1 + exampleTypeId + string + + + 2 + total + string + + + + OFBiz + + + + + + + + + + + + + + html + new Date()]]> + + + + + + + Example + + + exampleTypeId + exampleTypeId + dataSetRow["exampleTypeId"] + string + + + total + total + dataSetRow["total"] + string + + + + +
+ + + + + + + + +
+ + + + + nowrap + exampleTypeId + + + + + nowrap + total + + + + +
+ + + + +
+
+ + + 2.5.1 + Bar Chart + Side-by-side + + + + 0.0 + 0.0 + 0.0 + 0.0 + + + 3.0 + 3.0 + 3.0 + 3.0 + + -1 + -1 + -1 + -1 + + + 1 + + 255 + 0 + 0 + 0 + + false + + true + + + + + 0.0 + 0.0 + 0.0 + 0.0 + + + 3.0 + 3.0 + 3.0 + 3.0 + + -1 + -1 + -1 + -1 + + + 1 + + 255 + 0 + 0 + 0 + + false + + true + 5 + 5 + + + + 0 + + 255 + 0 + 0 + 0 + + false + + + 0.0 + 0.0 + 0.0 + 0.0 + + + + + + 0.0 + 0.0 + 0.0 + 0.0 + + + 3.0 + 3.0 + 3.0 + 3.0 + + -1 + -1 + -1 + -1 + + + 1 + + 255 + 0 + 0 + 0 + + false + + false + + + + 0 + + 255 + 0 + 0 + 0 + + false + + + 2.0 + 2.0 + 2.0 + 2.0 + + + + + + + + + Vertical + Top_Bottom + + + 1 + + 255 + 0 + 0 + 0 + + true + + Right + Series + + <Caption> + <Value></Value> + <Font> + <Alignment/> + </Font> + </Caption> + <Background xsi:type="attribute:ColorDefinition"> + <Transparency>0</Transparency> + <Red>255</Red> + <Green>255</Green> + <Blue>255</Blue> + </Background> + <Outline> + <Style>Solid</Style> + <Thickness>1</Thickness> + <Color> + <Transparency>255</Transparency> + <Red>0</Red> + <Green>0</Green> + <Blue>0</Blue> + </Color> + <Visible>false</Visible> + </Outline> + <Insets> + <Top>0.0</Top> + <Left>2.0</Left> + <Bottom>0.0</Bottom> + <Right>3.0</Right> + </Insets> + <Visible>false</Visible> + + Above + + + 0.0 + 0.0 + 212.0 + 130.0 + + + 3.0 + 3.0 + 3.0 + 3.0 + + -1 + -1 + -1 + -1 + + + 1 + + 255 + 0 + 0 + 0 + + false + + true + + Two_Dimensional + Points + 10.0 + + enable.area.alt + false + + + + A, B, C + + + 5,4,12 + 0 + + + + + + This chart contains no data. + + + Center + Center + + + + + 64 + 127 + 127 + 127 + + + + 128 + 127 + 127 + 127 + + true + + + 10.0 + 10.0 + 10.0 + 10.0 + + false + + + Text + + <Caption> + <Value>X-Axis Title</Value> + <Font> + <Size>14.0</Size> + <Bold>true</Bold> + <Alignment> + <horizontalAlignment>Center</horizontalAlignment> + <verticalAlignment>Center</verticalAlignment> + </Alignment> + </Font> + </Caption> + <Background xsi:type="attribute:ColorDefinition"> + <Transparency>0</Transparency> + <Red>255</Red> + <Green>255</Green> + <Blue>255</Blue> + </Background> + <Outline> + <Style>Solid</Style> + <Thickness>1</Thickness> + <Color> + <Transparency>255</Transparency> + <Red>0</Red> + <Green>0</Green> + <Blue>0</Blue> + </Color> + </Outline> + <Insets> + <Top>0.0</Top> + <Left>2.0</Left> + <Bottom>0.0</Bottom> + <Right>3.0</Right> + </Insets> + <Visible>false</Visible> + + Below + + Linear + + <Caption> + <Value>Y-Axis Title</Value> + <Font> + <Size>14.0</Size> + <Bold>true</Bold> + <Alignment> + <horizontalAlignment>Center</horizontalAlignment> + <verticalAlignment>Center</verticalAlignment> + </Alignment> + <Rotation>90.0</Rotation> + </Font> + </Caption> + <Background xsi:type="attribute:ColorDefinition"> + <Transparency>0</Transparency> + <Red>255</Red> + <Green>255</Green> + <Blue>255</Blue> + </Background> + <Outline> + <Style>Solid</Style> + <Thickness>1</Thickness> + <Color> + <Transparency>255</Transparency> + <Red>0</Red> + <Green>0</Green> + <Blue>0</Blue> + </Color> + </Outline> + <Insets> + <Top>0.0</Top> + <Left>2.0</Left> + <Bottom>0.0</Bottom> + <Right>3.0</Right> + </Insets> + <Visible>false</Visible> + + Left + + + + + + + 255 + 80 + 166 + 218 + + + 255 + 242 + 88 + 106 + + + 255 + 232 + 172 + 57 + + + 255 + 128 + 255 + 128 + + + 255 + 64 + 128 + 128 + + + 255 + 128 + 128 + 192 + + + 255 + 170 + 85 + 85 + + + 255 + 128 + 128 + 0 + + + 255 + 192 + 192 + 192 + + + 255 + 255 + 255 + 128 + + + 255 + 128 + 192 + 128 + + + 255 + 7 + 146 + 94 + + + 255 + 0 + 128 + 255 + + + 255 + 255 + 128 + 192 + + + 255 + 0 + 255 + 255 + + + 255 + 255 + 128 + 128 + + + 255 + 0 + 128 + 192 + + + 255 + 128 + 128 + 192 + + + 255 + 255 + 0 + 255 + + + 255 + 128 + 64 + 64 + + + 255 + 255 + 128 + 64 + + + 255 + 80 + 240 + 120 + + + 255 + 0 + 64 + 128 + + + 255 + 128 + 0 + 64 + + + 255 + 255 + 0 + 128 + + + 255 + 128 + 128 + 64 + + + 255 + 128 + 128 + 128 + + + 255 + 255 + 128 + 255 + + + 255 + 0 + 64 + 0 + + + 255 + 0 + 0 + 0 + + + 255 + 255 + 255 + 255 + + + 255 + 255 + 128 + 0 + + + + true + + + row["total"] + + Text + Sum + + + Series 1 + + + Orthogonal_Value + + , + + Outside + false + Rectangle + + + Text + Sum + + + Vertical + + + 1 + true + + + Left + + + + 1 + + 255 + 196 + 196 + 196 + + false + + Across + + + 1 + + 255 + 196 + 196 + 196 + + true + + + + + + 1 + + 255 + 225 + 225 + 225 + + false + + Across + + + 1 + + 255 + 225 + 225 + 225 + + false + + + + 5 + + + Min + + 0.0 + + + true + false + + + + + + + + 255 + 80 + 166 + 218 + + + 255 + 242 + 88 + 106 + + + 255 + 232 + 172 + 57 + + + 255 + 128 + 255 + 128 + + + 255 + 64 + 128 + 128 + + + 255 + 128 + 128 + 192 + + + 255 + 170 + 85 + 85 + + + 255 + 128 + 128 + 0 + + + 255 + 192 + 192 + 192 + + + 255 + 255 + 255 + 128 + + + 255 + 128 + 192 + 128 + + + 255 + 7 + 146 + 94 + + + 255 + 0 + 128 + 255 + + + 255 + 255 + 128 + 192 + + + 255 + 0 + 255 + 255 + + + 255 + 255 + 128 + 128 + + + 255 + 0 + 128 + 192 + + + 255 + 128 + 128 + 192 + + + 255 + 255 + 0 + 255 + + + 255 + 128 + 64 + 64 + + + 255 + 255 + 128 + 64 + + + 255 + 80 + 240 + 120 + + + 255 + 0 + 64 + 128 + + + 255 + 128 + 0 + 64 + + + 255 + 255 + 0 + 128 + + + 255 + 128 + 128 + 64 + + + 255 + 128 + 128 + 128 + + + 255 + 255 + 128 + 255 + + + 255 + 0 + 64 + 0 + + + 255 + 0 + 0 + 0 + + + 255 + 255 + 255 + 255 + + + 255 + 255 + 128 + 0 + + + + true + + + row["exampleTypeId"] + + + + + Orthogonal_Value + + , + + Outside + false + + + true + Text + Sum + + + Horizontal + + + 1 + true + + + Below + + + + 1 + + 255 + 196 + 196 + 196 + + false + + Across + + + 1 + + 255 + 196 + 196 + 196 + + true + + + + + + 1 + + 255 + 225 + 225 + 225 + + false + + Across + + + 1 + + 255 + 225 + 225 + 225 + + false + + + + 5 + + + Min + + 0.0 + + + true + true + false + + Vertical + 50.0 + + +]]> + SVG + true + Example + 130pt + 212pt + + + exampleTypeId + dataSetRow["exampleTypeId"] + string + + + total + dataSetRow["total"] + string + + + + + + 2.5.1 + Pie Chart + Standard + + + + 0.0 + 0.0 + 0.0 + 0.0 + + + 3.0 + 3.0 + 3.0 + 3.0 + + -1 + -1 + -1 + -1 + + + 1 + + 255 + 0 + 0 + 0 + + false + + true + + + + + 0.0 + 0.0 + 0.0 + 0.0 + + + 3.0 + 3.0 + 3.0 + 3.0 + + -1 + -1 + -1 + -1 + + + 1 + + 255 + 0 + 0 + 0 + + false + + true + 5 + 5 + + + + 0 + + 255 + 0 + 0 + 0 + + false + + + 0.0 + 0.0 + 0.0 + 0.0 + + + + + + 0.0 + 0.0 + 0.0 + 0.0 + + + 3.0 + 3.0 + 3.0 + 3.0 + + -1 + -1 + -1 + -1 + + + 1 + + 255 + 0 + 0 + 0 + + false + + true + + + + 0 + + 255 + 0 + 0 + 0 + + false + + + 2.0 + 2.0 + 2.0 + 2.0 + + + + + + + + + Vertical + Top_Bottom + + + 1 + + 255 + 0 + 0 + 0 + + true + + Right + Categories + + <Caption> + <Value></Value> + <Font> + <Alignment/> + </Font> + </Caption> + <Background xsi:type="attribute:ColorDefinition"> + <Transparency>0</Transparency> + <Red>255</Red> + <Green>255</Green> + <Blue>255</Blue> + </Background> + <Outline> + <Style>Solid</Style> + <Thickness>1</Thickness> + <Color> + <Transparency>255</Transparency> + <Red>0</Red> + <Green>0</Green> + <Blue>0</Blue> + </Color> + <Visible>false</Visible> + </Outline> + <Insets> + <Top>0.0</Top> + <Left>2.0</Left> + <Bottom>0.0</Bottom> + <Right>3.0</Right> + </Insets> + <Visible>false</Visible> + + Above + + + 0.0 + 0.0 + 212.0 + 130.0 + + + 3.0 + 3.0 + 3.0 + 3.0 + + -1 + -1 + -1 + -1 + + + 1 + + 255 + 0 + 0 + 0 + + false + + true + + Two_Dimensional + Points + 10.0 + 0 + + enable.area.alt + false + + + + 'A','B','C','D','E' + + + 6,4,12,8,10 + 0 + + + + true + None + + + + This chart contains no data. + + + Center + Center + + + + + 64 + 127 + 127 + 127 + + + + 128 + 127 + 127 + 127 + + true + + + 10.0 + 10.0 + 10.0 + 10.0 + + false + + + + + + + + 255 + 80 + 166 + 218 + + + 255 + 242 + 88 + 106 + + + 255 + 232 + 172 + 57 + + + 255 + 128 + 255 + 128 + + + 255 + 64 + 128 + 128 + + + 255 + 128 + 128 + 192 + + + 255 + 170 + 85 + 85 + + + 255 + 128 + 128 + 0 + + + 255 + 192 + 192 + 192 + + + 255 + 255 + 255 + 128 + + + 255 + 128 + 192 + 128 + + + 255 + 7 + 146 + 94 + + + 255 + 0 + 128 + 255 + + + 255 + 255 + 128 + 192 + + + 255 + 0 + 255 + 255 + + + 255 + 255 + 128 + 128 + + + 255 + 0 + 128 + 192 + + + 255 + 128 + 128 + 192 + + + 255 + 255 + 0 + 255 + + + 255 + 128 + 64 + 64 + + + 255 + 255 + 128 + 64 + + + 255 + 80 + 240 + 120 + + + 255 + 0 + 64 + 128 + + + 255 + 128 + 0 + 64 + + + 255 + 255 + 0 + 128 + + + 255 + 128 + 128 + 64 + + + 255 + 128 + 128 + 128 + + + 255 + 255 + 128 + 255 + + + 255 + 0 + 64 + 0 + + + 255 + 0 + 0 + 0 + + + 255 + 255 + 255 + 255 + + + 255 + 255 + 128 + 0 + + + + + + + + + 255 + 80 + 166 + 218 + + + 255 + 242 + 88 + 106 + + + 255 + 232 + 172 + 57 + + + 255 + 128 + 255 + 128 + + + 255 + 64 + 128 + 128 + + + 255 + 128 + 128 + 192 + + + 255 + 170 + 85 + 85 + + + 255 + 128 + 128 + 0 + + + 255 + 192 + 192 + 192 + + + 255 + 255 + 255 + 128 + + + 255 + 128 + 192 + 128 + + + 255 + 7 + 146 + 94 + + + 255 + 0 + 128 + 255 + + + 255 + 255 + 128 + 192 + + + 255 + 0 + 255 + 255 + + + 255 + 255 + 128 + 128 + + + 255 + 0 + 128 + 192 + + + 255 + 128 + 128 + 192 + + + 255 + 255 + 0 + 255 + + + 255 + 128 + 64 + 64 + + + 255 + 255 + 128 + 64 + + + 255 + 80 + 240 + 120 + + + 255 + 0 + 64 + 128 + + + 255 + 128 + 0 + 64 + + + 255 + 255 + 0 + 128 + + + 255 + 128 + 128 + 64 + + + 255 + 128 + 128 + 128 + + + 255 + 255 + 128 + 255 + + + 255 + 0 + 64 + 0 + + + 255 + 0 + 0 + 0 + + + 255 + 255 + 255 + 255 + + + 255 + 255 + 128 + 0 + + + + true + + + row["total"] + + Text + Sum + + + + + + Orthogonal_Value + + , + + Outside + false + 0 + + <Caption> + <Value></Value> + <Font> + <Size>16.0</Size> + <Bold>true</Bold> + <Alignment/> + </Font> + </Caption> + <Background xsi:type="attribute:ColorDefinition"> + <Transparency>0</Transparency> + <Red>255</Red> + <Green>255</Green> + <Blue>255</Blue> + </Background> + <Outline> + <Style>Solid</Style> + <Thickness>1</Thickness> + <Color> + <Transparency>255</Transparency> + <Red>0</Red> + <Green>0</Green> + <Blue>0</Blue> + </Color> + </Outline> + <Insets> + <Top>0.0</Top> + <Left>2.0</Left> + <Bottom>0.0</Bottom> + <Right>3.0</Right> + </Insets> + <Visible>true</Visible> + + Below + + + 1 + true + + Fixed_Length + 10.0 + + + Text + Sum + + + + true + + + row["exampleTypeId"] + + + + + Orthogonal_Value + + , + + Outside + false + + + true + Text + Sum + + + +]]> + SVG + true + Example + 130pt + 212pt + + + exampleTypeId + dataSetRow["exampleTypeId"] + string + + + total + dataSetRow["total"] + string + + + + +
diff --git a/example/webapp/birt/report/example.rptdesign b/example/webapp/birt/report/example.rptdesign new file mode 100644 index 000000000..418b992a3 --- /dev/null +++ b/example/webapp/birt/report/example.rptdesign @@ -0,0 +1,230 @@ + + + + Eclipse BIRT Designer Version 2.6.0.v20100531 Build <2.6.0.v20100609-1613> + in + + /templates/blank_report.gif + ltr + + + + + + + + 0 + exampleId + string + + + 1 + exampleTypeId + string + + + 2 + exampleName + string + + + + + exampleId + exampleId + + + exampleTypeId + exampleTypeId + + + exampleName + exampleName + + + + + + 1 + exampleId + string + + + 2 + exampleTypeId + string + + + 3 + exampleName + string + + + + OFBiz + + + + + + + + + + + + + + html + new Date()]]> + + + + + + + Example + + + exampleId + exampleId + dataSetRow["exampleId"] + string + + + exampleTypeId + exampleTypeId + dataSetRow["exampleTypeId"] + string + + + exampleName + exampleName + dataSetRow["exampleName"] + string + + + + + +
+ + #BFBFBF + bold + center + + + + + + + + + + +
+ + + + + exampleId + + + + + exampleTypeId + + + + + exampleName + + + + +
+ + + + + +
+
+ +
diff --git a/example/webapp/example/WEB-INF/actions/includes/FindExampleFeatures.groovy b/example/webapp/example/WEB-INF/actions/includes/FindExampleFeatures.groovy new file mode 100644 index 000000000..b324e2735 --- /dev/null +++ b/example/webapp/example/WEB-INF/actions/includes/FindExampleFeatures.groovy @@ -0,0 +1,44 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import java.util.TreeSet; +import org.ofbiz.entity.condition.EntityCondition; +import org.ofbiz.entity.condition.EntityConditionList; +import org.ofbiz.entity.condition.EntityExpr; +import org.ofbiz.entity.condition.EntityFieldValue; +import org.ofbiz.entity.condition.EntityFunction; +import org.ofbiz.entity.condition.EntityOperator; + +delegator = request.getAttribute("delegator"); + +andExprs = []; +fieldValue = request.getParameter("exampleFeatureId"); +if (fieldValue) { + andExprs.add(EntityCondition.makeCondition(EntityFunction.UPPER(EntityFieldValue.makeFieldValue("exampleFeatureId")), + EntityOperator.LIKE, "%" + fieldValue.toUpperCase() + "%")); +} + +autocompleteOptions = []; +if (andExprs) { + entityConditionList = EntityCondition.makeCondition(andExprs, EntityOperator.AND); + autocompleteOptions = delegator.findList("ExampleFeature", entityConditionList, ['exampleFeatureId', 'description'] as Set, ['-exampleFeatureId'], null, false); + //context.autocompleteOptions = autocompleteOptions; + request.setAttribute("autocompleteOptions", autocompleteOptions); +} +return "success"; diff --git a/example/webapp/example/WEB-INF/actions/includes/PrepareLocalesForDropDown.groovy b/example/webapp/example/WEB-INF/actions/includes/PrepareLocalesForDropDown.groovy new file mode 100644 index 000000000..b7d9d8039 --- /dev/null +++ b/example/webapp/example/WEB-INF/actions/includes/PrepareLocalesForDropDown.groovy @@ -0,0 +1,22 @@ +/* +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +*/ + +def localeMap = [] +org.ofbiz.base.util.UtilMisc.availableLocales().each { localeMap.add(localeId:it.toString()) }; +parameters.localeList = localeMap; \ No newline at end of file diff --git a/example/webapp/example/WEB-INF/birt.tld b/example/webapp/example/WEB-INF/birt.tld new file mode 100644 index 000000000..f00d7e8c4 --- /dev/null +++ b/example/webapp/example/WEB-INF/birt.tld @@ -0,0 +1,1175 @@ + + + + + 1.0 + 1.2 + BIRT Tag Library + http://www.eclipse.org/birt/taglibs/birt.tld + + This Tag Library makes user develope JSP with BIRT Viewer component easily. + + + + + + + viewer + org.eclipse.birt.report.taglib.ViewerTag + JSP + + The viewer tag is to specify how to import and control BIRT Report Viewer into JSP page. + This tag will use Ajax framework to retrieve report content. + + + + id + true + true + + Specifies the current viewer id. It should be unique. + It can contain number,letter or underline. + + + + + pattern + false + true + + Specifies which servlet pattern to be used to preview report. + Default value is frameset. + ( frameset or run ) + + + + + baseURL + false + true + + Specifies base URL of BIRT viewer. + Default to the current context. + + + + + title + false + true + + Specifies the report title displayed at the top. + + + + + isHostPage + false + true + + Specifies whether the viewer occupies the whole page. + Default to false. + + + + + scrolling + false + true + + Sets the IFrame style "scrolling ". + If isHostPage is true, ignore this attribute. + ( auto | yes | no ) + + + + + position + false + true + + Sets the style "position" of report container. + If isHostPage is true, ignore this attribute. + ( static | absolute | fixed | relative ) + + + + + style + false + true + + Sets the style of report container. + If isHostPage is true, ignore this attribute. + + + + + height + false + true + + Sets the height of report container in pixels. + If isHostPage is true, ignore this attribute. + + + + + width + false + true + + Sets the width of report container in pixels. + If isHostPage is true, ignore this attribute. + + + + + top + false + true + + Sets the top of report container in pixels. + If isHostPage is true, ignore this attribute. + + + + + left + false + true + + Sets the left of report container in pixels. + If isHostPage is true, ignore this attribute. + + + + + frameborder + false + true + + Specifies whether displays the iframe border. + Default to no. + If isHostPage is true, ignore this attribute. + ( Yes | No ) + + + + + reportDesign + false + true + + Specifies the report design file name. + ( Absolute path, relative path or URL ) + + + + + reportDocument + false + true + + Specifies the report document file name. + Noted: only support "file:" URL format. + ( Absolute path, relative path or URL ) + + + + + reportletId + false + true + + Specifies the instance id of reportlet. + The "reportDocument" attribute should be required. + Noted: frameset pattern doesn't support reportlet. + + + + + bookmark + false + true + + Specifies the targeted bookmark name. + + + + + locale + false + true + + Specifies the Locale information. + + + + + timeZone + false + true + + Specifies a time zone id. For example: "America/Los_Angeles" or "GMT+1" or "GMT+01:00". + + + + + svg + false + true + + Specifies whether supports the SVG output format or not. + + + + + format + false + true + + Specifies the output format of report. + + + + + emitterId + false + true + + Specifies the emitter id for the report output. + + + + + pageOverflow + false + true + + Specifies the page overflow setting for the PDF format. + One of the following values: + 0 for "auto", 1 for "actual size", 2 for "fit to page". + + + + + rtl + false + true + + Specifies whether supports rtl page or not. + + + + + pageNum + false + true + + Specifies output page number when render document file. + + + + + pageRange + false + true + + Specifies page range when render document file. + + + + + resourceFolder + false + true + + Specifies the referenced resource folder. + Default value is defined in web.xml. + + + + + forceOverwriteDocument + false + true + + Specifies whether forces to overwrite the generated document. + If allowPageBreak is false,ignore this attribute. + Default value is defined in web.xml. + + + + + showTitle + false + true + + Specifies whether shows the report title. + Default to true. + + + + + showToolBar + false + true + + Specifies whether shows the toolbar. + Default to true. + + + + + showNavigationBar + false + true + + Specifies whether shows the Navigation Bar. + If allowPageBreak is false,ignore this attribute. + Default to true. + + + + + showParameterPage + false + true + + Specifies whether show the parameter dialog or not. + Default to true. + + + + + isReportlet + false + true + + Specifies whether render reportlet by bookmark. + Default to false. + + + + + + + + + + report + org.eclipse.birt.report.taglib.ReportTag + JSP + + The report tag can provide fast report preview without Ajax framework. + The report content can be output to web browser directly. + + + + id + true + true + + Specifies the current viewer id. It should be unique. + It can contain number,letter or underline. + + + + + baseURL + false + true + + Specifies base URL of BIRT viewer. + Default to the current context. + If report container is DIV, ignore this attribute. + + + + + isHostPage + false + true + + Specifies whether the viewer occupies the whole page. + Default to false. + + + + + scrolling + false + true + + Sets the DIV/IFrame style "scrolling ". + If isHostPage is true, ignore this attribute. + ( auto | yes | no ) + + + + + position + false + true + + Sets the style "position" of report container. + If isHostPage is true, ignore this attribute. + ( static | absolute | fixed | relative ) + + + + + style + false + true + + Sets the style of report container. + If isHostPage is true, ignore this attribute. + + + + + height + false + true + + Sets the height of report container in pixels. + If isHostPage is true, ignore this attribute. + + + + + width + false + true + + Sets the width of report container in pixels. + If isHostPage is true, ignore this attribute. + + + + + top + false + true + + Sets the top of report container in pixels. + If isHostPage is true, ignore this attribute. + + + + + left + false + true + + Sets the left of report container in pixels. + If isHostPage is true, ignore this attribute. + + + + + frameborder + false + true + + Specifies whether displays the iframe border. + Available when user IFrame. + Default to no. + ( Yes | No ) + + + + + reportDesign + false + true + + Specifies the report design file name. + ( Absolute path, relative path or URL ) + + + + + reportDocument + false + true + + Specifies the report document file name. + Noted: only support "file:" URL format. + ( Absolute path, relative path or URL ) + + + + + reportletId + false + true + + Specifies the instance id of reportlet. + The "reportDocument" attribute should be required. + + + + + bookmark + false + true + + Specifies the targeted bookmark name. + + + + + locale + false + true + + Specifies the Locale information. + + + + + timeZone + false + true + + Specifies a time zone id. For example: "America/Los_Angeles" or "GMT+1" or "GMT+01:00". + + + + + svg + false + true + + Specifies whether supports the SVG output format or not. + + + + + format + false + true + + Specifies the output format of report. + + + + + emitterId + false + true + + Specifies the emitter id for the report output. + + + + + pageOverflow + false + true + + Specifies the page overflow setting for the PDF format. + One of the following values: + 0 for "auto", 1 for "actual size", 2 for "fit to page". + + + + + rtl + false + true + + Specifies whether supports rtl page or not. + + + + + showParameterPage + false + true + + Specifies whether show the parameter dialog or not. + Default to true. + If report container is DIV, ignore this attribute. + + + + + resourceFolder + false + true + + Specifies the referenced resource folder. + Default value is defined in web.xml. + + + + + reportContainer + false + true + + Specifies iframe or div as report container. + Default to iframe. + ( iframe | div ) + + + + + pageNum + false + true + + Specifies output page number when render document file. + + + + + pageRange + false + true + + Specifies page range when render document file. + + + + + isReportlet + false + true + + Specifies whether render reportlet by bookmark. + Default to false. + + + + + + + + + + param + org.eclipse.birt.report.taglib.ParamTag + JSP + + The param tag specifies the parameters defined in report design file. + + + name + true + true + + Specifies the report parameter name. + + + + pattern + false + true + + Specifies the report parameter pattern format. + + + + value + false + true + + Specifies the report parameter value. If doesn't set, value is null. + + + + displayText + false + true + + Specifies the report parameter display text. + + + + delim + false + true + + Specifies the delimiter for multiple values. + Defaults to pipe "|". + + + + isLocale + false + true + + Specifies whether the report parameter value is a locale/format related string. + + + + + + + + + value + org.eclipse.birt.report.taglib.ParamValueTag + JSP + + The param value tag specifies multiple values for a given param tag. + + + value + false + true + + Specifies the report parameter value. If doesn't set, value is null. + + + + displayText + false + true + + Specifies the report parameter display text. + + + + + + + + + parameterPage + org.eclipse.birt.report.taglib.RequesterTag + JSP + + The parameterPage tag can help developers to display BIRT parameter page or create a user-defined parameter page. + This tag can collect these parameters and submit to BIRT servlet to handle request. + + + + id + true + true + + Specifies the parameter page id.It should be unique. + It can contain number,letter or underline. + + + + + name + false + true + + Specifies the parameter page name. + If attribute 'isCustom' is true, this name should be required and unique. + + + + + isCustom + false + true + + Specifies whether uses the user-defined parameter page. + If false, use the BIRT parameter dialog. + Default to false. + + + + + title + false + true + + Specifies the report title displayed at the top. + + + + + baseURL + false + true + + Specifies base URL of BIRT viewer. + Default to the current context. + + + + + scrolling + false + true + + Sets the DIV/IFrame style "scrolling ". + ( auto | yes | no ) + + + + + position + false + true + + Sets the style "position" of parameter page. + ( static | absolute | fixed | relative ) + + + + + style + false + true + + Sets the style of parameter page. + + + + + height + false + true + + Sets the height of parameter page in pixels. + + + + + width + false + true + + Sets the width of parameter page in pixels. + + + + + top + false + true + + Sets the top of parameter page in pixels. + + + + + left + false + true + + Sets the left of parameter page in pixels. + + + + + frameborder + false + true + + Specifies whether displays the iframe border. + Default to no. + If set "isCustom" to true, ignore this attribute. + ( Yes | No ) + + + + + reportDesign + false + true + + Specifies the report design file name. + ( Absolute path, relative path or URL ) + + + + + reportDocument + false + true + + Specifies the report document file name. + Noted: only support "file:" URL format. + ( Absolute path, relative path or URL ) + + + + + reportletId + false + true + + Specifies the instance id of reportlet. + The "reportDocument" attribute should be required. + Noted: frameset pattern doesn't support reportlet. + + + + + pattern + false + true + + Specifies the servlet pattern for request submit. + BIRT supports three patterns: frameset, run and preview. + Can refer to the user-defined servlet pattern. + Default to frameset. + + + + + target + false + true + + Specifies the target window for request submit. + + + + + bookmark + false + true + + Specifies the targeted bookmark name. + + + + + locale + false + true + + Specifies the Locale information. + + + + + timeZone + false + true + + Specifies a time zone id. For example: "America/Los_Angeles" or "GMT+1" or "GMT+01:00". + + + + + svg + false + true + + Specifies whether supports the SVG output format or not. + + + + + format + false + true + + Specifies the output format of report. + + + + + emitterId + false + true + + Specifies the emitter id for the report output. + + + + + pageOverflow + false + true + + Specifies the page overflow setting for the PDF format. + One of the following values: + 0 for "auto", 1 for "actual size", 2 for "fit to page". + + + + + rtl + false + true + + Specifies whether supports rtl page or not. + + + + + resourceFolder + false + true + + Specifies the referenced resource folder. + Default value is defined in web.xml. + + + + + forceOverwriteDocument + false + true + + Specifies whether forces to overwrite the generated document. + If allowPageBreak is false,ignore this attribute. + Default value is defined in web.xml. + + + + + showTitle + false + true + + Specifies whether shows the report title. + Default to true. + + + + + showToolBar + false + true + + Specifies whether shows the toolbar. + Default to true. + + + + + showNavigationBar + false + true + + Specifies whether shows the Navigation Bar. + If allowPageBreak is false,ignore this attribute. + Default to true. + + + + + isReportlet + false + true + + Specifies whether render reportlet by bookmark. + Default to false. + + + + + + + + + + paramDef + org.eclipse.birt.report.taglib.ParamDefTag + JSP + + The param tag is used to generate html code for defined parameter in ParameterPage tag. + + + id + true + true + + Specifies the id of parameter control.It should be unique. + It can contain number,letter or underline. + + + + name + true + true + + Specifies the report parameter name. + + + + pattern + false + true + + Specifies the report parameter pattern format. + It is used to parse defined parameter value string. + + + + value + false + true + + Specifies the report parameter value. If doesn't set, use default value. + + + + displayText + false + true + + Specifies the report parameter display text. + + + + isLocale + false + true + + Specifies whether the report parameter value is a locale/format related string. + It is used to parse defined parameter value string. + + + + title + false + true + + Specifies the title attribute of parameter control. + + + + cssClass + false + true + + Specifies the css class attribute of parameter control. + + + + style + false + true + + Specifies the parameter control style. + + + + \ No newline at end of file diff --git a/example/webapp/example/WEB-INF/controller.xml b/example/webapp/example/WEB-INF/controller.xml new file mode 100644 index 000000000..4573c7e5c --- /dev/null +++ b/example/webapp/example/WEB-INF/controller.xml @@ -0,0 +1,398 @@ + + + + + + + + + + Example Component Site Configuration File + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/example/webapp/example/WEB-INF/web.xml b/example/webapp/example/WEB-INF/web.xml new file mode 100644 index 000000000..e658c4eec --- /dev/null +++ b/example/webapp/example/WEB-INF/web.xml @@ -0,0 +1,85 @@ + + + + + + Open For Business - Example Application + Example Application of the Open For Business Project + + + webSiteId + EXAMPLE + A unique ID used to look up the WebSite entity + + + localDispatcherNameexample + A unique name used to identify/recognize the local dispatcher for the Service Engine + + + entityDelegatorNamedefault + The Name of the Entity Delegator to use, defined in entityengine.xml + + + mainDecoratorLocation + component://example/widget/example/CommonScreens.xml + The location of the main-decorator screen to use for this webapp; referred to as a context variable in screen def XML files. + + + compressHTML + false + Remove unnecessary whitespace from HTML output. + + + + ContextFilter + ContextFilter + org.ofbiz.webapp.control.ContextFilter + disableContextSecurityN + + allowedPaths + /error:/control:/select:/index.html:/index.jsp:/default.html:/default.jsp:/images:/includes/maincss.css + + errorCode403 + redirectPath/control/main + + ContextFilter/* + + org.ofbiz.webapp.control.ControlEventListener + org.ofbiz.webapp.control.LoginEventListener + + + + + ControlServlet + ControlServlet + Main Control Servlet + org.ofbiz.webapp.control.ControlServlet + 1 + + ControlServlet/control/* + + 60 + + + index.jsp + index.html + index.htm + + diff --git a/example/webapp/example/error/error.jsp b/example/webapp/example/error/error.jsp new file mode 100644 index 000000000..dcfa3b066 --- /dev/null +++ b/example/webapp/example/error/error.jsp @@ -0,0 +1,52 @@ +<%-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--%> +<%@ page import="org.ofbiz.base.util.*" %> + + +Open For Business Message + + + +<% String errorMsg = (String) request.getAttribute("_ERROR_MESSAGE_"); %> + + +
+
+ + + + +
+ + + + + + + +
+
:ERROR MESSAGE:
+
+
<%=UtilFormatOut.replaceString(errorMsg, "\n", "
")%>
+
+
+
+
+ + diff --git a/example/webapp/example/flot/flotPie.ftl b/example/webapp/example/flot/flotPie.ftl new file mode 100644 index 000000000..b05088f07 --- /dev/null +++ b/example/webapp/example/flot/flotPie.ftl @@ -0,0 +1,68 @@ +<#-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + + + + + +
+ + + +
+ + diff --git a/example/webapp/example/index.jsp b/example/webapp/example/index.jsp new file mode 100644 index 000000000..0ad9a3f91 --- /dev/null +++ b/example/webapp/example/index.jsp @@ -0,0 +1,20 @@ +<%-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--%> + +<%response.sendRedirect("control/main");%> diff --git a/example/webapp/example/jackrabbit/ContentChooser.ftl b/example/webapp/example/jackrabbit/ContentChooser.ftl new file mode 100644 index 000000000..f7cda63fc --- /dev/null +++ b/example/webapp/example/jackrabbit/ContentChooser.ftl @@ -0,0 +1,52 @@ +<#-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> +${uiLabelMap.ExampleJackrabbitQuickContentSelect} +
+ + + +
+ + + +
\ No newline at end of file diff --git a/example/webapp/example/jackrabbit/JackrabbitDataTree.ftl b/example/webapp/example/jackrabbit/JackrabbitDataTree.ftl new file mode 100644 index 000000000..8d2aa7c96 --- /dev/null +++ b/example/webapp/example/jackrabbit/JackrabbitDataTree.ftl @@ -0,0 +1,94 @@ +<#-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + + +
${parameters.dataTree!""}
+ + \ No newline at end of file diff --git a/example/webapp/example/jackrabbit/JackrabbitFileTree.ftl b/example/webapp/example/jackrabbit/JackrabbitFileTree.ftl new file mode 100644 index 000000000..a0914f74f --- /dev/null +++ b/example/webapp/example/jackrabbit/JackrabbitFileTree.ftl @@ -0,0 +1,110 @@ +<#-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + + +
${parameters.fileTree!""}
+ + \ No newline at end of file diff --git a/example/webapp/example/reports/fonts.fo.ftl b/example/webapp/example/reports/fonts.fo.ftl new file mode 100644 index 000000000..fcd86d17d --- /dev/null +++ b/example/webapp/example/reports/fonts.fo.ftl @@ -0,0 +1,55 @@ + + + + + + + + + + + + Font samples + + Helvetica + the quick brown fox jumps over the lazy dog 1234657890 + the quick brown fox jumps over the lazy dog 1234657890 + the quick brown fox jumps over the lazy dog 1234657890 + the quick brown fox jumps over the lazy dog 1234657890 + Times + the quick brown fox jumps over the lazy dog 1234657890 + the quick brown fox jumps over the lazy dog 1234657890 + the quick brown fox jumps over the lazy dog 1234657890 + the quick brown fox jumps over the lazy dog 1234657890 + Courier + the quick brown fox jumps over the lazy dog 1234657890 + the quick brown fox jumps over the lazy dog 1234657890 + the quick brown fox jumps over the lazy dog 1234657890 + the quick brown fox jumps over the lazy dog 1234657890 + Symbol + the quick brown fox jumps over the lazy dog 1234657890 + Zapf Dingbats + the quick brown fox jumps over the lazy dog 1234657890 + + + diff --git a/example/webapp/webapp.txt b/example/webapp/webapp.txt new file mode 100644 index 000000000..d4a77a91e --- /dev/null +++ b/example/webapp/webapp.txt @@ -0,0 +1,20 @@ +##################################################################### +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +##################################################################### + +Web applications which will be mounted by the container would go here. diff --git a/example/widget/example/BirtForms.xml b/example/widget/example/BirtForms.xml new file mode 100644 index 000000000..82f51fa1b --- /dev/null +++ b/example/widget/example/BirtForms.xml @@ -0,0 +1,45 @@ + + + + + +
+ + + + + + + + + + +
+
diff --git a/example/widget/example/BirtScreens.xml b/example/widget/example/BirtScreens.xml new file mode 100644 index 000000000..ab746a806 --- /dev/null +++ b/example/widget/example/BirtScreens.xml @@ -0,0 +1,113 @@ + + + + + + +
+ + + + + +
+ + +
+
+
+
+
+
+ + +
+ + + + + + +
+ + + + + + + + + +
+
+
+
+
+
+ + +
+ + + + + + +
+ + + + + +
+
+
+
+
+
+ + +
+ + + + + + +
+ + + + + + + +
+
+
+
+
+
+
diff --git a/example/widget/example/CommonScreens.xml b/example/widget/example/CommonScreens.xml new file mode 100644 index 000000000..1e1b24d4f --- /dev/null +++ b/example/widget/example/CommonScreens.xml @@ -0,0 +1,337 @@ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+ + + + + + + + +
+ + + + + + + + + +
+
+ +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+
+
+
+
+
+ + +
+ + + + + + + + +
+ + + + + + + + + +
+
+ +
+ + + + + +
+ + + + + + + + + + + + + + + + +
+ +
+ + + +
+
+
+
+
+
+ + +
+ + + + + + + + + + + + + + + + + + + +
+
+ + +
+ + + + + + + + + + + + + + + + + + + +
+
+ + +
+ + + + + + +
+ + + + + + + +
+
+ + +
+ + + + + + + + + + +
+
+
+
+
+
+ + +
+ + + + + + + + + + + + + + + + + + + +
+
+ + +
+ + + + + + + + + + + + +
+ + + +
+
+
+
+
+
+ + + +
+ + + + + + +
+
+ +
diff --git a/example/widget/example/ExampleAjaxScreens.xml b/example/widget/example/ExampleAjaxScreens.xml new file mode 100644 index 000000000..fcb0b3891 --- /dev/null +++ b/example/widget/example/ExampleAjaxScreens.xml @@ -0,0 +1,101 @@ + + + + + + +
+ + + + + + + + +
+ + + + + +
+ + + + + + + +
+ + + + + + + +
+ + + +
+
+
+
+
+
+ + +
+ + + + + + + + + + + +
+
+ + +
+ + + + + + + + + + + + + +
+
+ +
diff --git a/example/widget/example/ExampleFeatureForms.xml b/example/widget/example/ExampleFeatureForms.xml new file mode 100644 index 000000000..85b081a9e --- /dev/null +++ b/example/widget/example/ExampleFeatureForms.xml @@ -0,0 +1,166 @@ + + + + + +
+ + + + +
+ + +
+ + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + +
+ +
diff --git a/example/widget/example/ExampleFeatureScreens.xml b/example/widget/example/ExampleFeatureScreens.xml new file mode 100644 index 000000000..19d98cad7 --- /dev/null +++ b/example/widget/example/ExampleFeatureScreens.xml @@ -0,0 +1,138 @@ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+
+
+
+
+
+ + +
+ + + + + + + + + + + + + +
+
+ + +
+ + + + + + + + + + + + + +
+
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
diff --git a/example/widget/example/ExampleForms.xml b/example/widget/example/ExampleForms.xml new file mode 100644 index 000000000..5c7b95552 --- /dev/null +++ b/example/widget/example/ExampleForms.xml @@ -0,0 +1,252 @@ + + + + + +
+ + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +
diff --git a/example/widget/example/ExampleJackrabbitForms.xml b/example/widget/example/ExampleJackrabbitForms.xml new file mode 100644 index 000000000..f65e447db --- /dev/null +++ b/example/widget/example/ExampleJackrabbitForms.xml @@ -0,0 +1,167 @@ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + +
+ +
+ + + + + + + + + + +