Brandneu: ESS
The Enterprise Software
Solution - ESS, unsere CRM-ERP-Web Shop Lösung für jedermann und aus einem Guß. Testen Sie es hier und jetzt.


Sie befinden sich in
Suche

Anmeldung
Benutzer
  
Passwort
  


 
JQ Consulting, Ihr IT Dienstleister für benutzerfreundliche Software.
 
 
Viele Anforderungen, eine Lösung: The Enterprise Data Center. EDC ist flexibel, Ihre individuellen
Anforderungen können schnell und komfortabel umgesetzt werden. Sehen Sie selbst:
<b>CRM</b> - Kundenverwaltung mit automatischen Emailabgleich, Office<br/>Integration und individuell auf Ihre Bedürfnidsse zugeschnittene Module. <b>CMS</b> - Content Management System für Redaktionssysteme, WebShops oder WebServices:<br/>alles schnell und einfach zu erstellen mit EDC <b>ERP</b> - Möchten Sie eine Warenwirtschaft, die das macht was Sie wollen ?<br/>EDC als Warenwirtschaftssystem, auch in Kombination mit dem WebShop und der Kundenverwaltung <b>BI</b> - Werten Sie Ihre Daten aus, gewinnen Sie Information und verarbeiten Sie diese zu Wissen:<br/>EDC zur statistischen Auswertung mit Drill Down und Export in Präsentationssysteme Ein <b>maßgeschneiderter Web Shop</b>, individuell und charismatisch<br/>In diesem Fall mit integrierter Auftragsbearbeitung, Warenwirtschaft und Kundenverwaltung Ihre Produkte im Web Shop, zusätzlich im <b>Flash Blätterkatalog</b><br/>Eine sinnvolle Ergänzung für Kunden, die nur mal in Ihrem Shop rumstöbern möchten
How to install the HTML Engine ?
First of all "HTML Engine" is not the correct term for it, since the EDC Server may in the same manner serve XML, WML, and what ever you want it to serve.
Now, simply copy the server classes to your servlet engine, in Tomcat e.g. if your app is named EDC to webapps/EDC/WEB-INF/classes/ or the server.jar to webapps/EDC/WEB-INF/lib/.
In your web.xml add the EDCServlet:

<servlet>
 <servlet-name>EDC</servlet-name>
 <servlet-class>jq.edc.server.EDCServlet</servlet-class>
 <init-param>
   <param-name>cfg</param-name>
   <param-value>/PATH/TO/YOUR/REAL/EDC/SERVER/server.cfg</param-value>
</init-param>
</servlet>
<servlet-mapping>
  <servlet-name>EDC</servlet-name>
  <url-pattern>/</url-pattern>
</servlet-mapping>

That's it. The EDCServlet reads in the server.cfg config and looks for the edc.ini within the same directory of the server.cfg. All database parameters etc. are taken from there.

The server.cfg must have following entries:

[System]
urlDynamic=http://www.myserver.com/JQ/
urlStatic=http://www.myserver.com/
HtmlDir=/THE/DIRECTORY/WHERE/MY/HTML/FILES/ARE/LOCATED/

The main.html, the starting point of all requests, is looked up within the "HtmlDir". All sub content files are looked up in "HtmlDir"/pages.



HTML Code, how to access EDC data ?
Inside of your normal HTML code, which does not need to be strict XML or anything similar, write following:

<jq:List profile="8">
  <b><jq:CONTENT.QUESTION/></b><br/>
  <jq:CONTENT.ANSWER abstract="200"/><br/>
  <jq:CONTENT.IMAGE type="filepath" decorator="<img src=&quot;/file/<jq:item/>&quot;/>"/><br/><br/>
  <hr/><br/>

</jq:List>

All tags in the namespace of "jq", that means starting with "<jq:", are processed as EDC tags. The attribute "profile" crresponds to the EDC profile, "search" reduces the number of results, just as a search within the EDC client. In this case <jq:List> is the context within which the profile "8" is fetched and the fields CONTENT.QUESTION, CONTENT.IMAGE and CONTENT.ANSWER for each result is appended. Lets say we have 2 entries in this profile, the first one contains an image, the second one not. The whole expression above will be replaced by following HTML code:

<b>Question 1</b><br/>
Answer 1<br/>
<img src="/file/10000/99"/><br/><br/>
<hr/><br/>
<b>Question 2</b><br/>
Answer 2<br/><br/>
<hr/><br/>

The decorator attribute may be used to add HTML code just in case the value exists. So in this case the image tag is only printed if the image is existing in the database. There are some special tags which you should only use in purpose:

<jq:ContentBody/>
Just used in the main.html file and will be replaced by the value of "menu" parameter, that means for URI like ?menu=Product it will be replaced by the content of the file "pages/Product.xml".

<jq:PDF profile="3" search="ID={queryParameter}" type="pdf"/>
Generates PDF form and delivers it. This tag must be the starting tag of the "ContentBody" file. You may also use other types: ps - POSTSCRIPT, rtf - MIME_RTF, png - PNG.

