Re: Quick start
"Simon Kelly" <[email protected]>
| Newsgroups | gmane.comp.java.strutscx.user |
|---|---|
| Message-ID | <[email protected]> |
Nirmal, There is not one yet as far as I know. I started a beginners guide a while back, but my work-load has been too great to for the past couple of months to make any head way. Here are a few pointers though to get you started. 1) Strutscx only has a major impact on the View layer. The model and almost all of the Controller sections can be taken directly from an existing Struts app with minor modifications. Read through the StrutsCXDocumentBuilder class to get a good idea of what will be sent to the client and in what structure. You will also find the points in the document where your data will be held as elements, and the constants (from StrutsCXConstants class) you will need to pass your data to the Builder. 2) You will need to have an xslt document (naturally :-) to apply to your data, this is passed to the StrutsCXServlet using the Constants.XSL_KEY and using the request. IE request.setAttribute(StrutsCXConstants.XSL_KEY, myxsldoc); One thing to note with the transform is the root of your data within the xml your transform will operate on. For the master template you CAN NOT use match="/", as your data is further into the output document structure. You will need to put match="/root/data/", if you want your data to be the root context of your xslt. 3) I18N is handled with xml documents instead of the .properties files Struts uses. If you look in the source version of Bernys package, you will find the directory /src/web/xml, in which are the three xml files for the languages used in his app. The files follow the for variables_XX.xml where XX is the two letter code for the country. This two letter code is also required in the strutscx-config.xml file in the /config directory. You will see a tag near the top of the doc <lang />, you need to put the two letter code in here for each of the variables files you have created delimited with a space. That should be enough to get you started. It's not a quick start, but once you start looking into these things you will notice the rest of the requirements are not too far away in the source. If you have any further questions, just post them. You will usually get an answer back in a few hours, time-zone permitting :-) Kind regards, Simon ----- Original Message ----- From: Nirmal Rajarathnam To: [email protected] Sent: Thursday, April 24, 2003 12:38 AM Subject: [Strutscx-user] Quick start Hi, I am new to StrutsCX. Can someone point me to a quick start resource? Thanks, Nirmal R.