 
					
				
		
03-17-2011 05:52 AM
"<action type="action-link" id="onActionView" label="actions.view" />"  
					
				
		
03-18-2011 09:44 AM
 
					
				
		
03-23-2011 09:26 AM
      
onActionView: function DataGrid_onActionView(item)
      {
         var scope = this;
         
         // Intercept before dialog show
         var doBeforeDialogShow = function DataGrid_onActionView_doBeforeDialogShow(p_form, p_dialog)
         {
            Alfresco.util.populateHTML(
               [ p_dialog.id + "-dialogTitle", this.msg("label.view-row.title") ]
            );
            /**
             * No full-page edit view for v3.3
             *
            // Data Item Edit Page link button
            Alfresco.util.createYUIButton(p_dialog, "editDataItem", null, 
            {
               type: "link",
               label: scope.msg("label.edit-row.edit-dataitem"),
               href: scope.getActionUrls(item).editMetadataUrl
            });
             */
         };
         var templateUrl = YAHOO.lang.substitute(Alfresco.constants.URL_SERVICECONTEXT + "components/form?itemKind={itemKind}&itemId={itemId}&mode={mode}&submitType={submitType}&showCancelButton=true",
         {
            itemKind: "node",
            itemId: item.nodeRef,
            mode: "view",
            submitType: "json"
         });
         // Using Forms Service, so always create new instance
         var viewDetails = new Alfresco.module.SimpleDialog(this.id + "-viewDetails");
         viewDetails.setOptions(
         {
            width: "34em",
            templateUrl: templateUrl,
            actionUrl: null,
            destroyOnHide: true,
            doBeforeDialogShow:
            {
               fn: doBeforeDialogShow,
               scope: this
            },
            onSuccess:
            {
               fn: function DataGrid_onActionView_success(response)
               {
                  // Reload the node's metadata
                  Alfresco.util.Ajax.jsonPost(
                  {
                     url: Alfresco.constants.PROXY_URI + "slingshot/datalists/item/node/" + new Alfresco.util.NodeRef(item.nodeRef).uri,
                     dataObj: this._buildDataGridParams(),
                     successCallback:
                     {
                        fn: function DataGrid_onActionView_refreshSuccess(response)
                        {
                           // Fire "itemUpdated" event
                           Bubbling.fire("dataItemUpdated",
                           {
                              item: response.json.item
                           });
                           // Display success message
                           Alfresco.util.PopupManager.displayMessage(
                           {
                              text: this.msg("message.details.success")
                           });
                        },
                        scope: this
                     },
                     failureCallback:
                     {
                        fn: function DataGrid_onActionView_refreshFailure(response)
                        {
                           Alfresco.util.PopupManager.displayMessage(
                           {
                              text: this.msg("message.details.failure")
                           });
                        },
                        scope: this
                     }
                  });
               },
               scope: this
            },
            onFailure:
            {
               fn: function DataGrid_onActionView_failure(response)
               {
                  Alfresco.util.PopupManager.displayMessage(
                  {
                     text: this.msg("message.details.failure")
                  });
               },
               scope: this
            }
         }).show();
      }, 
					
				
		
03-29-2011 04:40 AM
 
					
				
		
03-29-2011 05:23 AM
 
					
				
		
04-05-2011 06:32 AM
Internal Form Error: form with id of 'template_x002e_datagrid_x002e_data-lists-viewDetails-form' could not be located, ensure the form is created after the form element is available. 
					
				
		
04-11-2011 09:05 AM
 
					
				
		
04-13-2011 09:10 AM
[11:54:16,138] GET http://127.0.0.1:8080/share/res/yui/datatable/datatable-min.js [HTTP/1.1 200 OK 47ms]
[11:58:31,314] GET http://127.0.0.1:8080/share/service/components/form?itemKind=node&itemId=workspace://SpacesStore/4c4... [HTTP/1.1 200 OK 47ms]
–
[11:58:37,343] this.widgets.okButton is null @ http://127.0.0.1:8080/share/res/modules/simple-dialog-min.js:377
    Internal Form Error: form with id of 'template_x002e_datagrid_x002e_data-lists-viewDetails-form' could not be located, ensure the form is created after the form element is available.
<dataGrid>
   <actionSet>
      <action type="action-link" id="onActionView" label="actions.view" />
      <action type="action-link" id="onActionEdit" permission="edit" label="actions.edit" />
      <action type="action-link" id="onActionDuplicate" permission="create" label="actions.duplicate-row" />
      <action type="action-link" id="onActionDelete" permission="delete" label="actions.delete-row" />
   </actionSet>
