struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Gainty <>
Subject RE: new to Struts
Date Sat, 13 Sep 2008 16:02:06 GMT

its a MVC framework which contains Dojo Javascript libraries
keep in mind Dojo 0.42 has the ability to accomodate a dojo DataGrid

the simplest example:
in pure JavaScript you can use return JavaScriptObjectNotationResultset to a datagrid e.g.
no ftl.. no worries about configuring for struts just call the dojo control directly from
var itemData = {items: [{name: "Bill", hiredate: new Date("1975-8-1")}, ...]};

var store = new{ data: itemData});

to accomodate in struts 
you will encounter these configuration considerations
first of all make SURE your modulePaths are set correctly for dojo.js (if you don't no .js
will be loaded)
enable the gridData widget control to be found in WEB-INF/classes/template/simple/head.ftl
<script src="${base}/dojo/release-0.4.2/templates/gridData"></script>

if you want to set this up as a referencable control you'll want to look at creating a ftl
(freemarker template library) for your control e.g.

<%@taglib prefix="s" uri="/struts-tags" %>
    <title>All People</title>


There are ${peopleCount} people... 
<#list people as person>
<!-- an example of a struts tag which has a ftl component is the inputtransferselect-->
<!-- action class which will feed your people list -->
    <li><a href="editPerson.action">Edit people</a></li>
    <li><a href="newPerson!input.action">Create</a> a new person</li>

but the s:inputtransferselect is meaningless without accompanying .ftl form which is defined
template\simple\inputtransferselect.ftl *notice the inputtransferselect.js inclusion via s.url:*
head -8 inputtransferselect.ftl

<#if !stack.findValue("#inputtransferselect_js_included")?exists><#t/>
    <script type="text/javascript" src="<@s.url value="/struts/inputtransferselect.js"
encode='false' includeParams='none'/>"></script>
    <#assign temporaryVariable = stack.setValue("#inputtransferselect_js_included", "true")
<table border="0">

Antonio/Musachy or jeromy can elaborate more descriptively on this topic
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business of Sender.
This transmission is of a confidential nature and Sender does not endorse distribution to
any party other than intended recipient. Sender does not necessarily endorse content contained
within this transmission. 

> Date: Sat, 13 Sep 2008 15:32:04 +0200
> From:
> To:
> Subject: Re: new to Struts
> 1) I would go for Strut2 right away, Struts1 (aka Struts-classic) is a 
> completely different framework. Struts2 is more modern, more productive 
> and more enjoyable to use. A good starter book to learn Struts2 is 
> "Struts2 In Action" from Manning.
> 2) Netbeans has a WYSIWYG JSP editor isn't it ?  It's all what you need, 
> because Strut2 configuration file is so much simpler and smaller [than 
> the ones for Strut1] that we really don't need a graphical 
> representation anymore. Also I remember seeing that there exists a 
> Netbean pluging specifically for Struts2 development. But you can also 
> comfortably develop Struts2 applications with EclipseWTP.
> 3) Struts2 comes with all what you need for building form for user 
> input, but for data output, like lists and datagrids, it has... nothing. 
> Fortunately you can use almost all components that where crafted for JSP 
> over the years. This include, 
> and 
>  And finally you can 
> crafted your own component by witting a Freemarker template.
> ZC.
> gbattine wrote:
> > Hello guys,
> > I need an information.
> > I'm going to learn struts..
> > I need some info, please help me:
> >
> > 1) what do you hint to me, to start from Struts 1.1 and later move to Struts
> > 2.0, or starting from Struts 2.0?
> > 2) I usually use Netbeans. Is there an editor WYSIWHG for Netbeans, to use
> > Struts?
> > 3) I know ASP.NET technology and I used lot of already developed components,
> > like editable grid, dropdown list and so on...does exists such component for
> > struts?where I can download them?
> >
> > Thanks,
> > Regards
> >   
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

Get more out of the Web. Learn 10 hidden secrets of Windows Live.!550F681DAD532637!5295.entry?ocid=TXT_TAGLM_WL_domore_092008
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message