Good MVC-based Struts modular application example

I am searching for some good modular applications in Struts as a reference for the applications we are making. It is hard to find really good examples. Most are too simple with only 2 struts-config.xml files. Also validation, tiles and MessagesResources.properties should be included.
Even in this URL: http://sourceforge.net/projects/struts I am not able to find a good example.
We developed several rather complex modular applications in Struts, but we would like to have a good modular application reference...

silvousplait wrote:
I am seeking a recommendation to a website, book, etc. that gives an extensive example of building, from scratch, a desktop application (controlling of frames, panels, exceptions, DB).
I would like it to follow the MVC convention if possible.I'm using two books; The JFC Swing Tutorial for technical reference and Filthy Rich Clients for inspiration.

Similar Messages

  • Example "Designing Component-Based Web Dynpro Applications" in NWDS 7.1

    hi,
    importing Designing Component-Based Web Dynpro Applications.zip into NWDS 7.1, I get ~ 200 errors.
    after repairing the projects (in WEB-Dynpro View) ands migrating, there are 76 errors:
    Component 'CustomersUIComp': Used component/component interface is missing: ComponentInterfaceImplementation com.sap.cd355.comp.adv.modelcomp.ModelCompInterface Hint: Check availability of public part archive     LocalDevelopmentcd355compadvui_final~sap.com/src/packages/com/sap/cd355/comp/adv/ui/customers     CustomersUIComp.wdcomponent     ModelComponent     1240309796017     1800
    TextView 'city_editor.text': Context attribute 'CustomersView.Customers.Address.city' does not have a type and cannot be bound to a UI element. Hint: Remove the binding or bind a context element matching the property's type.     LocalDevelopmentcd355compadvui_final~sap.com/src/packages/com/sap/cd355/comp/adv/ui/customers     CustomersView.wdview     text     1240309796032     1821
    ViewUsage 'com.sap.cd355.comp.adv.ui.customers.CustomersUICompInterfaceViewCustomersUIComponentUsage1': Embedded View/InterfaceView is missing. InterfaceView com.sap.cd355.comp.adv.ui.customers.CustomersUICompInterfaceView Hint: Repair Window     LocalDevelopmentcd355compadvmaster_final~sap.com/src/packages/com/sap/cd355/comp/adv/master     MasterComp.wdwindow     Unknown     1240309796503     1823
    hermann

    Seems like your example requires some other DCs as well, which don't appear to be part of the zip you mentioned.

  • Blocking goods receipt based on unprinted purchase order

    Hello,
    I want to block goods receipt based on purchase order that hasn't been printed yet. How can I do it? Thanks.

    Hi,
    I dont think In standard setting you cannot acheive this.
    First maintain print immediately while saving the application in condition record.
    Please provide the list of P.O's which you are investigating in ME9F, provide the application as EF and Processing Status as 0 (Not processed)
    This way, you will get the whole list of P.O's which have not been printed out, please note that outputs can only be processed on successfully released Purchase Orders.
    Show this to your technical team. They can develop a report using the same logic used above by the report and validate the PO as PO listed in the above report.
    and use exit in MIGO to validate.
    I have not tried this, I think you can achieve the requirement with help of technical consultant.
    hope it helps
    sBk
    Edited by: Sujithbk on Dec 27, 2011 12:09 PM

  • About loading modular applications

    Hi guys..
    I have some question about the Module class..
    I know it's a great feature and I truly thank Adobe guys for
    this new awesome class
    but it seems to me that
    each loaded application (i.e. modular applications surrounded
    by <mx:Module> and </mx:Module> tags)
    seems to shrink its size when it is actually loaded in the
    shell application...
    I even put width="100%" and height="100%" in every and each
    tag of these loaded applications
    but to no avail...
    Is this a bug or am I missing something somewhere??

    I also have this problem. I posted an example in message
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=60&catid=585&threadid =1233231&enterthread=y
    I tried to set width="100%" in every possible tag, even the
    suggested percentWidth="100" in de module but it doesn't work.

  • J2EE MVC模式JSF与Struts的异同

    J2EE MVC模式JSF与Struts的异同
    Struts和JSF/Tapestry都属于表现层框架,这两种分属不同性质的框架,后者是一种事件驱动型的组件模型,而Struts只是单纯的MVC模式框架,老外总是急吼吼说事件驱动型就比MVC模式框架好,何以见得,我们下面进行详细分析比较一下到底是怎么回事?
      首先事件是指从客户端页面(浏览器)由用户操作触发的事件,Struts使用Action来接受浏览器表单提交的事件,这里使用了Command模式,每个继承Action的子类都必须实现一个方法execute。
      在struts中,实际是一个表单Form对应一个Action类(或DispatchAction),换一句话说:在Struts中实际是一个表单只能对应一个事件,struts这种事件方式称为application event,application event和component event相比是一种粗粒度的事件。
      struts重要的表单对象ActionForm是一种对象,它代表了一种应用,这个对象中至少包含几个字段,这些字段是Jsp页面表单中的input字段,因为一个表单对应一个事件,所以,当我们需要将事件粒度细化到表单中这些字段时,也就是说,一个字段对应一个事件时,单纯使用Struts就不太可能,当然通过结合JavaScript也是可以转弯实现的。
      而这种情况使用JSF就可以方便实现,
    <h:inputText id="userId" value="#{login.userId}">
      <f:valueChangeListener type="logindemo.UserLoginChanged" />
    </h:inputText>
      #{login.userId}表示从名为login的JavaBean的getUserId获得的结果,这个功能使用struts也可以实现,name="login" property="userId"
      关键是第二行,这里表示如果userId的值改变并且确定提交后,将触发调用类UserLoginChanged的processValueChanged(...)方法。
      JSF可以为组件提供两种事件:Value Changed和 Action. 前者我们已经在上节见识过用处,后者就相当于struts中表单提交Action机制,它的JSF写法如下:
    <h:commandButton id="login" commandName="login">
      <f:actionListener type=”logindemo.LoginActionListener” />
    </h:commandButton>
      从代码可以看出,这两种事件是通过Listerner这样观察者模式贴在具体组件字段上的,而Struts此类事件是原始的一种表单提交Submit触发机制。如果说前者比较语言化(编程语言习惯做法类似Swing编程);后者是属于WEB化,因为它是来自Html表单,如果你起步是从Perl/PHP开始,反而容易接受Struts这种风格。
      基本配置
      Struts和JSF都是一种框架,JSF必须需要两种包JSF核心包、JSTL包(标签库),此外,JSF还将使用到Apache项目的一些commons包,这些Apache包只要部署在你的服务器中既可。
      JSF包下载地址:http://java.sun.com/j2ee/javaserverfaces/download.html选择其中Reference Implementation。
      JSTL包下载在http://jakarta.apache.org/site/downloads/downloads_taglibs-standard.cgi
      所以,从JSF的驱动包组成看,其开源基因也占据很大的比重,JSF是一个SUN伙伴们工业标准和开源之间的一个混血儿。
      上述两个地址下载的jar合并在一起就是JSF所需要的全部驱动包了。与Struts的驱动包一样,这些驱动包必须位于Web项目的WEB-INF/lib,和Struts一样的是也必须在web.xml中有如下配置:
    <web-app>
      <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
      </servlet>
      <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>*.faces</url-pattern>
      </servlet-mapping>
    </web-app>
      这里和Struts的web.xml配置何其相似,简直一模一样。
      正如Struts的struts-config.xml一样,JSF也有类似的faces-config.xml配置文件:
    <faces-config>
      <navigation-rule>
        <from-view-id>/index.jsp</from-view-id>
        <navigation-case>
          <from-outcome>login</from-outcome>
          <to-view-id>/welcome.jsp</to-view-id>
        </navigation-case>
      </navigation-rule>
      <managed-bean>
        <managed-bean-name>user</managed-bean-name>
        <managed-bean-class>com.corejsf.UserBean</managed-bean-class>
        <managed-bean-scope>session</managed-bean-scope>
      </managed-bean>
    </faces-config>
      在Struts-config.xml中有ActionForm Action以及Jsp之间的流程关系,在faces-config.xml中,也有这样的流程,我们具体解释一下Navigation:
      在index.jsp中有一个事件:
    <h:commandButton label="Login" action="login" />
      action的值必须匹配form-outcome值,上述Navigation配置表示:如果在index.jsp中有一个login事件,那么事件触发后下一个页面将是welcome.jsp
      JSF有一个独立的事件发生和页面导航的流程安排,这个思路比struts要非常清晰。
      managed-bean类似Struts的ActionForm,正如可以在struts-config.xml中定义ActionForm的scope一样,这里也定义了managed-bean的scope为session。
      但是如果你只以为JSF的managed-bean就这点功能就错了,JSF融入了新的Ioc模式/依赖性注射等技术。
    Ioc模式
      对于Userbean这样一个managed-bean,其代码如下:
    public class UserBean {
      private String name;
      private String password;
      // PROPERTY: name
      public String getName() { return name; }
      public void setName(String newValue) { name = newValue; }
      // PROPERTY: password
      public String getPassword() { return password; }
      public void setPassword(String newValue) { password = newValue; }
    <managed-bean>
      <managed-bean-name>user</managed-bean-name>
      <managed-bean-class>com.corejsf.UserBean</managed-bean-class>
      <managed-bean-scope>session</managed-bean-scope>
      <managed-property>
        <property-name>name</property-name>
        <value>me</value>
      </managed-property>
      <managed-property>
        <property-name>password</property-name>
        <value>secret</value>
      </managed-property>
    </managed-bean>
      faces-config.xml这段配置其实是将"me"赋值给name,将secret赋值给password,这是采取Ioc模式中的Setter注射方式。
      Backing Beans
      对于一个web form,我们可以使用一个bean包含其涉及的所有组件,这个bean就称为Backing Bean, Backing Bean的优点是:一个单个类可以封装相关一系列功能的数据和逻辑。
      说白了,就是一个Javabean里包含其他Javabean,互相调用,属于Facade模式或Adapter模式。
      对于一个Backing Beans来说,其中包含了几个managed-bean,managed-bean一定是有scope的,那么这其中的几个managed-beans如何配置它们的scope呢?
    <managed-bean>
      <managed-property>
        <property-name>visit</property-name>
        <value>#{sessionScope.visit}</value>
      </managed-property>
      这里配置了一个Backing Beans中有一个setVisit方法,将这个visit赋值为session中的visit,这样以后在程序中我们只管访问visit对象,从中获取我们希望的数据(如用户登陆注册信息),而visit是保存在session还是application或request只需要配置既可。
      UI界面
      JSF和Struts一样,除了JavaBeans类之外,还有页面表现元素,都是是使用标签完成的,Struts也提供了struts-faces.tld标签库向JSF过渡。
      使用Struts标签库编程复杂页面时,一个最大问题是会大量使用logic标签,这个logic如同if语句,一旦写起来,搞的JSP页面象俄罗斯方块一样,但是使用JSF标签就简洁优美:
    <jia:navigatorItem name="inbox" label="InBox"
      icon="/images/inbox.gif"
      action="inbox"
      disabled="#{!authenticationBean.inboxAuthorized}"/>
      如果authenticationBean中inboxAuthorized返回是假,那么这一行标签就不用显示,多干净利索!
      先写到这里,我会继续对JSF深入比较下去,如果研究过Jdon框架的人,可能会发现,Jdon框架的jdonframework.xml中service配置和managed-bean一样都使用了依赖注射,看来对Javabean的依赖注射已经迅速地成为一种新技术象征,如果你还不了解Ioc模式,赶紧补课。

    JSF在很大程度上类似Struts,而不是类似Tapestry,可以说是一种Struts 2.0,都是采取标签库+组件的形式,只是JSF的组件概念没有象Struts那样必须继承ActionForm的限制;JSF在事件粒度上要细腻,不象Struts那样,一个表单一个事件,JSF可以细化到表单中的每个字段上。
      JSF只有在组件和事件机制这个概念上类似Tapestry,但是不似Tapestry那样是一个完全组件的框架,所以,如果你做一个对页面要求灵活度相当高的系统,选用Tapestry是第一考虑。
      Struts/JSF则适合在一般的数据页面录入的系统中,对于Struts和JSF的选用,我目前个人观点是:如果你是一个新的系统,可以直接从JSF开始;如果你已经使用Struts,不必转换,如果需要切换,可以将JSF和Tapestry一起考虑。
      另外,JSF/Tapestry不只是支持Html,也支持多种客户端语言如WML或XUI等。
      这三者之间关系:如果说Struts是左派;那Tapestry则是右派;而JSF则是中间派,中庸主义是SUN联盟的一贯策略。

  • How to clear memory in MVC when exiting from application using BACK ?

    Hi Friends ,
                I am using the JavaScript back function to exit from my application to the calling page . My BSP application is stateful and MVC based . I am calling my application using the SYSTEM application sample pages for session management - session_single_frame.htm & session_default_frame.htm .
    I am observing that if i run my application in Portal whenever i hit back ..i do return to the calling page but again if i come to my BSP application the old data is seen . If i do the testing outside portal environs it is cleared ..i believe as the session close popup is seen and executes completely .But within portal as the popups are not enabled may be the session clean up is not happening .
    How can I overcome the situation . i dont want to exit as i want the user a way to go back to the calling page directly .
    Appreciate your help in advance.

    it could be because of the caching property of the BSP iview.
    set "Allow Client-Side Caching" of BSP iview to "NO" and try.
    Regards
    Raja

  • Swing based shopping cart application

    hi ,
    i' my porject i need a stand alone java swings based shopping cart application .
    do any one have some examples , so that i can customize it .
    or please provide some links where ican find some example related to this .

    [How to ask questions the smart way|http://catb.org/~esr/faqs/smart-questions.html]
    Especially the part about thanking those who respond to your question. Your track record in this respect is miserable.
    db

  • Video : Modular Application

    First of all thanks for all the wonderful lectures. I went through each of it, and it was simply awesome.
    As we all know that we all now need to know more efficient ways of doing work then just doing work. So it would
    be great if ADOBE TV also includes a video lectures on "Modular applications".
    Because programming and website devlopment can be done by anyone intending to develop, But what we need now is
    fast, efficient and easy to understand websites.
    Fast, complex and efficient websites can be achieved using MODULAR APPLICATION approach.
    Thanks ADOBE TEAM FOR FLEX VIDEO LECTURES.

    Hi jatin4rise,
    There is a team putting together some videos that demonstrates how to use the Flash Platform technologies, such as Flex, Flash Builder, Flash, AIR, etc.  They would like to address your request but need you to elaborate on your idea.  Can you provide more details and examples?

  • Goods Issue based on Goods receipt.

    Hello,
    Can any body suggest query on "Goods Issue based on Goods receipt."
    Scenario :
    Suppose P.O has been created @10/- for 100 Quantity . GR has done for 100/-in Month of June, now another P.O has created @12/-  for 100 Quantity in Month of July  and GR done for the same , I want to Isuue Goods in Month of july and expect system should take price of @10/- for first 100 Quantity and @12/- for the rest quantity.
    Could you advise.?
    Thanks & Regards
    Sudhansu

    Hi,
    For FIFO Configuration,
    1. Ensure FIFO is active tcode OMWE
    2. FIFO maintained at company code or plant level T code: MRLH
    3. Movement type settings for FIFO T code OMW4
    4. Preparation of FIFO in MMR T code: MRF4
    5. Run the FIFO valuation T code MRF1

  • What is the  FM/BAPI  to get the Goods Receipt  Based on the Purchase Order

    Hi ,
    I want FM/BPI  to get the Goods Receipt  Based on the Purchase Order in MM.
    Thnx in advance

    Hi
    BAPI_GOODSMVT_CREATE
    Thanks & Regards
    Kishore

  • Goods-receipt-based invoice verification default for material group

    Hello experts,
    I put by default the option Goods-receipt-based invoice verification when creating a purchase order by tcode ME21N. Now, I would like if possible to only insert the option Goods-receipt-based invoice verification by default for some material group. Is this possible? This behaviour needs to be automatic.
    How can I achieve this behaviour?
    Thanks in advance,
    Best Regards,
    JP
    Edited by: Jeyakanthan A on Nov 20, 2011 11:11 PM

    Dear JP,
    In standard system this is not possible to default this indicator based on Material Group. This can be defaulted from Vendor Master record or Purchasing Info Record or Ticked Manually PO Item Details.
    If you look to enhance you system to do this, I would not advisable you to go with this default option because there can be situation that you order some material without Material Master Record (Like a frame work Order) in that case you will not be able to do GR and there can be conflict.
    You can create Material Group Info. record and default it from there, but again this for scenario where Material Master Record does not exists(Non Stock).
    Hope you find this useful.
    Regards,
    Reetesh

  • Tracking Goods movement based on Serial Number

    Hi All,
    I need expert advise on the following regarding the usage of Serial numbers from MM Perspective:
    1. Whether the Number range for Serial Numbers can be given. This is to take care of the Goods bearing serial numbers, being delivered by the external vendor. I have two options: one to update the stock with the same serial number as given by the vendor & the second is to generate my own serial number for the material.
    2. I also need to track the complete Goods movement based on the Serial Number of the material.
    Pls advise asap.
    Regards,
    Shekhar.

    Hi Kishore,
    Thnx for your prompt response.
    As requested, If I need to update the stock and want to continue with the serial number as given by the vendor (may be in the form of barcode), what config settings are reqd ?
    Secondly, pls advise whether we can assign Number range to the Serial Numbers. Then we need to work upon situation where the serial number provided by the vendor is beyond the specified number range.
    Pls advise.

  • Goods issue based on reservation !

    While performing a goods issue based on a reservation, i can exceed the qty in the reservation, how can i control this so that to prevent the user from posting a goods issue qty more that what in the reservation?
    Thanks
    Ahmed Karam

    hi,
    check the system messages
    go to SE91 check the relavent message, and control the same in system message setting*
    Edited by: Suresh Shenoy on Jan 24, 2008 10:28 AM

  • Using project libraries for both web-based and AIR applications

    I need to develop substantial code to build both web-based and AIR applications.  Yes, they will have different features, especially when it comes to accessing files on the local file system.
    However, 98% of the code can be shared.
    I want to use a project library that can be used for both types of applications. Maybe using conditional compile when required to not use AIR API's in a web-based application.
    I found this (somewhat old) warning:
    Include Adobe AIR libraries Select this option if your library must use AIR features, such as access to the AIR APIs. Flex Builder then changes the library path of this new Flex Library project so that it includes airglobal.swc and airframework.swc. Web-based Flex projects cannot use this library.
    Do not select this option if you are writing a generic library intended to be used only in a web-based Flex application, or in either a web-based or AIR-based application.
    Does this apply to Flash Builder 4.5?

    I have found a workaround, but it's quite clumsy, involving a transfer vector (in old-fashioned terms) in the main application for each function in the AIR library.
    I have created a library for AIR classes only (fourdtext.fileOperations is there). 
    The AIR application provides "Function" values that any other code in the general-purpose libraries can use.
    It works, but it's nasty.
    In Main.mxml:
    import com.fourdtext.fileOperations.AxFiles;
    // this gets a list of native path strings, from and array of "File" objects
    public var AxGetListFunction:Function = AxGetListRedirect;
    private function AxGetListRedirect(list:Array):Vector.<String>{
        return AxFiles.AxGetList(list);
    In general-purpose code:
    var list:Array = event.dragSource.dataForFormat("air:file list") as Array;
    var AxGetList:Function = FlexGlobals.topLevelApplication.AxGetListFunction;
    listFiles = AxGetList(list);

  • Is there a good apple based alternative to the personal. finance software program "quicken for mac"?  It is a poorly supported program.

    Is there a good apple based alternative to the persona finance software program "quicken for mac"?  It is a poorly supported program.

    I switched from Quicken on a Windows computer to iBank on a Mac. It is a very good program, has very good free download connections to financial institutions (optional), and very good reports. The only negative is that it is just different enough from Quicken that there is a learning curve and the first month or two were frustrating -- but that is likely true of anything that you might change to. http://www.iggsoftware.com/ibank/

Maybe you are looking for

  • App Store Not Loading READ HERE!!  DO NOT RESTORE YOUR DEVICE!!

    Ok Applecare Senior Advisor Tad just confirmed with me that the problem people are having with the App Store not loading is an apple issue with there servers, ITS NOT YOUR IPAD so don't go restoring it!   It's not happening to everyone however but th

  • For Loop in Struts ?(without  Container)

    Hi all, Pls tell me how can v use for loop in JSP struts without using scriplets and container . suppose i want to display 20 times "hello world "in jsp .How can i display it using STRUTS as conventionally scriplets are not allowed in it. and Iterato

  • Metdata Query Crippling the Database

    Hi All, We are using ResultSet getProcedureColumns(String catalog,                String schemaPattern,                String procedureNamePattern,                String columnNamePattern) throws SQLException; method of the interface DatabaseMetaData

  • Oracle 11g, Locator and 3D data

    Hi, Could somebody please clarify me about what 3D features in Oracle 11g are included in Locator, and which are part of the Spatial option? The documentation says, "Three-dimensional geometry support: the use of 3D spatial indexing, 3D operators, an

  • No 3G on N73 - Not even menu option

    Hi, all. I got my phone in Brazil, and I'm gonna use it in Argentina. We do have 3G here, but my phone does not seem to pick it. Besides, there's no "Dual Mode" option on the NETWORK menu. Is there any way to activate that? Or are there different N73