</dataGrid>
   <config evaluator="node-type" condition="dl:embauche">
      <forms>
         <!– Create item form –>
         <form>
            <field-visibility>
               <!– dl:intermission type–>
               <show id="dl:nomembauche"/>
               <show id="dl:profileembauche"/>
               <show id="dl:dateentree"/>
               <show id="dl:motifembauche"/>
               <show id="dl:prxrevembauche"/>
               <!– cm:attachable aspect –>
               <show id="cm:attachments"/>
            </field-visibility>
            <edit-form template="../data-lists/forms/dl_ficheembauche.ftl"/>
            <appearance>
               <field id="dl:nomembauche">
                  <control template="/org/alfresco/components/form/controls/textfield.ftl"/>
               </field>
               <field id="dl:profileembauche">
                  <control template="/org/alfresco/components/form/controls/textfield.ftl"/>
               </field>
               <field id="dl:dateentree">
                  <control template="/org/alfresco/components/form/controls/date.ftl"/>
               </field>
               <field id="dl:motifembauche">
                  <control template="/org/alfresco/components/form/controls/textfield.ftl"/>
               </field>
               <field id="dl:prxrevembauche">
                  <control template="/org/alfresco/components/form/controls/textfield.ftl"/>
               </field>
               <field id="cm:attachments">
                  <control>
                     <control-param name="startLocation">{doclib}</control-param>
                  </control>
               </field>
            </appearance>
         </form>
      </forms>
   </config>  
   <config evaluator="node-type" condition="dl:embauche">
      <forms>
         <!– Create item form –>
         <form>
            <field-visibility>
               <!– dl:intermission type–>
               <show id="dl:nomembauche"/>
               <show id="dl:profileembauche"/>
               <show id="dl:dateentree"/>
               <show id="dl:motifembauche"/>
               <show id="dl:prxrevembauche"/>
               <!– cm:attachable aspect –>
               <show id="cm:attachments"/>
            </field-visibility>
            <view-form template="../data-lists/forms/dl_ficheembauche.ftl"/>
            <appearance>
               <field id="dl:nomembauche">
                  <control template="/org/alfresco/components/form/controls/textfield.ftl"/>
               </field>
               <field id="dl:profileembauche">
                  <control template="/org/alfresco/components/form/controls/textfield.ftl"/>
               </field>
               <field id="dl:dateentree">
                  <control template="/org/alfresco/components/form/controls/date.ftl"/>
               </field>
               <field id="dl:motifembauche">
                  <control template="/org/alfresco/components/form/controls/textfield.ftl"/>
               </field>
               <field id="dl:prxrevembauche">
                  <control template="/org/alfresco/components/form/controls/textfield.ftl"/>
               </field>
               <field id="cm:attachments">
                  <control>
                     <control-param name="startLocation">{doclib}</control-param>
                  </control>
               </field>
            </appearance>
         </form>
      </forms>
   </config>  
   <config evaluator="node-type" condition="dl:embauche">
      <forms>
         <!– Create item form –>
         <form>
            <field-visibility>
               <!– dl:intermission type–>
               <show id="dl:nomembauche"/>
               <show id="dl:profileembauche"/>
               <show id="dl:dateentree"/>
               <show id="dl:motifembauche"/>
               <show id="dl:prxrevembauche"/>
               <!– cm:attachable aspect –>
               <show id="cm:attachments"/>
            </field-visibility>
            <create-form template="../data-lists/forms/dl_ficheembauche.ftl"/>
            <appearance>
               <field id="dl:nomembauche">
                  <control template="/org/alfresco/components/form/controls/textfield.ftl"/>
               </field>
               <field id="dl:profileembauche">
                  <control template="/org/alfresco/components/form/controls/textfield.ftl"/>
               </field>
               <field id="dl:dateentree">
                  <control template="/org/alfresco/components/form/controls/date.ftl"/>
               </field>
               <field id="dl:motifembauche">
                  <control template="/org/alfresco/components/form/controls/textfield.ftl"/>
               </field>
               <field id="dl:prxrevembauche">
                  <control template="/org/alfresco/components/form/controls/textfield.ftl"/>
               </field>
               <field id="cm:attachments">
                  <control>
                     <control-param name="startLocation">{doclib}</control-param>
                  </control>
               </field>
            </appearance>
         </form>
      </forms>
   </config>  
<#assign id=args.htmlid>
<#if formUI == "true">
   <@formLib.renderFormsRuntime formId=formId />
