Edit a row in a new window using Jqgrid and CFwheels

228 views Asked by At

OK, so I have a jqgrid which uses the editurl attribute to browse to a new page when editing a row.

Instead of opening it in a new window it takes me to:

http://MyComputer.com:8500/ProjectFolder/window.open(/ProjectFolder/index.cfm/feds_env/feds_form)'?FEDS_ID=119959&BLS_ID=6601

I tried using editfunc as well and defining a newWindow js function but I get

"Element id is undefined in a CFML structure referenced as part of an expression."

Note that two IDs are required to open the page correctly.

I found Edit in a new page with jqGrid but it lacks enough context to be useful for me.

Any suggestions?

    <cfset tableDefObj = DeserializeJSON(jqGridBuildTableDefinitionJSON(

                modelName="FEDSALL", 
                tableID="feds_env_nav_form_table",
                feds_id="readonly",
                editurl="window.open(#URLFor(action='feds_form')#)'",
                bls_id="hidden",
                rowsPerPage=15,
                state=states,
                bldg_desc=building_descriptions,
                M_I_FUNDS_MGR=funds_managers,           
                columnOrder="AREA,STATE,CITY_TOWN,INST_NO,INST_NAME,BLS_NO,RP_CODE,BLDG_DESC,TRANS_CODE,BLS_ID,M_I_FUNDS_MGR,FEDS_ID,DEFIC_CD,REC_STATUS,STARTING_INIT_ENTRY_DATE,ENDING_INIT_ENTRY_DATE,TASK_CAT,DEFICIENCY_OR_FINDING,CORRECTIVE_ACTION_REQD"

                            ))>

<cfloop from="1" to="#ArrayLen(tableDefObj.colModel)#" index="i">
    <cfif tableDefObj.colModel[i].name IS "STARTING_INIT_ENTRY_DATE">
        <cfset tableDefObj.colModel[i]["searchoptions"] = {"sopt"= ["ge"]}>

        <cfset tableDefObj.colModel[i]["formatter"]= "date">
        <cfset tableDefObj.colModel[i]["formatoptions"]=  { "srcformat"= "F, d y H:i:s", "newformat"= "m/d/Y" }>  
        <cfset tableDefObj.colModel[i]["sorttype"]= "date">
        <cfset tableDefObj.colModel[i]["datefmt"]= "mm/dd/yyyy">

    </cfif>
    <cfif tableDefObj.colModel[i].name IS "ENDING_INIT_ENTRY_DATE">
        <cfset tableDefObj.colModel[i]["searchoptions"] = {"sopt"= ["le"]}>

        <cfset tableDefObj.colModel[i]["formatter"]= "date">
        <cfset tableDefObj.colModel[i]["formatoptions"]=  { "srcformat"= "F, d y H:i:s", "newformat"= "m/d/Y" }>  
        <cfset tableDefObj.colModel[i]["sorttype"]= "date">
        <cfset tableDefObj.colModel[i]["datefmt"]= "mm/dd/yyyy">
    </cfif>
</cfloop>

#jqGridWrapper(accessibleView=IsDefined("session.user.is_notified") AND IsBoolean(session.user.is_notified) AND session.user.is_notified,
            tableDefinitionJSON=SerializeJSON(tableDefObj),
            tableID="feds_env_nav_form_table",
            exportToExcelOption="true",
            filterToolbar="true",
            action="navigate"
            )#
0

There are 0 answers