Passing Struct To CFC Within A Grid Bind

Why does the following not work? When trying to pass the
struct it gives me the error "Complex object types cannot be
converted to simple values." Can I not pass structs within binds to
a CFC? Obviously in this example i'm only passing a single numeric
value, but what I really want to do is pass a full struct that
contains a list. If there's an easier way to pass a list, that
works too!

cf has a nice listchangedelims() function - you can change
the list
delimiter from comma to, say, | (pipe), and in your cfc
either specify
pipe as delimiter in any list functions you use or change it
back ot
comma using the same function.
Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/

Similar Messages

  • Passing parameter to CFC while using CFGRID bind

    I am attempting to use CFGRID to display some data. I have a
    CFGRID set up using a bind to a CFC which is fine for a hard coded
    SQL but I want to pass a parameter.
    I started with the example at
    http://www.garyrgilbert.com/blog/ind...sion-8s-CFGRID
    I'd like to pass one or more variables to filter down the
    result set.

    hi there, did you get this to work? I'm experiencing the same problem. i'd like to bind and pass the CFGRIDKEY to my CFC to filter my query results and then pass back the new results to my cfgrid. at this point i have no problem passing my new parameters as an argument in the json string or as a url paramenter when calling my CFC directly. however, my CFGRID keeps wigging out because it can't see the URL.CFGRIDKEY coming in. thoughts?
    here's the process, page load with all users assigned to all classes in my CFGRID. user then clicks on a class number in the grid or selects a class number for a drop down selection form, to view all students assigned to a particular class.
    as mentioned above, I can actually get the results i need when calling my CFC directly: http://127.0.0.1:8500/DREST_Pro/admin/getUsers.cfc?method=SPActiveUsers&returnFormat=json& argumentCollection={"gridpage":1,"gridpagesize":10,"cfgridkey":16,"gridsortcolumn":"","gri dsortdirection":""}&_cf_nodebug=true&_cf_nocache=true&_cf_clientid=76578301E64A507D8CD8F77 D078EA17A&_cf_rc=0&intclassid=18&cfgridkey=18
    and i can do this either by adding the cfgridkey argument into the argumentCollection or i can filter my results by appending the cfgridkey as a URL param.
    the problem seems to be in my binding of a new parameter when building my cfrid:
    <cfform name="getUsers">
            <cfgrid format="html" name="displayUsersActive" appendkey="yes" hrefkey="intfkclassid" href="allEnrolled.cfm" selectmode="row" striperows="yes" pagesize="10" bind="cfc:getUsers.SPActiveUsers({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgrid sortdirection},{cfgridkey})" width="650" height="400">
                <cfgridcolumn name="intfkclassid" display="no">
                <cfgridcolumn name="txtLName" header="Last Name" headerbold="yes" width="20">
                <cfgridcolumn name="txtFName" header="First Name" headerbold="yes">
                <cfgridcolumn name="startdate" header="Start Date" width="30" headerbold="yes">
                <cfgridcolumn name="enddate" header="End Date" headerbold="yes">
                <cfgridcolumn name="classno" header="Class No" headerbold="yes">
            </cfgrid>
        </cfform>

  • Bulleted List within a Grid Panel

    Hi,
    I'm trying to format an HTML page, using the Grid Panel component to arrange various text and images.
    In one of the text sections I need a bulledted list, but can't seem to find a way to do that, within the Grid Panel.
    I need this page to be a JSP page, as it is going to be dynamic.
    All help/advice would be appreciated.
    Regards
    Haroon

    Hi Haroon,
    Please go through the below jsp code to get a bulleted list in a grid panel
    <h:panelGrid binding="#{Page1.gridPanel1}" id="gridPanel1" style="left: 48px; top: 48px; position: absolute">
                            <ul>
                                <li>One</li>
                                <li>Two</li>
                                <li>Three</li>
                            </ul>
                        </h:panelGrid>Hope this helps
    Cheers
    Giri

  • How do you pass "struct" in an AJAX call URL? (CF11)

    Quote from CF11 documentation: "Note that "struct" is also available to be accessible through an AJAX argument. Now you can pass struct  in an AJAX URL to serialize a query object as struct."
    How? An example URL would be handy.

    "To serialize a query object as struct" overstates the case. You can serialize a struct, as well as a query, for sending by means of URL.
    For example, create the following 2 CFM pages in the same directory.
    testpage1.cfm
    <cfdump var="#url#">
    testpage2.cfm
    <cfset myStruct = structnew()>
    <cfset myStruct.myFirstKey = "uno">
    <cfset myStruct.mySecondKey = 2>
    <cfset myStructSerialized = serializeJSON(myStruct)>
    <!--- Uses built-in cfdocexamples datasource --->
    <cfquery name = "getBiololgyCourses" dataSource = "cfdocexamples">
        SELECT Course_ID, Dept_ID, CorNumber,
        CorName, CorLevel
        FROM CourseList
        WHERE Dept_ID = 'BIOL'
        ORDER by CorNumber asc
    </cfquery>
    <cfset biologyCoursesSerialized = serializeJSON(getBiololgyCourses)>
    <cflocation url="testpage1.cfm?myVar=#myStructSerialized#&biologyCourses=#biologyCoursesSerialized#">

  • Passing Query to CFC

    I am passing a query to a cfc. When I dump the query in the
    cfc it looks fine. However, when I attempt to loop over the query I
    get the following error: Complex object types cannot be converted
    to simple values.
    The expression has requested a variable or an intermediate
    expression result as a simple value, however, the result cannot be
    converted to a simple value. Simple values are strings, numbers,
    boolean values, and date/time values. Queries, arrays, and COM
    objects are examples of complex values.
    Here is the code:
    <cffunction name="updateTYC_Card_Master" access="public"
    returntype="void">
    <cfargument name="GoodRequests" required="yes"
    type="query">
    <cfargument name="dsn" required="yes" type="string">
    <cfargument name="newjobNo" required="yes"
    type="string">
    <!--- <cfdump var="#arguments.goodRequests#">
    <cfabort> --->
    <cfloop query="#ARGUMENTS.GoodRequests#">
    <cfquery name="UpdateTYC_Card_Master"
    datasource="#ARGUMENTS.dsn#">
    Update READONLY.TYC_Card_Master
    Set Job_Key = #ARGUMENTS.jobNo#
    Where custno = #custno#
    And job_key = -1
    </cfquery>
    </cfloop>
    </cffunction>
    How would I go about being able to use the contents of the
    query that I passed into the cfc. I've never passed in a query
    before. Thanks for the help.
    mark

    It has nothing to do with your query. This
    <cfargument name="newjobNo" required="yes"
    type="string">
    does not match this
    Set Job_Key = #ARGUMENTS.jobNo#
    Also, your argument specifies a string but your sql does not
    have quotes.
    Finally, since you are setting all the records to the same
    new job number, instead of running a query inside a loop, it is
    probably more efficient to run one query which includes something
    like
    where custno in
    (#ValueList(arguments.yourquery.custno)#)

  • Grid within a grid

    Hi,
    I am new to awt. I am trying to create a series of grids within a grid.
    The first grid will have three rows and one column. Each of the rows will contain a grid of varying numbers of rows and columns.
    Has anyone an example of how I would do something like this (no swing please, I haven't got to that part of Java yet!)
    Cheers,
    Didje

    Hi,
    Yes, that's where my problem has been. I've never done containers before, so I've been figuring how to nest them.
    However, I have managed to cobbble the following code together, which basically works, but I can't figure out how to reduce the size of the top and bottom buttons to a similar size of the centre buttons.
    import java.awt.*;
    public class NestedPanel extends Frame {
    public NestedPanel(String title) {
    super(title);
    setLayout(new GridLayout(3,0,0,40));
         addPanel1();
         addPanel2();
         addPanel3();
    public void addPanel1() {
         Panel panel = new Panel();
         panel.setLayout(new GridLayout(0,3,15,30));
    panel.setSize(10,10);
         panel.add(new Button("TButton X"));
         panel.add(new Button("TButton Y"));
         panel.add(new Button("TButton Z"));
         add(panel);
    public void addPanel2() {
         Panel panel = new Panel();
         panel.setLayout(new GridLayout(4,5));
    for(int i=1;i<=20;i++)
              panel.add(new Button("Button " + i));
         add(panel);
    public void addPanel3() {
         Panel panel = new Panel();
         panel.setLayout(new GridLayout(0,4,15,30));
         panel.add(new Button("BButton X"));
         panel.add(new Button("BButton Y"));
         panel.add(new Button("BButton Z"));
         panel.add(new Button("BButton Q"));
         add(panel);
    public static void main(String[] args) {
    NestedPanel abc =
    new NestedPanel("Nested Panel");
         abc.setSize(350, 550);
         abc.setVisible(true);     
    }

  • Obtaining a cell within a grid

    Hi all
    I wish to obtain the cell within a grid on which the user has clicked in order to obtain its value.
    question is how can i obtain the cell by code?
    appreciate the help
    Yoav

    Hi!
    You wont be able to get the specific cell, you will have to get the value from the datatable behind the Grid. It is a limitation, but that is the functionality the grid is actually offering.
    Hope it helps;
                      Jon Arranz

  • How could I initialize a CFC with data before binding a grid to it?

    Hi there,
    I am refactoring some very old ColdFusion code (ColdFusion 5,
    not done by me), and I'm considering replacing a huge and complex
    HTML table with a CFGrid.
    This HTML table is in an INCLUDE file and called from two
    places, each time it gets a CFQuery with the same name and columns,
    so the HTML table loop over it, but the (very complex) Queries are
    built differently.
    It would be a major hassle to "open up" the original queries
    and build them into the CFC that should supply the data for my
    CFGrid, so my idea is to wrap the original query into a QoQ, and
    use the QoQ to display and maybe filter the CFGrid.
    But my problem is, the CFC that I use to bind to the CFGrid
    has to somehow get the original CFQuery to base the QOQ upon, and I
    haven't found any way to pass the CFQuery to it! I tried to pass
    the CFQuery itself in the bind expression as:
    <cfgrid format="html" name="gridTravel" pagesize=25
    sort=true autoWidth=false
    height="565"
    colheaderbold="false" colheaderfont="Franklin Gothic Medium"
    colheaderfontsize="16"
    selectcolor="##b8ccfa" selectOnLoad=false
    striperows=true
    font="Arial" fontsize="12"
    "cfc:travel.getTravelList({cfgridpage},{cfgridpagesize},
    {cfgridsortcolumn},{cfgridsortdirection},#TravelQuery# )">
    And I also tried to first initialize the CFC with the CFQuery
    before the binding:
    <cfscript>
    travelCfc = createObject("component", "travel");
    travelCfc.travelListBase = TravelSel;
    </cfscript>
    But nothing works.
    My question, does the binding of CFGrid to a CFC only works
    in a "static" way (in Java term)?! In that case, the initialization
    method would clearly never work properly, is it then possible to
    pass the CFQuery in the Bind at all?
    Given my requirement, what would be the best way of achieving
    what I'm doing?
    Any suggestion will be appreciated, and many thanks in
    advance.
    Billy

    If you go to the VI Properties, under the Execution menu selection there is a pop-up for setting the Preferred Execution System. This is as close as you can specifying a thread in LV.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • How to make a field manadatory within ALV Grid using methods and classes

    Hi,
    I am using ALV Grid using set_table_for_first_display
    inside my dialog programming. I have a field called project number inside my grid which has to be made as mandatory field.
    I have defined a method called catch_data_changed inside my class lcl_event_receiver. This method captures the changes made to one of the fields inside my ALV grid and displays all the default values of the other fields from the grid.
    Now, i have to make project number which is one of my fields inside my ALV grid as mandatory. At the field catalog level i did not find any such option for making a field as required field.
    Is there any other way, i can accomplish this within the ALV grid?

    from my understanding from ur question, i understood that u want the editable field inside alvgrid to be mandatory.
    i dont know anthing in fieldcat, but u can try the following logic.
    FORM DATA_CHANGED  USING P_ER_DATA_CHANGED TYPE REF TO
    CL_ALV_CHANGED_DATA_PROTOCOL .
      DATA: L_VALUE TYPE LVC_VALUE,
        ls_mod_cell type lvc_s_modi.
      READ TABLE P_ER_DATA_CHANGED->MT_MOD_CELLS INTO LS_MOD_CELL.
    if sy-subrc = 0.
        CALL METHOD P_ER_DATA_CHANGED->GET_CELL_VALUE
          EXPORTING
            I_ROW_ID    = LS_MOD_CELL-row_id
            I_FIELDNAME = LS_MOD_CELL-fieldname
          IMPORTING
            E_VALUE     = L_VALUE.
    IF LS_MOD_CELL-FIELDNAME <> 'fieldname what u want'
    MESSAGE 'ENTER VALUE INTO (fieldname u want) ' TYPE 'I'.
    ENDIF.
    ELSE.
    MESSAGE 'ENTER VALUE INTO (fieldname u want) ' TYPE 'I'.
    ENDIF.

  • Is it possible to use HTML5 tags within fluid grid layouts?

    Hello,
    I want to build my future websites with fluid grid layouts and Dreamweaver CS6 but I don't find any help by searching the internet how I could use the HTML5 tags like "header" "nav" "footer" etc. within the fluid grid layouts automaticly. If I do anything manually it's more error-prone. Or is just the best way to stay with the "normal" div-tags???
    Thank you in advance, best regards ... Björn

    Those tags are equal to a normal DIV and can be used just the same, they are just not built into CS6.
    Mylenium

  • Trouble passing var using CFC

    I'm having trouble passing a variable value called from a CFC
    into Flex via RemoteObject. Basically I'm trying to pass the
    current logged-in user to a Combobox as a string. The Web directory
    in IIS is set to dissallow anonymous access and is set to
    Integrated Windows Authentication. The CFC is in the secured
    directory as well as the Flex app. If I change the CGI variable to
    something like #cgi.remote_addr# among others it works fine so I
    know it's not the actionScript or CFC code. Any ideas as to why
    #cgi.auth_user# is passing as an empty string?? One more caveat. If
    I invoke the function in my CFC from a .cfm page the auth_user is
    displayed as expected.
    ------------------------------------------------------------------------------------------ ----------

    To use RemoteObject with PHP you need to download AMFPHP and
    make some settings.
    To download go here:
    null.
    To understand how to use it with Flex go here:
    null.
    This is a video tutorial of about 7-10 minutes which will show you
    all you need you need to know to set AMFPHP in 'conversation' with
    Flex.
    Good luck!

  • Passing values in a vector list as bind variables in sql query.

    Hi,
    I have a vector list containing values 12,13,14.
    vector<string> v;
    v has values 12,13 and 14.
    Here the number of values in vector list are not fixed.
    I want to pass these values as bind variables to sql query.
    Can anyone suggest me how to do this.
    Thanks in advance!!

    Ah, the it's the classic 'Varying In-List' again
    See:
    The Tom Kyte Blog: Varying in lists...
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:110612348061 (started more than a decade ago, so scroll down for more recent examples)

  • Problem passing values to cfc component

    I have a cfc component with methods to insert, retrieve and
    update a record in a table. There are several forms associated with
    the component, each which handles a subset of the fields in the
    table. The update method is called with arguments that identify
    which subset of fields is to be modified and the values for those
    fields.
    The forms typically have a couple of radio button groups and
    a couple of lists, most of which allow multiple selections. I want
    to create a variable for each radio button group and each list. The
    variables give the button selected (for the buttons) and a string
    of the values selected (for the lists). These are to be passed as
    arguments to the update method.
    I can construct the variables using standard Java script
    statements (if, for,etc.). But if I do, CFINVOKEARGUMENT doesn't
    recognize them. The same thing happens if I try to use CFQUERY
    directly. I get a message like "variable is undefined". If I try to
    set the values using CFSET statements, it doesn't recognize the
    form fields. It says the field is not an element of the form.
    So I can look at the form fields to create a variable but
    then the variable can't be used by the update method. Or I can
    create an argument that can be passed to update, but it doesn't
    know anything about the form values. I've tried all variations I
    can think of with and without #'s and single & double quotation
    marks.
    Suggestions would be appreciated.

    See in line comments.
    waz69 wrote:
    > Sorry for the delayed response...I was pulled away right
    after I posted my
    > problem. Here are extracts from the code. I've only
    included the sections
    > that deal with updating the table.
    >
    > In the CFC file:
    >
    > <cffunction access="public" name="SaveFormValues"
    output="false"
    > returntype="boolean">
    > <cfargument name="Screen" type="string"
    required="yes">
    > <cfargument name="Arg1" type="string"
    required="yes">
    > <cfargument name="Arg2" type="string"
    required="yes">
    > <cfargument name="Arg3" type="string"
    required="yes">
    > <cfargument name="Arg4" type="string"
    required="no">
    > <cfargument name="Arg5" type="string"
    required="no">
    > <cfargument name="Arg6" type="string"
    required="no">
    > <cfset var isSuccessful=true>
    > <cftry>
    > <cfquery name="SaveValues" datasource="FPDS
    Sample">
    > UPDATE Report_specs SET
    > <cfif arguments.Screen EQ "Scope">
    > ReportOn = '#arguments.Arg1#',
    > SubtotalGroup = '#arguments.Arg2#',
    > Projects = '#arguments.Arg3#',
    > Sites = '#arguments.Arg4#'
    > </cfif>
    > <cfif arguments.Screen EQ "Criteria"> (,,code goes
    here for next set of
    > fields...) </cfif>
    > <cfif arguments.Screen EQ "Table"> (,,code goes
    here for next set of
    > fields...) </cfif>
    > <cfif arguments.Screen EQ "Chart"> (,,code goes
    here for next set of
    > fields...) </cfif>
    > <cfif arguments.Screen EQ "Detail"> (,,code goes
    here for next set of
    > fields...) </cfif>
    > WHERE Report_specs.rid = #Session.FPRU_rid#
    > </cfquery>
    > <cfcatch type="Database"><cfset
    isSuccessful=false></cfcatch>
    > </cftry>
    > <cfreturn isSuccessful />
    > </cffunction>
    >
    > In the CFM file:
    >
    > <head>
    > <script language="JavaScript">
    >
    > function SaveValues(frm) {
    > var RptOn="", SubGrp="", SL="", PL="" ;
    > for(var i=0; i<3; i++)
    > {if(frm.ReportOn
    .checked) RptOn = frm.ReportOn.value ;
    > if(frm.SubtotalGroup
    .checked) SubGrp = frm.SubtotalGroup.value ; } ;
    > for(i = 0; i < frm.Projects.options.length; i++)
    > {if(frm.Projects.options
    .selected ) PL = PL + ', ' +
    > frm.Projects.options.value ; } ;
    > for(i = 0; i < frm.Sites.options.length; i++)
    > {if(frm.Sites.options
    .selected ) SL = SL + ', ' +
    > frm.Sites.options.value ; } ;
    >
    > ...(This is the section where I'm having problems. I
    have the values I want
    > to pass the variables just defined.
    > But I can't get them into the CFINVOKEARGUMENT
    statements below. I've
    > tried variations of #'s, CFSETS, etc.)...
    >
    > <cfobject component="RecordAccess"
    name="SaveValues">
    > <cfinvoke component="#SaveValues#"
    method="SaveFormValues" >
    > <cfinvokeargument name="Screen" value="Scope">
    > <cfinvokeargument name="Arg1" value="RptOn">
    > <cfinvokeargument name="Arg2" value="SubGrpr">
    > <cfinvokeargument name="Arg3" value="PL">
    > <cfinvokeargument name="Arg4" value="SL">
    > </cfinvoke>
    > }
    >
    > </script>
    > </head>
    This is never going to work. JavaScript is executed on the
    client's
    computer in the browser. It is no idea of what is CFC is or
    how to
    access one. The cfc lives on the server, it can only exist
    and run
    while the http request is being built by the CF engine.
    >
    > <body onFocus="GetValues(this.form)" >
    >
    > <form action="" method="post" name="ScopeDetail"
    id="ScopeDetail">
    > <table width="85%" border="0" cellspacing="2"
    cellpadding="2">
    > <tr>
    >
    > ...(various buttons)...
    >
    > <td width="8%"><input name="SaveForm"
    type="button" id="SaveForm"
    > onclick="SaveValues(this.form)"
    value="Save"></td>
    >
    > ...(other buttons)...
    >
    > </table>
    >
    > <table width="96%" border="0" cellspacing="2"
    cellpadding="2">
    > <tr>
    > ...(column headers)...
    > </tr>
    >
    > <tr>
    > <td rowspan="3" align="right"
    valign="top"> </td>
    > <td height="110" colspan="2" align="right"
    valign="top"><div
    > align="left">
    > <p>
    > <label> <input name="ReportOn" type="radio"
    value="Users" checked>
    > Unique users</label>
    > <br>
    > <label> <input type="radio" name="ReportOn"
    value="AllVisits"> All
    > visits</label>
    > <br>
    > <label> <input name="ReportOn" type="radio"
    value="LastVisit"> Last visit
    > only</label>
    > <br>
    > </p>
    > </div></td>
    > <td rowspan="3" valign="top"> </td>
    > <td colspan="3" rowspan="3"
    valign="top"><p><select name="Projects"
    > size="10" multiple id="Projects"
    onChange="getSites(this.form)"><cfoutput
    > query="ProjectList">
    > <option
    >
    value="#ProjectList.projectid#">#ProjectList.projectname#</option>
    > </cfoutput></select></p></td>
    > <td width="3%" rowspan="3"
    valign="top"> </td>
    > <td width="34%" rowspan="3"
    valign="top"><select name="Sites" size="15"
    > multiple id="Sites">
    > <option> ---------------------------------------
    </option>
    > </select></td>
    > <tr>
    > <td height="23" colspan="2" align="right"
    valign="top"><div align="left">
    > <h3>Show Summaries of </h3>
    > </div></td>
    > <tr>
    > <td height="100" colspan="2" align="right"
    valign="top"><div
    > align="left">
    > <label> <input name="SubtotalGroup"
    type="radio" value="Both" checked>
    > Project & Sites</label>
    > <br>
    > <label> <input type="radio"
    name="SubtotalGroup" value="Projects">
    > Projects only</label>
    > <br>
    > <label> <input type="radio"
    name="SubtotalGroup"
    > value="Sites"> Sites only</label>
    > </div></td>
    >
    > </table>
    > </form>
    > </body>
    waz69 wrote:
    > I tried creating hidden fields to which I assign my
    desired values. The
    > CFINVOKEARGUMENTs then become:
    >
    > <cfinvokeargument name="Arg1" value=frm.Hide1>
    > <cfinvokeargument name="Arg2" value=frm.Hide2>
    > etc.
    >
    > What ends up in the table is the name of the field
    (frm.Hide1) not
    the value
    > of the field. I've also tried with with quotes (single
    and double)
    which give
    > the same result and with #'s which gives me an error
    about undefined
    element.
    >
    This is what your are going to need to do. But the javascript
    form
    object no longer exists once the request has been sent to the
    server.
    After that you are dealing with the "form" structure. So your
    arguments
    are going to look something like.
    <cfinvokeargument name="Arg1" value="#form.Hide1#">
    OR interchangeably
    <cfinvokeargument name="Arg2" value="#form['Hide2']#">
    When blending JavaScript and ColdFusion, one must be
    constantly aware of
    the order of actions. JavaScript can only run and exist on
    the client,
    it has no direct knowledge of any ColdFusion variables or
    logic.
    Vice-a-versa, ColdFusion only runs and exists on the server.
    It has no
    direct knowledge of the Client or its state.
    To blend the two you have to carefully pass any required,
    shared
    information from one location to the other.

  • Exception handling within a value-binding expression

    Hi all,
    Forgive me if this question seems odd, but I am a long-time Struts developer, new to JSF.
    In Struts, exception handling was easy because all requests were funnelled through some subclass of Action. Exception handling could effectively be consolidated into one spot by applying the template-method pattern.
    Of course, with JSF, this is not possible because method names in value-binding and action-binding expressions can be chosen arbitrarily. For this reason, I am exploring aspect-oriented (and other) techniques for consolidation JSF exception handling into one spot, but rather than focus too intently on that, it's clear that I first need the ability to forward to an error page when an exception is encountered in a value-binding or action-binding expression.
    For action-binding expressions, ExternalContext.dispatch("<view id>"); seems to work quite well, but I am unable to make the same work when in the context of a value-binding expression. This is probably attributed to the fact that at that point, I am in an entirely different phase of the JSF request processing lifecycle.
    What I'm looking to know is if anyone has a reliable means of forwarding to an error page within the context of a value-binding expression. Better yet, does anyone know a reliable way of forwarding to another view regardless of what phase you are in?
    If it makes a difference (and I think it does) the error page uses JSF as well, and uses the same layout (provided via custom tags courtesy of JSP 2.0 tag files), so some view components would have the same name as the page which encountered the error. This seems to get in the way of me simply defining the error page for a 500 in my web deployment descriptor.
    Thanks in advance to anyone with a working suggestion.
    -Kent

    Let me pose a purely hypothetical use case to demonstrate the problem:
    Imagine a page in an HR app, employeeDetails.jsp, that displays an always-up-to-date combo box which lists employee names and IDs. onChange triggers a form submit with the intention of simply posting back to this page, with various text boxes, etc. below updated to show all information for the selected employee.
    Obviously, with the requirement that the combo box always be up to date, it's clear that the getter invoked by the value-binding expression must access the database (not directly of course, but via a facade, application, then data-access layer). Any unexpected and unchecked exception in this chain would propagate back up to the getter method on the backing bean. I need to, at that point, log the exception (trivial) and forward to a user-friendly error page.
    I suppose I could put some contraint on myself that data access is only performed within ActionEvent handlers, but I'm not sure that's consistent with the JSF model in general, in fact it almost seems Struts-like in that I'd have to invoke some action before loading this form to build the up-to-date list for the combo box, shove it in request scope, where it's then available to the page indicated by the navigation rules. Submission of the form on the page in question would also need to result in rebuilding the up-to-date list. Now we're looking at firther propagation of code. I want to avoid this, so I am looking for a better way.

  • Passing struct to DLL using TestStand

    I would like to pass structures to the function call in the DLL. Does Test stand supports passing structured.
    I have a function prototype like this
    LONG _stdcall ReadData(HANDLE hInstance, pDataStruct Trans);
    #pragma pack(push, 1)
    typedef struct _DataStruct {
    BYTE Type;
    BYTE DevAddr;
    WORD wMemoryAddr;
    WORD wCount;
    BYTE Data[256];
    } DataStruct , *pDataStruct ;
    #pragma pack(pop)
    I would like to display the Data filed after the function call.
    remaining parameters to the structure are inputs.
    Please point me to any tutorial on TestStand that can help me or Give me a detailed instructions on how to configure it.
    Thanks in advance.
    Lak

    There is a "StructPassing" example in the TestStand/examples folder. It shows how you can pass the struct to DLL function. Additionally, you can access the struct using TestStand API.
    Yevgeny

Maybe you are looking for

  • Dynamic SQL and Oracle stored procedures

    Does anybody has any experience with invoking an Oracle stored procedures with output parameters, using dynamic SQL from Forte? Thanks, Dimitar

  • How to configure or remove LUN's?

    a set of three OVM servers as 1 manager and two servers using SAN multipathing SAN team assigned 3 new LUN's to my Oracle VM servers release 2.2.2 I went through the bellow in the first server and every thing went fine and I got to view the new added

  • Cl_gui_alv_grid - I get a blank screen

    I seem to be having a problem with my screen.  The issue is that I am using cl_gui_alv_grid to display an ALV.  However, I call set_table_for_first_display, I get a blank screen.  I have verified that I have data in the field cat, outtab, and sort ta

  • Local sync of Contacts and Calendars

    I have not yet upgraded to Mavericks, I usually wait to see how things shake out.  I just found out that Mavericks disables local syncing of Contacts, Calendars and Keychains.  This may be a great convenience for some, but I prefer to maintain my per

  • Event SAVE_REQUESTED is only modeled, not implemented

    Hi, I tried to create a Workflow which uses a ABAP OO Class. The Workflow is created by an event and cancelled by another event. In a task after the cancel event a method of the class should be excecutet. The method should set a value. It seems, that