<jq:File profile="3" column="CONTENT.PICTURE"/>
Delivers file, regardless of where the file is stored within EDC (on disc, in attachment table or within the same table). This tag must be the starting tag of the "ContentBody" file, similar to PDF.

<jq:Menu decorator="<br><jq:MenuItem/><jq:SubMenu/>"> Defines the menu of the site.

<jq:Script profile="3" search="id=3" myParam="myValue">
  new java.text.SimpleDateFormatter("dd.MM.yyyy HH:mm").format(new java.util.Date())
</jq:Script>
Executes Java code. If attribute profile is defined and search results to one entry, all fields of the entry are available inside the scripting context, e.g. CONTENT.TITLE becomes field CONTENT_TITLE within the script. Inside of this context all attributes are passed as parameters, e.g. myParam may be accessed and returns the string myValue. request is the current HttpServletRequest.

<jq:Aggregate profile="125" formula="<jq:product.price/> * <jq:product.amount/>" format="#,##0.00"/>
Executes the formula and sums up the results. Somehow similar to the "group by" statement in SQL.

<jq:Logon>HTML code for the logon form</jq:Logon>
The Logon form is only printed if the user is not logged on.

<jq:Logoff label="Abmelden"/>
The logoff link is only printed if the user is logged on. Attribute "label" will be the value displayed within the link.

<jq:SQL connection="xy" sql="select all from all" decorator="query result: {0}"/>
Executes an SQL statement.

<jq:If test="<jq:article.status/> == 1">some HTML code</jq:If>
Inserts the HTML code only, if the test condition evaluates to true. Context values may be used inside of the test condition.

<jq:TAN length="13"/>
Generates an transaction number.

<jq:Email to="xy@yz.com" subject="subject" body="some notice"/>
Sends an Email to the recipient. body may be an context page, values will accordingly be replaced.

<jq:URLDynamic/> or <jq:URLStatic/>
Is replaced by the value in the server.cfg. May be used for base URLs.



Where is the menu defined ?
The menu is defined in the main.html somewhere as follows:

<jq:Menu decorator="<li><jq:MenuItem/><jq:SubMenu/></li>" frameDecorator="<ul><jq:SubMenu/></ul>">
  <jq:item id="Start"/>
  <jq:item id="EDC" label="EDC" template="Intern" param="&id=EDC">
    <jq:item profile="2" search="IDENTITY like 'EDC-%'" id="<jq:CONTENT.IDENTITY/>" label="<jq:CONTENT.MENU/>" template="Intern" param="&id=<jq:CONTENT.IDENTITY/>"/>
  </jq:item>
</jq:Menu>

Menus may consist of static and dynamic elements. Elements are defined within the <jq:item> tag inside of the <jq:Menu> body. Each item must have an "id" and "label" tag. The id will be passed to the URI like "?menu=EDC", the label is the displayed value. Thus the id attribute defines the .xml filename which shuld be located in the "pages" directory of the "HtmlDir". Alternatively, one may define the "template" attribute, which will be taken if the id file is not found.

An menu item may define additional URI parameters by the tag param.

If the attribute "profile" is included, the item is processed as an dynamic menu item and it will look up the profile to find items with the specified id and label.

IDs of children have the parent id prepended, separated by a dot. The content files are looked up in following priority:

1. filename = menu (e.g. Product.EDC.Argument.xml)
2. filename = menu with dots replaced by directory separator (e.g. Product/EDC/Argument.xml)
3. filename = template

If none of them is found, an exception is thrown.



Translations ?
First of all, don't put content text into the templates, meaning into main.html or pages/*.xml. For static text create a table with an IDENTITY column, a LANGUAGE column and an TEXT column. Inside of your templates refer to this table by getting the text like this:

<jq:STATIC_TEXT.TEXT profile="xy" search="LANGUAGE='DE' and IDENTITY='BODY_HOME'"/>

The other way gets text into the language processor of EDC and replaces it at the appropriate places. Place a language tag in your main.html:

<jq:Language language="DE" profile="xy" id="static.<jq:LABEL.ID/>" label="LABEL.TEXT"/>

You may add as many language tags as you want. It fetches the content of the profile xy and places it as key/value pair into the language engine. You can refer to it anywhere within the templates or even in the dynamic text as follows:

{static.12}

Just take the key, put it in braces and that's it.
The disadvantage of this way is the unability to instantly edit the text when logged on. The first way is a bit more of programming work which pays of in maintaining the site, the second one is the quicker one to develop but if you want to change labels or text you need to log on into the client.

From a user point of view if you want to change the language, just put a link as follows:

<a href="?<jq:QueryString/>&language=EN">English</a>

The session will store the new language EN and replace any tag DE with EN. You may refer in your profile search tags to it.






zurück      weiter
 

 
   
 
Powered by EDC