Chained Dropdownlistbox - MVC

Hi All,,
   I have 2 dropdownlist box in my view. i.e, COURSEGROUP and COURSE. When an entry in coursegroup listbox is selected , the COURSE listbox should be enabled and corresponding entries should be filled into the list items.
I have initially disabled the COURSE listbox.
I'm not using Model class for data binding.
My problem is:
When an OnSelect event occurs for COURSEGROUP list box, the control of program is going back to DO_REQUEST method and displays the same screen as earlier. The control is not entring the DO_HANDLE_EVENT method of controller..
I can also send the code if required.
Please help me out,,
Thanks in advance,,
Sachidanand.B

Hi,
Check out this weblog for server side operation of chained drop down list box:
/people/durairaj.athavanraja/blog/2004/12/20/bsphow-to-chained-dropdownlistbox
You can also go for client side (JS) check this link.
http://www.dynamicdrive.com/dynamicindex16/chainedselects/index.htm
Regards,
Ravikiran.

Similar Messages

  • Dropdownlistbox in iterator (mvc)

    hi,
    in my bsp i display a table via mvc iterator.
    in the attributes of the iterator tab i have defined <b>m_row_ref as type ref of the table displayed</b>.
    i have created as well a new field that i display in a dropdownlistbox.
    this new field <b>does not belong to the table displayed</b>.
    the question is:
    <u>do i have to add this new field to the table so that m_row_ref contains it?</u>
    <u>or is there another way to know which value of the dropdownlistbox has been selected?</u>.
    Best regards.

    Hi,
    In the Attribute of the Iterator decalre a table which hold the key and the value.
    Example
    LT_SEQ_NO     Instance Attribute     Public     Type     CRMT_PRT_MAP
    Populate the this table where ever you feel comfortable. I would declare constructor method of the iterator and populate it there.
    go to method IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START
    METHOD IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START .
      DATA: lo_text     TYPE REF TO cl_htmlb_textview,
            lo_ddlb     TYPE REF TO cl_htmlb_dropdownlistbox.
      FIELD-SYMBOLS: <dat> TYPE ANY.
      row_ref = p_row_data_ref.
      CASE p_column_key.
        WHEN 'SORT_NUM'.
          CREATE OBJECT lo_ddlb.
          GET REFERENCE  OF lt_seq_no INTO lo_ddlb->table.
          lo_ddlb->id = p_cell_id.
          lo_ddlb->nameofkeycolumn   = 'ENTRY_KEY'.
          lo_ddlb->nameofvaluecolumn = 'ENTRY_VALUE'.
          lo_ddlb->selection = get_column_value( p_column_key ).
          p_replacement_bee = lo_ddlb.
        WHEN OTHERS.
          CREATE OBJECT lo_text.
          lo_text->id       = p_cell_id.
          lo_text->wrapping = 'FALSE'.
          lo_text->text     = get_column_value( p_column_key ).
          lo_text->design   =  'STANDARD'.
          p_replacement_bee = lo_text.
      ENDCASE.
    ENDMETHOD.
    Modify the method as per your need.
    Amandeep
    <b><i>Do reward points for each usefule answer</i>.</b>

  • Hybrid Connection fails for Windows SQL Server 2014 - SSL Provider, error: 0 - The certificate chain was issued by an authority that is not trusted

    Hello,
    I have configured BizTalk Services Hybrid Connection between Standard Azure Website and SQL Server 2014 on premise.
    Azure Management portal shows the status of Hybrid Connection as established.
    However, the website throws an error when trying to open a connection
    <
    addname="DefaultConnection"
    connectionString="Data
    Source=machine name;initial catalog=AdventureWorks2012;Uid=demouser;Password=[my password];MultipleActiveResultSets=True"
    providerName="System.Data.SqlClient"
    />
    (The same website, with the same connection string deployed on SQL Server machine works correctly).
    I tried various options with the connections sting (IP address instead of machine name, Trusted_Connection=False, Encrypt=False, etc. the result is the same
    [Win32Exception (0x80004005): The certificate chain was issued by an authority that is not trusted]
    [SqlException (0x80131904): A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - The certificate chain was issued by an authority that is not trusted.
    I tried various machines - on premise and a clean Azure VM with SQL Server and it results in the same error - below full stack
    The certificate chain was issued by an authority that is not trusted             
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.            
    Exception Details: System.ComponentModel.Win32Exception: The certificate chain was issued by an authority that is not trusted
    Source Error:
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.                  
    Stack Trace:
    [Win32Exception (0x80004005): The certificate chain was issued by an authority that is not trusted]
    [SqlException (0x80131904): A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - The certificate chain was issued by an authority that is not trusted.)]
    System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +5341687
    System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +546
    System.Data.SqlClient.TdsParserStateObject.SNIWritePacket(SNIHandle handle, SNIPacket packet, UInt32& sniError, Boolean canAccumulate, Boolean callerHasConnectionLock) +5348371
    System.Data.SqlClient.TdsParserStateObject.WriteSni(Boolean canAccumulate) +91
    System.Data.SqlClient.TdsParserStateObject.WritePacket(Byte flushMode, Boolean canAccumulate) +331
    System.Data.SqlClient.TdsParser.TdsLogin(SqlLogin rec, FeatureExtension requestedFeatures, SessionData recoverySessionData) +2109
    System.Data.SqlClient.SqlInternalConnectionTds.Login(ServerInfo server, TimeoutTimer timeout, String newPassword, SecureString newSecurePassword) +347
    System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean withFailover) +238
    System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer timeout) +892
    System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance) +311
    System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData) +646
    System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) +278
    System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions) +38
    System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) +732
    System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) +85
    System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) +1057
    System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) +78
    System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) +196
    System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) +146
    System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) +16
    System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry) +94
    System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) +110
    System.Data.SqlClient.SqlConnection.Open() +96
    System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean& closeStoreConnectionOnFailure) +44
    [EntityException: The underlying provider failed on Open.]
    System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean& closeStoreConnectionOnFailure) +203
    System.Data.EntityClient.EntityConnection.Open() +104
    System.Data.Objects.ObjectContext.EnsureConnection() +75
    System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption) +41
    System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable<T>.GetEnumerator() +36
    System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) +369
    System.Linq.Enumerable.ToList(IEnumerable`1 source) +58
    CloudShop.Services.ProductsRepository.GetProducts() +216
    CloudShop.Controllers.HomeController.Search(String SearchCriteria) +81
    CloudShop.Controllers.HomeController.Index() +1130
    lambda_method(Closure , ControllerBase , Object[] ) +62
    System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) +14
    System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +193
    System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +27
    System.Web.Mvc.Async.<>c__DisplayClass42.<BeginInvokeSynchronousActionMethod>b__41() +28
    System.Web.Mvc.Async.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _) +10
    System.Web.Mvc.Async.WrappedAsyncResult`1.End() +50
    System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) +32
    System.Web.Mvc.Async.<>c__DisplayClass39.<BeginInvokeActionMethodWithFilters>b__33() +58
    System.Web.Mvc.Async.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49() +225
    System.Web.Mvc.Async.<>c__DisplayClass37.<BeginInvokeActionMethodWithFilters>b__36(IAsyncResult asyncResult) +10
    System.Web.Mvc.Async.WrappedAsyncResult`1.End() +50
    System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) +34
    System.Web.Mvc.Async.<>c__DisplayClass2a.<BeginInvokeAction>b__20() +23
    System.Web.Mvc.Async.<>c__DisplayClass25.<BeginInvokeAction>b__22(IAsyncResult asyncResult) +99
    System.Web.Mvc.Async.WrappedAsyncResult`1.End() +50
    System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +27
    System.Web.Mvc.<>c__DisplayClass1d.<BeginExecuteCore>b__18(IAsyncResult asyncResult) +14
    System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +23
    System.Web.Mvc.Async.WrappedAsyncResult`1.End() +55
    System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +39
    System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +23
    System.Web.Mvc.Async.WrappedAsyncResult`1.End() +55
    System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +29
    System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +10
    System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult) +25
    System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +23
    System.Web.Mvc.Async.WrappedAsyncResult`1.End() +55
    System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +31
    System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
    System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +9651188
    System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155
    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.36213            
    Regards,
    Michal
    Michal Morciniec

    Same issue here, looking for more information !

  • How to add a UIResponer object in the Responder Chain ?

    Hello,
    I'm quite new in iPhone developement and in Objective-C programming, and I am not very good (of course I'm French :)).
    I'm sure my problem is simple, but I can't find a clear response in the doc and on the Web..
    I have a custom view which implements the touchesBegan, touchesMoved, and touchesEnded methods in order to handle touch screen events. For a clear separation between View and Control (MVC pattern), I want to delegate these events to another class which inherits from the UIResponder class. How can I do that ?
    I think I have to move the touchesBegan and touchesMoved methods into my new UIResponder class, but how can I indicate to the View that it must forward the events to my new UIResponder class ? In the doc (iPhone OS Programming Guide, Event Handling) it is said that we have to modify the Responder Chain, but I don't know how to do that... In the init method of my custom view, I just can't call the becomeFirstResponder method with my UIResponder class as a receiver because the canBecomeFirstResponder return NO.
    Please help me ! I'm sorry to be such a noob.
    Thank you !!

    I think my problem is near to be solved : I have overriden the nextResponder method and returned my UIResponder object in my custom view . So I can handle the touch events in the responder. But the canBecomeFirstResponder still return NO in the init method of my custom view. Does someone know about that and can explain it to me ?
    Thanks !

  • Chained Dropdown in Tableview?

    Hi.  I currently have 2 dropdowns in my Tableview.  I need to make them chained.  I don't know how to trigger an event within the tableview, so that if I select an item in one dropdown, the 2nd dropdown (only for that row) is updated with new values. 
    I had used a blog, and am able to create the chained behavior outside of tableview (on just a plain html page)...I just can't figure out how to trigger event within tableview.   Any help is much appreciated.
    Oh, and my application is NOT MVC.
    Thanks in advance,
    Lisa

    Hi Lisa,
    when you rendered a column as dropdown in table view it should also have an option to trigger an event when you select one entry in that. like OnSelect of dropdown 1 - trigger a event and then handle this event to refresh the droo down 2. I am not sure if you already tried this.

  • How to extend the sap.ui.core.mvc.Controller ?

    We are in the process of building a web application that allows users to "plugin" their own views (pages). When they create there own views there are a number of activities that are common across all pages that occur in the onInit() and onExit() methods, additionally, we may provide additional utility functions that should be available to the controller.
    Currently when creating a controller the standard is to use sap.ui.controller("some.name", { controller specific functionality } );  I would like to create a sap.ui.MyController("some.name", { controller specific functionality }); that contains the utility functions and extra functionality in the LifeCycle methods so that these are automatically available to anyone defining this type of controller.
    I believe the documentation I need to reference is boilerplate code for typed Controller however I am unsure on how this can be used
    I assume that I define the controller abc/xyz/MYController.js
    jQuery.sap.declare({modName:"abc.xyz.MYController", type:"controller"}); // declaring a special type of module
    abc.xyz.MYController = function () { // the constructor
        sap.ui.core.mvc.Controller.apply(this, arguments);
    jQuery.sap.require("sap.ui.core.mvc.Controller"); // this is currently required, as the Controller is not loaded by default
    abc.xyz.MYController.prototype = jQuery.sap.newObject(sap.ui.core.mvc.Controller.prototype); // chain the prototypes
    /* end of boilerplate code for typed Controller */
    abc.xyz.MYController.prototype.onInit = function() {
        // modify control tree - this is the regular lifecycle hook
        console.log("Inside my new controller.");
    Then use it in app/pageController.controller.js ...
    jQuery.sap.require("abc.xyz.MYController");
    abc.xyz.MYController("app.pageController", { ..... });
    When I try this I get the Error
    Uncaught Error: failed to load 'app/pageController.controller.js' from /mywebapp/js/app/pageController.controller.js: Error: Controller type app.pageController is still undefined after trying to load it. sap-ui-core-all-dbg.js:20313requi
    Any help with this would be appreciated.
    Regards,
    Trevor

    Hi Trevor
    may this code snippet will help.
        jQuery.sap.declare("example.MyController");
        jQuery.sap.require("sap.ui.core.mvc.Controller");
        "use strict";
        sap.ui.core.mvc.Controller.extend("example.MyController", {
            onInit: function () {
    -D

  • I really needed this one implementation of tree table on mvc

    hi there i'm burning my as* reading some tutorials about tree table and all i found was a complex codes
    i just wanna know if you know some codes of a simple tree table where in the content of a tree or table was hardcoded and there are no thingy effects such as sortes. coz i really wanted to implement this on mvc since we are using STable here's the sample code:
    View:
    package treeTable;
    import java.awt.*;
    //import java.awt.event.MouseEvent;
    //import java.util.EventObject;
    import javax.swing.*;
    //import javax.swing.table.TableCellEditor;
    //import javax.swing.table.TableCellRenderer;
    import javax.swing.table.TableColumnModel;
    //import javax.swing.tree.DefaultTreeCellRenderer;
    //import javax.swing.tree.DefaultTreeSelectionModel;
    //import javax.swing.tree.TreeCellRenderer;
    //import javax.swing.tree.TreeModel;
    //import javax.swing.tree.TreePath;
    import javax.swing.border.*;
    //import javax.swing.event.ListSelectionEvent;
    //import javax.swing.event.ListSelectionListener;
    import com.jgoodies.forms.layout.CellConstraints;
    import com.jgoodies.forms.layout.FormLayout;
    //import com.borland.jbcl.layout.*;
    import org.scopemvc.core.Control;
    import org.scopemvc.core.Selector;
    import org.scopemvc.view.swing.*;
    * View for PosCCYFX
    * @author Raymond Isip
    public class HistoricTotalPositionByCurrencyFXView extends SPanel implements HistoricTotalPositionByCurrencyFXConstants {
    // Instance variables for the selectors used by the JBuilder designer
    Selector cashStructTBLSelector = CASH_STRUCT_TBL_SELECTOR;
    Selector selectedCashStructTBLSelector = SELECTED_CASH_STRUCT_TBL_SELECTOR;
    Selector optionsTBLSelector = OPTIONS_TBL_SELECTOR;
    Selector selectedOptionsTBLSelector = SELECTED_OPTIONS_TBL_SELECTOR;
    Selector fxcashStructuredFwdLBLSelector = FXCASH_STRUCTURED_FWD_LBL_SELECTOR;
    Selector cashLBLSelector = CASH_LBL_SELECTOR;
    Selector structFwdsLBLSelector = STRUCT_FWDS_LBL_SELECTOR;
    Selector optionsLBLSelector = OPTIONS_LBL_SELECTOR;
         FormLayout MainFormLayout = new FormLayout ("12,p,12,p,12", "11,p,11");
         FormLayout LeftFormLayout = new FormLayout ("280,250,87", "p,p");
         FormLayout LeftTableFormLayout = new FormLayout ("p", "p,p");
         FormLayout RightTableFormLayout = new FormLayout ("300", "p,p");
         FormLayout LeftSubFormLayout = new FormLayout ("100,50,100", "p");
         CellConstraints cc = new CellConstraints();
    Border cashStructTBLBorder;
    STable cashStructTBLTable = new STable();
    JScrollPane cashStructTBLScrollPane = new JScrollPane(cashStructTBLTable);
    Border optionsTBLBorder;
    STable optionsTBLTable = new STable();
    JScrollPane optionsTBLScrollPane = new JScrollPane(optionsTBLTable);
    JLabel fxcashStructuredFwdLBLLabel = new JLabel();
    SLabel fxcashStructuredFwdLBLSLabel = new SLabel();
    JLabel cashLBLLabel = new JLabel();
    SLabel cashLBLSLabel = new SLabel();
    JLabel structFwdsLBLLabel = new JLabel();
    SLabel structFwdsLBLSLabel = new SLabel();
    JLabel optionsLBLLabel = new JLabel();
    SLabel optionsLBLSLabel = new SLabel();
    * Constructor for the PosCCYFXView object
    public HistoricTotalPositionByCurrencyFXView() {
    jbInit();
    * The main program for the PosCCYFXView class
    * @param args The command line arguments
    public static void main(String[] args) {
              HistoricTotalPositionByCurrencyFXView view = new HistoricTotalPositionByCurrencyFXView();
    JFrame frame = new JFrame();
    frame.setSize(800, 600);
    frame.getContentPane().add(view);
    frame.setVisible(true);
    * Used by Scope to set the window frame title.
    * @return The title value
    public String getTitle() {
    return "PosCCYFX";
    * Used by Scope to end the application when the window is closed.
    * @return The closeControl value
    public Control getCloseControl() {
    return new Control(HistoricTotalPositionByCurrencyFXController.EXIT_CONTROL_ID);
    * Description of the Method
    * @return Description of the Return Value
    public boolean validateForm() {
    return true;
    private void jbInit() {
    this.setLayout(MainFormLayout);
         JPanel LeftPanel = new JPanel();
         JPanel LeftSubPanel = new JPanel();
         JPanel LeftTablePanel = new JPanel();
              JPanel RightTablePanel = new JPanel();
         LeftPanel.setLayout(LeftFormLayout);
              LeftSubPanel.setLayout(LeftSubFormLayout);
              LeftTablePanel.setLayout(LeftTableFormLayout);
              RightTablePanel.setLayout(RightTableFormLayout);
              JScrollPane LeftScrollPane = new JScrollPane(LeftTablePanel);
              //LeftScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
              LeftScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_NEVER);
              JScrollPane RightScrollPane = new JScrollPane(RightTablePanel);
              RightScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
              RightScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_NEVER);
              LeftScrollPane.setPreferredSize(new Dimension(620,330));
              RightScrollPane.setPreferredSize(new Dimension(300,330));
    cashStructTBLTable.setSelector(cashStructTBLSelector);
    cashStructTBLTable.setSelectionSelector(selectedCashStructTBLSelector);
    String[] columnSelects = {"col1", "col2", "col3", "col4", "col5","col6", "col7", "col8", "col9", "col10"};
    String[] columnNames = {"USD", "Date","Product Type", "Details", "Buy", "Sell", "Sub Total", "Buy", "Sell", "Total"};
    int colWidths[] = {100,70,70,40,50,50,60,50,50,60};
    cashStructTBLTable.setColumnSelectors(columnSelects);
    cashStructTBLTable.setColumnNames(columnNames);
    cashStructTBLTable.setPreferredScrollableViewportSize(new Dimension(600,273));
    TableColumnModel cashStructTBLModel = cashStructTBLTable.getColumnModel();
    for (int x=0; x<colWidths.length; x++) {
    int width = colWidths[x];
    cashStructTBLModel.getColumn(x).setPreferredWidth(width);}
              cashStructTBLTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
    cashStructTBLScrollPane.setBorder(cashStructTBLBorder);
    cashStructTBLScrollPane.getViewport().add(cashStructTBLTable, null);
    optionsTBLTable.setSelector(optionsTBLSelector);
    optionsTBLTable.setSelectionSelector(selectedOptionsTBLSelector);
    String[] columnSelects1 = {"col1", "col2", "col3"};
    String[] columnNames1 = {"Buy", "Sell", "Total"};
    int colWidths1[] = {90,90,100};
    optionsTBLTable.setColumnSelectors(columnSelects1);
    optionsTBLTable.setColumnNames(columnNames1);
    optionsTBLTable.setPreferredScrollableViewportSize(new Dimension(300,290));
    TableColumnModel optionsTBLModel = optionsTBLTable.getColumnModel();
    for (int x1=0; x1<colWidths1.length; x1++) {
    int width1 = colWidths1[x1];
    optionsTBLModel.getColumn(x1).setPreferredWidth(width1); }
              optionsTBLTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
    optionsTBLScrollPane.setBorder(optionsTBLBorder);
    optionsTBLScrollPane.getViewport().add(optionsTBLTable, null);
              optionsTBLTable.setEnabled(false);
    fxcashStructuredFwdLBLLabel.setText(" FX Cash & Structured Forwards");
              fxcashStructuredFwdLBLLabel.setBorder(BorderFactory.createRaisedBevelBorder());
              cashLBLLabel.setText(" Cash");
              cashLBLLabel.setBorder(BorderFactory.createRaisedBevelBorder());
              structFwdsLBLLabel.setText(" Structured FWDs");
              structFwdsLBLLabel.setBorder(BorderFactory.createRaisedBevelBorder());
              optionsLBLLabel.setText(" Options");
              optionsLBLLabel.setBorder(BorderFactory.createRaisedBevelBorder());
              /******************************Fillers*************************************/
    JLabel sample = new JLabel(" ");
              JLabel sample1 = new JLabel(" ");
              JLabel sample2 = new JLabel(" ");
              JLabel sample3 = new JLabel(" ");
              JLabel sample4 = new JLabel(" ");
              sample.setBorder(BorderFactory.createRaisedBevelBorder());
              sample1.setBorder(BorderFactory.createRaisedBevelBorder());
              sample2.setBorder(BorderFactory.createRaisedBevelBorder());
              sample3.setBorder(BorderFactory.createRaisedBevelBorder());
              sample4.setBorder(BorderFactory.createRaisedBevelBorder());
              LeftSubPanel.add(sample, cc.xy(2,1));
              LeftPanel.add(sample1, cc.xy(1,1));
              LeftPanel.add(sample2, cc.xy(3,1));
              LeftPanel.add(sample3, cc.xy(1,2));
              LeftPanel.add(sample4, cc.xy(3,2));
              LeftSubPanel.add(cashLBLLabel, cc.xy(1,1));
              LeftSubPanel.add(structFwdsLBLLabel, cc.xy(3,1));
              LeftPanel.add(fxcashStructuredFwdLBLLabel, cc.xy(2,1));
              LeftPanel.add(LeftSubPanel, cc.xy(2,2));
              LeftTablePanel.add(LeftPanel, cc.xy(1,1));
              LeftTablePanel.add(cashStructTBLScrollPane, cc.xy(1,2));
              RightTablePanel.add(optionsLBLLabel, cc.xy(1,1));
              RightTablePanel.add(optionsTBLScrollPane, cc.xy(1,2));
              this.add(LeftScrollPane, cc.xy(2,2));
              this.add(RightScrollPane, cc.xy(4,2));
    Model:
    package treeTable;
    import java.util.ArrayList;
    import java.util.List;
    import org.scopemvc.core.ModelChangeEvent;
    import org.scopemvc.core.Selector;
    import org.scopemvc.model.basic.*;
    import org.scopemvc.model.collection.ListModel;
    * Model for for PosCCYFX
    * @author Raymond Isip
    public class HistoricTotalPositionByCurrencyFXModel extends BasicModel implements HistoricTotalPositionByCurrencyFXConstants {
    private ListModel cashStructTBLList = new ListModel();
    private CashStructTBLItem selectedCashStructTBL = null;
    private ListModel optionsTBLList = new ListModel();
    private OptionsTBLItem selectedOptionsTBL = null;
    private String fxcashStructuredFwdLBL;
    private String cashLBL;
    private String structFwdsLBL;
    private String optionsLBL;
    * Constructor for the PosCCYFXModel object
    public HistoricTotalPositionByCurrencyFXModel() {
              Object[] data1= new Object[]{"100","100","200"};
              Object[] data2= new Object[]{"","29.Apr.2004","Forward","SGD","200","100","300","250","150","400"};
              for(int x = 0; x<=25;x++){
                   selectedOptionsTBL = new OptionsTBLItem(data1);
                   optionsTBLList.add(selectedOptionsTBL);
                   selectedCashStructTBL = new CashStructTBLItem(data2);
                   cashStructTBLList.add(selectedCashStructTBL);
    * Gets the cashStructTBL list
    * @return The cashStructTBL list
    public List getCashStructTBLList() {
    return cashStructTBLList;
    * Sets the cashStructTBL list
    * @param newCashStructTBLList The new cashStructTBL list
    public void setCashStructTBLList(List newCashStructTBLList) {
    cashStructTBLList.setList(newCashStructTBLList);
    this.fireModelChange(ModelChangeEvent.VALUE_CHANGED, CASH_STRUCT_TBL_SELECTOR);
    * Gets the selected cashStructTBL item
    * @return A cashStructTBL item
    public CashStructTBLItem getSelectedCashStructTBL() {
    return selectedCashStructTBL;
    * Sets the selected cashStructTBL item
    * @param newCashStructTBL The new cashStructTBL item
    public void setSelectedCashStructTBL(CashStructTBLItem newCashStructTBL) {
    selectedCashStructTBL = newCashStructTBL;
    this.fireModelChange(ModelChangeEvent.VALUE_CHANGED, SELECTED_CASH_STRUCT_TBL_SELECTOR) ;
    * Gets the optionsTBL list
    * @return The optionsTBL list
    public List getOptionsTBLList() {
    return optionsTBLList;
    * Sets the optionsTBL list
    * @param newOptionsTBLList The new optionsTBL list
    public void setOptionsTBLList(List newOptionsTBLList) {
    optionsTBLList.setList(newOptionsTBLList);
    this.fireModelChange(ModelChangeEvent.VALUE_CHANGED, OPTIONS_TBL_SELECTOR);
    * Gets the selected optionsTBL item
    * @return A optionsTBL item
    public OptionsTBLItem getSelectedOptionsTBL() {
    return selectedOptionsTBL;
    * Sets the selected optionsTBL item
    * @param newOptionsTBL The new optionsTBL item
    public void setSelectedOptionsTBL(OptionsTBLItem newOptionsTBL) {
    selectedOptionsTBL = newOptionsTBL;
    this.fireModelChange(ModelChangeEvent.VALUE_CHANGED, SELECTED_OPTIONS_TBL_SELECTOR) ;
    * Gets the fxcashStructuredFwdLBL attribute
    * @return The fxcashStructuredFwdLBL value
    public String getFxcashStructuredFwdLBL() {
    return fxcashStructuredFwdLBL;
    * Sets the fxcashStructuredFwdLBL attribute
    * @param newFxcashStructuredFwdLBL The new fxcashStructuredFwdLBL value
    public void setFxcashStructuredFwdLBL(String newFxcashStructuredFwdLBL) {
    fxcashStructuredFwdLBL = newFxcashStructuredFwdLBL;
    this.fireModelChange(ModelChangeEvent.VALUE_CHANGED, FXCASH_STRUCTURED_FWD_LBL_SELECTOR);
    * Gets the cashLBL attribute
    * @return The cashLBL value
    public String getCashLBL() {
    return cashLBL;
    * Sets the cashLBL attribute
    * @param newCashLBL The new cashLBL value
    public void setCashLBL(String newCashLBL) {
    cashLBL = newCashLBL;
    this.fireModelChange(ModelChangeEvent.VALUE_CHANGED, CASH_LBL_SELECTOR);
    * Gets the structFwdsLBL attribute
    * @return The structFwdsLBL value
    public String getStructFwdsLBL() {
    return structFwdsLBL;
    * Sets the structFwdsLBL attribute
    * @param newStructFwdsLBL The new structFwdsLBL value
    public void setStructFwdsLBL(String newStructFwdsLBL) {
    structFwdsLBL = newStructFwdsLBL;
    this.fireModelChange(ModelChangeEvent.VALUE_CHANGED, STRUCT_FWDS_LBL_SELECTOR);
    * Gets the optionsLBL attribute
    * @return The optionsLBL value
    public String getOptionsLBL() {
    return optionsLBL;
    * Sets the optionsLBL attribute
    * @param newOptionsLBL The new optionsLBL value
    public void setOptionsLBL(String newOptionsLBL) {
    optionsLBL = newOptionsLBL;
    this.fireModelChange(ModelChangeEvent.VALUE_CHANGED, OPTIONS_LBL_SELECTOR);
    Controller:
    package treeTable;
    import java.awt.Dimension;
    import org.scopemvc.controller.basic.BasicController;
    import org.scopemvc.core.Control;
    import org.scopemvc.core.ControlException;
    * Controller for PosCCYFX
    * @author Raymond Isip
    public class HistoricTotalPositionByCurrencyFXController extends BasicController implements HistoricTotalPositionByCurrencyFXConstants {
    * Constructor for the PosCCYFXController object
    public HistoricTotalPositionByCurrencyFXController() {
    setModel(new HistoricTotalPositionByCurrencyFXModel());
    setView(new HistoricTotalPositionByCurrencyFXView());
         public HistoricTotalPositionByCurrencyFXController(HistoricTotalPositionByCurrencyFXView view) {
              setModel(new HistoricTotalPositionByCurrencyFXModel());
              setView(view);
    * Call this after creating the Controller to make it perform
    * its initial action. Default impl opens the view in a new frame.
    public void startup() {
              HistoricTotalPositionByCurrencyFXView myView = (HistoricTotalPositionByCurrencyFXView) getView();
    // This is the code that centers the view
    myView.setViewBounds(myView.CENTRED);
    myView.setPreferredSize(new Dimension(1000, 600));
    showView(myView);
    * Can be called by a parent to shutdown and remove this from
    * the chain of responsibility. Default impl does this:
    * <ul>
    * <li>call shutdown() on every child controller</li>
    * <li>call hideView()</li>
    * <li>setParent(null)</li>
    * </ul>
    public void shutdown() {
    super.shutdown();
    * Handles all controls
    * @param inControl The control token invoking the presentation logic
    * @throws ControlException when an error occured while handling the control
    protected void doHandleControl(Control inControl) throws ControlException {
    try {
    if (inControl.matchesID(SAVE)) {
    inControl.markMatched();
    doSave();
    } else if (inControl.matchesID(RESET)) {
    inControl.markMatched();
    doReset();
    } else if (inControl.matchesID(GOT_OPTIONS_TBL)) {
    inControl.markMatched();
    doGotOptionsTbl();
    } catch (ControlException ce) {
    throw ce;
    } catch (RuntimeException re) {
    re.printStackTrace();
    throw re;     
    } finally {
    // do cleanup
    * Handles the SAVE control
    * @todo Implement doSave
    protected void doSave() throws ControlException {
    // to implement
    * Handles the RESET control
    * @todo Implement doReset
    protected void doReset() throws ControlException {
    // to implement
    * Handles the GOT_OPTIONS_TBL control
    * @todo Implement doGotOptionsTbl
    protected void doGotOptionsTbl() throws ControlException {
    // to implement
    Launcher:
    package treeTable;
    import org.scopemvc.util.ResourceLoader;
    import org.scopemvc.util.UIStrings;
    * Launcher for PosCCYFX
    * @author Raymond Isip
    public class HistoricTotalPositionByCurrencyFXLauncher {
    * Constructor for the PosCCYFXLauncher object
    public HistoricTotalPositionByCurrencyFXLauncher() {
    * Start the PosCCYFX application
    * @param args The command line arguments
    public static void main(String[] args) {
    // TODO: change 'resources' by the name of your properties file
    UIStrings.setPropertiesName("resources");
    ResourceLoader.setClientClassLoader(HistoricTotalPositionByCurrencyFXLauncher.class.getClassLoader());
              HistoricTotalPositionByCurrencyFXController mainController = new HistoricTotalPositionByCurrencyFXController();
    mainController.startup();
    Constant:
    package treeTable;
    import org.scopemvc.core.Selector;
    * Constants for the selectors and the control ids defined in PosCCYFX
    * @author Raymond Isip
    public interface HistoricTotalPositionByCurrencyFXConstants {
    // Selectors
    Selector CASH_STRUCT_TBL_SELECTOR = Selector.fromString("cashStructTBLList");
    Selector SELECTED_CASH_STRUCT_TBL_SELECTOR = Selector.fromString("selectedCashStructTBL");
    Selector OPTIONS_TBL_SELECTOR = Selector.fromString("optionsTBLList");
    Selector SELECTED_OPTIONS_TBL_SELECTOR = Selector.fromString("selectedOptionsTBL");
    Selector FXCASH_STRUCTURED_FWD_LBL_SELECTOR = Selector.fromString("fxcashStructuredFwdLBL");
    Selector CASH_LBL_SELECTOR = Selector.fromString("cashLBL");
    Selector STRUCT_FWDS_LBL_SELECTOR = Selector.fromString("structFwdsLBL");
    Selector OPTIONS_LBL_SELECTOR = Selector.fromString("optionsLBL");
    // Control IDs
    * The SAVE control ID for the save button
    String SAVE = "SAVE";
    * The RESET control ID for the reset button
    String RESET = "RESET";
    * The GOT_OPTIONS_TBL control ID for the optionsTBL field
    String GOT_OPTIONS_TBL = "GOT_OPTIONS_TBL";
    CashStructTBLItem:
    package treeTable;
    * Item for CashStructTBL
    * @author Raymond Isip
    public class CashStructTBLItem {
         String col1= new String();
         String col2= new String();
         String col3= new String();
         String col4= new String();
         String col5= new String();
         String col6= new String();
         String col7= new String();
         String col8= new String();
         String col9= new String();
         String col10= new String();
    * Constructor for the CashStructTBLItem object
         public CashStructTBLItem(Object[] data1) {
              setCol1((String)data1[0]);
              setCol2((String)data1[1]);
              setCol3((String)data1[2]);
              setCol4((String)data1[3]);
              setCol5((String)data1[4]);
              setCol6((String)data1[5]);     
              setCol7((String)data1[6]);
              setCol8((String)data1[7]);
              setCol9((String)data1[8]);     
              setCol10((String)data1[9]);
         * @return
         public String getCol1() {
              return col1;
         * @return
         public String getCol10() {
              return col10;
         * @return
         public String getCol2() {
              return col2;
         * @return
         public String getCol3() {
              return col3;
         * @return
         public String getCol4() {
              return col4;
         * @return
         public String getCol5() {
              return col5;
         * @return
         public String getCol6() {
              return col6;
         * @return
         public String getCol7() {
              return col7;
         * @return
         public String getCol8() {
              return col8;
         * @return
         public String getCol9() {
              return col9;
         * @param string
         public void setCol1(String string) {
              col1 = string;
         * @param string
         public void setCol10(String string) {
              col10 = string;
         * @param string
         public void setCol2(String string) {
              col2 = string;
         * @param string
         public void setCol3(String string) {
              col3 = string;
         * @param string
         public void setCol4(String string) {
              col4 = string;
         * @param string
         public void setCol5(String string) {
              col5 = string;
         * @param string
         public void setCol6(String string) {
              col6 = string;
         * @param string
         public void setCol7(String string) {
              col7 = string;
         * @param string
         public void setCol8(String string) {
              col8 = string;
         * @param string
         public void setCol9(String string) {
              col9 = string;
    OptionsTBLItem:
    package treeTable;
    * Item for OptionsTBL
    * @author Raymond Isip
    public class OptionsTBLItem {
         String col1= new String();
         String col2= new String();
         String col3= new String();
    * Constructor for the OptionsTBLItem object
         public OptionsTBLItem(Object[] data1) {
              setCol1((String)data1[0]);
              setCol2((String)data1[1]);
              setCol3((String)data1[2]);
         * @return
         public String getCol1() {
              return col1;
         * @return
         public String getCol2() {
              return col2;
         * @return
         public String getCol3() {
              return col3;
         * @param string
         public void setCol1(String string) {
              col1 = string;
         * @param string
         public void setCol2(String string) {
              col2 = string;
         * @param string
         public void setCol3(String string) {
              col3 = string;
    All I want is for the tree table renderers or editors to use the table created on the vieew part of this mvc
    i will greatly appreciates your help

    As a start point take sources of JTable (the component and datamodel) and rebuild them. I have made such component for my company product. To write it I spend 5 days and about two weeks for debugging. This code cannot be very simple. As it should be fully mutable. For example, each line should have bkcolor, fgcolor, font, etc. Each sell has bkcolor, fgcolor, font, insets, border, alighnment, visibility, etc. Each node has its cell, indent and array of data cells. To support fast scrolling the painting should be buffered. My components also supports text line wrapping. The tree component consists of three parts: the header, the left part and the matrix of data. This component can be printed (this is a secial code for paging and scaling).

  • Ann: North East Conference on MVC Frameworks and Struts in 3 weeks:

    Ann: North East Conference on MVC Frameworks and Struts in 3 weeks:
    Most people already know what MVC is, once you know what it is, here is the next step. Presenting will be the popular frameworks and components in use by 8 speakers:
    -Ted Husted – Author – Struts Chains/2.0 – the dominant framework in use, from Ziff Davis, to Apple Store to most large commercial sites.
    Husted.com
    -Rod Johnson – Author – EJB/Spring
    springFrameWork.com
    -Christophe Coenraets – Flex-MacroMedia - “back to rich UI w/SOA” (Great blog entry on Struts + Flex)
    markMe.com/cc
    -Howard Lewis Ship – Author – HiveMind (SOA, IOC, AOP) – commonly referred to as “the next big thing”
    javaTapestry.blogspot.com
    -Clinton Begin – DAO/iBatis/SQLMaps – the best DAO layer
    imo, used by Spring, jPetStore, basicPortal, etc.
    -Matt Raible – Author – displayTag/strutsMenu – (displayTag is my favorite J2EE component)
    Raibledesigns.com
    -Jason Carreira – WebWork 2
    freeroller.net/page/jCarreira
    - Vic Cekvenich – Author – basicPortal (J2EZ – easy and simple to customize application for membership, portal, cms, community, store, etc. using bestPractices for large, profitable commercial sites. )
    + more
    You will get a CD mailed to you once you register.
    April 3rd from 8AM to 7PM in NYC at nyhotel.com, next to MSG. Advertised in JDJ, NY Times, etc. My guess is that you won’t find half as many good sessions at Sun’s Java One.
    It $99 to register now at baseBeans.com, in a few day's price keeps going up.

    Hey Jan,
    Oracle's E-Business suite is moving to a JSF solution. This is really for three main reasons (abbreviated version):
    1) JSF is much more focused on the 'view' components. The component model has a clean separation of the component definition from its rendering. This, among many other things, allows us to provide a consistent development environment and APIs for developers building apps for browsers, mobile devices, telnet devices, etc.
    2) JSF has a better defined lifecycle. The JSF lifecycle maps much closer to the phases that enterprise applications need when processing data from a web application. We are able to easily extend this to add things not currently in the spec, like portlets, wireless, etc., as well as more easily plug new components into the framework.
    3) Once you remove the JSP tags & FormBean from Struts, all you are left with is the navigation. There is nothing special in the Struts navigation that would cause us to try to make the two technologies work together. In fact, the Faces navigation will not be robust enough in its current form to support the declarative navigation requirements for Oracle apps. We plan to extend the JSF navigation and then work to submit that back into the standards.
    Hope this helps,
    Ted Farrell
    Oracle Corporation.

  • MVC Drop Down List Event Handler

    Hello,
    I am trying to create a bsp page using MVC design pattern. I have 3 drop down list fields which are dependent on each other. Example: When you select a value in list 1, drop down list 2 becomes enabled for selection with values based on list 1. At this point of time list 3 should be disabled. Once you select value from 2, list 3 becomes enabled with values based on list 2 selection.
    I have seen a webblog on this topic from Raja but it was designed for bsp page flow design. Could you please guide how do I achieve this in MVC?
    Please help.
    This is what I did:
    I have 1 controller and 1 view.
    In my view:
    =========================================================
    <htmlb:gridLayoutCell columnIndex="2" rowIndex="1">
    <htmlb:dropdownListBox id = "DDLB_PLANT"
             tooltip          = "Plant"
             table            = "<%= v_plants %>"
             onSelect         = "DDLB_PLANTEvent"
             selection        = "<%= v_plantsel %>">
             nameOfKeyColumn  = "WERKS"
             nameOfValueColumn= "DESC_TEXT">
    </htmlb:dropdownListBox>
    </htmlb:gridLayoutCell>
    <htmlb:gridLayoutCell columnIndex="2" rowIndex="2">
    <htmlb:dropdownListBox id = "DDLB_SHIFT"
             tooltip          = "Shift"
             table            = "<%= v_shifts %>"
             onSelect         = "DDLB_SHIFTEvent"
             selection        = "<%= v_shiftsel %>">
             nameOfKeyColumn  = "SHIFT"
             nameOfValueColumn= "SDESC">
    </htmlb:dropdownListBox>
    </htmlb:gridLayoutCell>
    where v_plants and v_shifts are page attributes (table) that is being populated in DO_REQUEST method of controller. v_plantsel and v_shiftsel are type string (page attribute).
    In DO_HANDLE_EVENT (controller)
    DATA: event_id   TYPE REF TO if_htmlb_data,
          ddlb_event TYPE REF TO cl_htmlb_event_selection,
          data       TYPE REF TO cl_htmlb_dropdownlistbox.
    event_id = cl_htmlb_manager=>get_event( request ).
    IF event_id IS NOT INITIAL.
       ddlb_event ?= event_id.
       IF ddlb_event->id EQ 'DDLB_PLANTEvent'.
          c_plantsel = ddlb_event->selection.
       ELSEIF ddlb_event->id EQ 'DDLB_SHIFTEvent'.
          c_shiftsel = ddlb_event->selection.
          CLEAR data.
          data ?= cl_htmlb_manager=>get_data( request      = runtime->server->request
    name         = 'dropdownListBox'
    id           = 'DDLB_PLANTEvent'
    IF data IS NOT INITIAL.
      c_plantsel = data->selection.
    ENDIF.
    ENDIF.
    ENDIF.
    =========================================================
    Thanks,
    Partho

    I though I was able to bind my dropdown return value but this is the error I am getting:
    "Field symbol has not yet been assigned"
    Here is what I am doing:
    Model
    =====
    populate plants
      SELECT werks name1
      FROM   T001W
      INTO   TABLE M_PLANTS
      order by name1.
      where m_plants & m_plantcode has been defined as model attributes.
    Controller
    ==========
    DO_INIT
    *create model instance
    cmodelsetup ?= create_model( model_id   = 'm'
                                 class_name = 'ZPES_SETUP_MODEL' ).
    if cmodelsetup is bound.
       cmodelsetup->getplants( ).
    endif.
    DO_REQUEST
    data: v_setupreview type ref to if_bsp_page.
    dispatch_input( ).
    if is_navigation_requested( ) is not initial.
       return.
    endif.
    create view instance
    v_setupreview = create_view( view_name = 'zsetupreview.htm').
    v_setupreview->set_attribute( name = 'vmodelsetup'      value = cmodelsetup ).
    call_view( v_setupreview ).
    View
    ====
                  <htmlb:gridLayoutCell columnIndex="1" rowIndex="1">
                     <htmlb:label for = "plant" text="Plant" />
                  </htmlb:gridLayoutCell>
                  <htmlb:gridLayoutCell columnIndex="2" rowIndex="1">
                      <htmlb:dropdownListBox id        = "DDLB_PLANT"
                                      tooltip          = "Plant"
                                      table            = "//vmodelsetup/m_plants"
                                      onSelect         = "DDLB_PLANT"
                                      selection        = "//vmodelsetup/m_plantcode"
                                      nameOfKeyColumn  = "WERKS"
                                      nameOfValueColumn= "DESC_TEXT">
                      </htmlb:dropdownListBox>
                  </htmlb:gridLayoutCell>
    PLEASE HELP!!!
    Thanks,
    Partho

  • Mvc - connection pool - jstl - oh my!

    I am trying to understand how to use the mvc model to break my existing jsp's up. I finally got my connection pool working yesterday(yay!) so now I want to get everything organized into servlets. My understanding of servlets sucks - and I have not written one yet. Researching it on the net hasnt helped much - a bit overwhelming..
    Please tell me if my logic is on track or not - keeping in mind the mvc model - keeping in mind I dont know how to write a servlet : )
    DATABASE package;
    public static dbpool getConnection() {
         // write JNDI information
    public static void dbpoolClose(Connection connDB) {
         // close connection
    }Then in a servlet I would try to write something like this...
    MyBean {
    // call the connection method
    - do crud operations
    - use getters and setters
    - close statements that I have open
    // call the close connection method
    }Then in my JSP( I have JSTL working YAY!!) I wil call the bean/getters/setters and use JSTL to manipulate and present the data? Is this close to being in the MVC model?
    I havent found an example using the mvc using a connection pool, database operations and a jsp - that I have been able to understand.. so If I am waay off.. sorry.

    Basically, use the servlet to tell other classes what to do (these can be other servlets or whatever).
    Those classes prepare the data you want to have the JSPs show and process the data returned from the JSPs.
    The JSP does nothing except display data presented to it by the servlet (and may have URLs or forms to provide input to servlets.
    At its simplest, there's no controller at all (so no C). A JSP calls a servlet which processes the data sent to it and prepares new data for another (or the same) JSP to which it forwards the request when done.
    That data can be stored in the Http session or (sometimes) better in the request.
    More usually, a controller will receive all requests from and determine to what servlet to send them.
    The servlet then either determines on its own to which JSP to send the results or gives those results back to the controller which will do that for them and forward to the proper JSP.
    If needed you can thus chain requests so that a request goes to a servlet, from there to another servlet and then to a JSP (for example), each time via the controller.
    This can be handy to break up complex processing in small steps where those small steps could also occur separate.

  • Dropdownlistbox

    Hello,
    we have 2 dropdownlistboxes in a MVC based BSP Applikation. Depending the selection of the first dropdownlistbox, we want to set the attribute "disabled" of the second dropdownlistbox, so the user cannot select anymore from the second dropdownlistbox.
    If we switch back the selection of the first dropdownlistbox the user should be able again to select values from the second one.
    it works fine the first time we call the page, but not when we change the selection.
    any help is greatly appreciated.
    thx and regards from Michael

    Hi Mike,
    glad to help.
    The issue with binding to the model is that the user interaction forces a HTTP request back to the server whereas the client-side scripting technique does not.
    IMHO the server callback diminishes the user experience.
    Cheers
    Graham Robbo

  • Process Chain - Delete File from Application Server

    Hi Gurus,
    Im working with Process chain, and i have a load from a flat file, so my question is :
    How can i delete that file from the application server after was loaded ?
    THANKS IN ADVANCED !!! I REALLY APRECCIATE YOUR HELP.
    Marcos

    hi,
    I have gone through the forum you have posted for deleting files from application server through process chain.
    I have similar reuirement in my project.
    Can you please provide me the solution?
    Your inputs will be highly appreciated.
    Thanks in advance.
    Regards,
    Lavanya.

  • I have a MBPro mid 2013 with 1 Thunderbolt port. Just bought a Mac monitor and want to daisy chain a PC monitor to it. Use a Mini DVI to VGA adapter from MBP to PC monitor. How do I daisy chain the 2 monitors?

    I have a MBPro mid 2013 with 1 Thunderbolt port. Just bought a Mac monitor and want to daisy chain a PC monitor to it. Use a Mini DVI to VGA adapter from MBP to PC monitor. How do I daisy chain the 2 monitors?

    Hall Palm Desert,
    if your Mac monitor has Thunderbolt ports, and the PC monitor is on the end of the daisy chain, then you might be able to do it by connecting your PC monitor’s VGA cable to a Mini DisplayPort-to-VGA adapter (e.g. Apple, NewerTech), connecting that cable’s Mini DisplayPort end to one of the Mac monitor’s Thunderbolt ports, and then connecting a Thunderbolt cable between the other port on the Mac monitor and your MacBook Pro.

  • Questions on Multiprovider and Process Chain

    Hai All,
              I have two questions. One on Multiprovider and the other on Process chain.
    1. Multiprovider:
              For example, I have 2 ODSs. ODS1 has Objects ORDER NUMBER, COUNTRY and PRODUCT, ODS2 has objects ORDER NUMBER, DELIVERY STATUS, CREATION DATE.
    Now if I make a multiprovider on ODS1 and ODS2, then as ORDER NUMBER is common in both the ODSs, can I make a report like this:
    ORDER NUMBER - DELIVERY STATUS, CREATION DATE?
             I have a problem here bacuase its not getting those details from the other ODS even though the ORDER NUMBER(value) is same. Am I making nay mistake or is it a system problem.
    I beleive thats how a Multiprovider works.
    2. Process chain:
                    I have an END connector in my process chain that connects 3 processes and lets the following task start only after the success of all the above 3 processes.
    The system is displaying the END connector seperately under each process. But the name and everything else is same. Is this a setting somewhere in the process chain?
    Thank you.

    Hi,
    1. Those fields are in ODS2, you don't need to make a multiprovider.
    2. You mean an AND connector. Maybe you need to refresh the screen. if this doesn't work, delete the three and connectors and insert a new one.
    Hope this helps.
    Regards,
    Diego

  • Open and display image in MVC layout

    Hello!
    I cant figure out how I shall do this in an MVC layout:
    The program request user to open an image file that are then displayed in a JLabel
    My setup at the moment resolve in a nullpointerexeption because it dont get any actual image file, but I dont understand what I have missed.
    I can not post the whole code fo you to run because it is to big, so I post the part that are the most important. please have a look.
    PicturePanel
    //Import Java library
    import javax.swing.*;
    import java.awt.*;
    public class PicturePanel extends JPanel {
         //Variables
         private ImageIcon picture;
         //Method to get information of the selected file
         PicturePanel (String fileName) {
              picture = new ImageIcon (fileName); //Get the filename
              int w = picture.getIconWidth(); //Get the image with
              int h = picture.getIconHeight(); //Get the image height
              //Set preferable size for the image (Use the properties for the selected image)
              setPreferredSize(new Dimension(w, h));
              setMinimumSize(new Dimension(w, h));
              setMaximumSize(new Dimension(w, h));
         //Method to draw the selected image
         protected void paintComponent(Graphics g) {
              super.paintComponent(g); //We invoke super in order to: Paint the background, do custom painting.
              g.drawImage(picture.getImage(), 0, 0, this); //Draw the image at its natural state
    }From my model:
    //Local attributes
         boolean check = false; //Used to see if a statement is true or not
         PicturePanel pp;
         JFileChooser fc;
         int returnVal;
    //newFile in File menu
         public void newFile() {
              //Open a file dialog in users home catalog
              fc = new JFileChooser();
              //In response to a button click:
              returnVal = fc.showOpenDialog(pp);
              System.out.println("You pressed new in file menu");
         }From my controler:
    //User press "New" in File menu
              else if (user_action.equals("New")) {
                   //Call method in model class
                   model.newFile();
                   //Update changes
                   if (model.returnVal == JFileChooser.APPROVE_OPTION) {
                        System.out.println("Hello1");
                        File f = model.fc.getSelectedFile();
                        if (model.pp != null)     
                             model.pp = new PicturePanel(f.getAbsolutePath());
                        System.out.println("Hello2");
                        //Display image (Here is line 83)
                        view.setImage_DisplayArea(model.pp);
                        System.out.println("Hello3");
              }From my view:
    //Sets the image to be displayed on the image_display area (Here is line 302)
         public void setImage_DisplayArea(PicturePanel pp) {
              image_display.add(pp);
         }The complet error:
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
         at java.awt.Container.addImpl(Container.java:1015)You pressed new in file menu
    Hello1
    Hello2
         at java.awt.Container.add(Container.java:351)
         at View_Inlupp2.setImage_DisplayArea(View_Inlupp2.java:302)
         at Control_Inlupp2.actionPerformed(Control_Inlupp2.java:83)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1882)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2202)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
         at javax.swing.AbstractButton.doClick(AbstractButton.java:334)
         at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1050)
         at apple.laf.CUIAquaMenuItem.doClick(CUIAquaMenuItem.java:119)
         at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1091)
         at java.awt.Component.processMouseEvent(Component.java:5602)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3129)
         at java.awt.Component.processEvent(Component.java:5367)
         at java.awt.Container.processEvent(Container.java:2010)
         at java.awt.Component.dispatchEventImpl(Component.java:4068)
         at java.awt.Container.dispatchEventImpl(Container.java:2068)
         at java.awt.Component.dispatchEvent(Component.java:3903)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4256)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3936)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3866)
         at java.awt.Container.dispatchEventImpl(Container.java:2054)
         at java.awt.Window.dispatchEventImpl(Window.java:1801)
         at java.awt.Component.dispatchEvent(Component.java:3903)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)Edited by: onslow77 on Dec 16, 2009 5:00 PM
    Edited by: onslow77 on Dec 16, 2009 5:04 PM

    Hello again!
    Anyone that can help me figure out how to implement this in an MVC layout, I feel stuck.
    I post a little program that open and display an image file so that you better can understand what I whant to do.
    ShowImage
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.File;
    import javax.swing.filechooser.*;
    public class ShowImage extends JFrame{
         //Variables
         JFileChooser fc = new JFileChooser();
         PicturePanel pp = null;
         ShowImage () {
              super("Show"); //Title
              //Create the GUI
              JPanel top = new JPanel();
              add(top, BorderLayout.NORTH);
              JButton openBtn = new JButton("Open");
              top.add(openBtn);
              openBtn.addActionListener(new Listner());
              //Settings for the GUI
              setDefaultCloseOperation(EXIT_ON_CLOSE);
              pack();
              setVisible(true);
         class Listner implements ActionListener {
              public void actionPerformed(ActionEvent ave) {
                   int answer = fc.showOpenDialog(ShowImage.this);
                   if (answer == JFileChooser.APPROVE_OPTION){
                        File f = fc.getSelectedFile();
                        //Check
                        System.out.println(f);
                        System.out.println(pp);
                        if (pp != null)
                             remove(pp); //Clean so that we can open another image
                        //Check
                        System.out.println(pp);
                        //Set the PicturePanel
                        pp = new PicturePanel(f.getAbsolutePath());
                        //Check
                        System.out.println(pp);
                        //Add PicturePanel to frame
                        add(pp, BorderLayout.CENTER);
                        validate();
                        pack();
                        repaint();
         //Main
         public static void main(String[] args) {
              new ShowImage();
    }PicturePanel
    //Import Java library
    import javax.swing.*;
    import java.awt.*;
    public class PicturePanel extends JPanel {
         //Variables
         private ImageIcon picture;
         //Method to get information of the selected file
         PicturePanel (String fileName) {
              picture = new ImageIcon (fileName); //Get the filename
              int w = picture.getIconWidth(); //Get the image with
              int h = picture.getIconHeight(); //Get the image height
              //Set preferable size for the image (Use the properties for the selected image)
              setPreferredSize(new Dimension(w, h));
              setMinimumSize(new Dimension(w, h));
              setMaximumSize(new Dimension(w, h));
         //Method to draw the selected image
         protected void paintComponent(Graphics g) {
              super.paintComponent(g); //We invoke super in order to: Paint the background, do custom painting.
              g.drawImage(picture.getImage(), 0, 0, this); //Draw the image at its natural state
    }//The endEdited by: onslow77 on Dec 16, 2009 7:30 PM

Maybe you are looking for

  • Report query not returning the field value from external table

    hi I have an issue regarding reports. I have a query having 4 fields from external table and remaining from db tables. the report query returns all the fields from the db tables and only 2 fields from external table. but the same query if I tried in

  • FaceTime and iphone cellular calls not working

    I have upgraded to OSX Yosemite and iPhone to iOS 8.1. Before upgrading to iOS 8.1 the option of checking iPhone cellular calls in both mac and iPhone FaceTime was coming, but now that option itself isn't available. What is the solution and possible

  • How to cancel an itunes preorder

    Anyone know how I can cancel an itunes pre-order?

  • Pass values between ssrs 2008 r2 reports

    In a  ssrs 2008 R2 report, I need to pass parameters to existing subreports that are currently called.  Basically there is a main sssrs 2008 r2 report and there are 3 subreports. I would like subreports #1, subreport #2, and subreport #3 to receive t

  • How to activate the "Set Exchange Rate" field in billing document header?

    Dear All, I would like to get the exchange rate at the time of the billing without changing the sales order exchange value. The set exchange rate field is grayed off. Thanks in adavance. Regards, Niketan