</#if>
<div id="${id}-dialog">
   <div id="${id}-dialogTitle" class="hd">${msg("title")}</div>
   <div class="bd">
      <div id="${formId}-container" class="form-container">
<#– No full-page edit view for v3.3-
   <#if form.mode == "edit">
         <div class="yui-u first edit-dataitem flat-button">
            <button id="${args.htmlid}-editDataItem" tabindex="0"></button>
         </div>
   </#if>
–>
         <#if form.showCaption?exists && form.showCaption>
            <div id="${formId}-caption" class="caption"><span class="mandatory-indicator">*</span>${msg("form.required.fields")}</div>
         </#if>
      
         <form id="${formId}" method="${form.method}" accept-charset="utf-8" enctype="${form.enctype}" action="${form.submissionUrl}">
   
         <#if form.destination??>
            <input id="${formId}-destination" name="alf_destination" type="hidden" value="${form.destination}" />
         </#if>
   
            <div id="${formId}-fields" class="form-fields">
               <div class="yui-g">
                <@formLib.renderField field=form.fields["prop_dl_nomembauche"] />
                     <@formLib.renderField field=form.fields["prop_dl_profileembauche"] />
                     <@formLib.renderField field=form.fields["prop_dl_dateentree"] />
                     <@formLib.renderField field=form.fields["prop_dl_motifembauche"] />
                     <@formLib.renderField field=form.fields["prop_dl_prxrevembauche"] />
                <!–attachement–>
                <@formLib.renderField field=form.fields["assoc_cm_attachments"] />
               </div>
            </div>
            <div class="bdft">
               <input id="${formId}-submit" type="submit" value="${msg("form.button.submit.label")}" />
                <input id="${formId}-cancel" type="button" value="${msg("form.button.cancel.label")}" />
            </div>
      
         </form>
      </div>
   </div>
</div>
 
					
				
		
04-13-2011 11:30 AM
<input id="${formId}-submit" type="button" value="${msg("form.button.submit.label")}" />
<input id="${formId}-ok" type="submit" value="${msg("form.button.submit.label")}" />
<input id="template_x002e_datagrid_x002e_data-lists-viewDetails-ok" type="submit" value="${msg("form.button.submit.label")}" />
        Internal Form Error: form with id of 'template_x002e_datagrid_x002e_data-lists-viewDetails-form' could not be located, ensure the form is created after the form element is available.
 
					
				
		
04-20-2011 09:56 AM
init: function()
{
var form = Dom.get(this.formId);
if (form !== null)
{
if (form.getAttribute("forms-runtime") != "listening")
{
// add the event to the form and make the scope of the handler this form.
Event.addListener(form, "submit", this._submitInvoked, this, true);
form.setAttribute("forms-runtime", "listening");
if (this.ajaxSubmit)
{
form.setAttribute("onsubmit", "return false;");
}
var me = this;
/**
* Prevent the Enter key from causing a double form submission
*/
var fnStopEvent = function(id, keyEvent)
{
var event = keyEvent[1],
target = event.target ? event.target : event.srcElement;
if (target.tagName == "TEXTAREA")
{
// Allow linefeeds in textareas
return false;
}
else if (target.tagName == "BUTTON" || Dom.hasClass(target, "yuimenuitemlabel"))
{
// Eventlisteners for buttons and menus must be notified that the enter key was entered
}
else
{
var targetName = target.name;
if (targetName && (targetName != "-"))
{
me._submitInvoked(event);
}
Event.stopEvent(event);
return false;
}
};
var enterListener = new KeyListener(form,
{
keys: KeyListener.KEY.ENTER
}, fnStopEvent, YAHOO.env.ua.ie > 0 ? KeyListener.KEYDOWN : "keypress");
enterListener.enable();
}
// determine if the AJAX and JSON submission should be enabled
if (form.getAttribute("enctype") && form.getAttribute("enctype") == "application/json")
{
this.ajaxSubmit = true;
this.submitAsJSON = true;
}
// setup the submit elements if the feature is enabled
if (this.showSubmitStateDynamically)
{
// find the default submit elements if there are no submitIds set
if (this.submitElements.length == 0)
{
// use a selector to find any submit elements for the form
var nodes = Selector.query('#' + this.formId + ' > input[type="submit"]');
for (var x = 0, xx = nodes.length; x < xx; x++)
{
var elem = nodes[x];
this.submitElements.push(elem.id);
}
}
// make sure the submit elements start in the correct state
this.updateSubmitElements();
}
}
else
{
this._showInternalError("form with id of '" + this.formId +
"' could not be located, ensure the form is created after the form element is available.");
}
}
 
					
				
				
			
		
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.