I am under the impression that applications under specialpurpose folders are intended for user in certain role and are supposed to be intuitive.
I find forms widgets are very good of most of the UI. But when it comes adding some Ajax stuff, its just too hard to works with. Regards Anil Patel On Sun, 2007-11-25 at 13:54 +0700, Hans Bakker wrote: > Hi Anil, > > up to now the general policy was to use forms in the backend. I am not > aware that that has been changed. > Isn't better to find a a way to use AJAX the the forms? > > What do other people think about this? > > Regards, > Hans Bakker. > > > On Sat, 2007-11-24 at 22:31 -0800, Anil Patel wrote: > > Hans, > > Thanks a lot for your efforts in project module. > > I wanted to do UI in project component using ftl so Its possible to do > > Ajax based UI goodies. > > > > If you really don't mind can you please NOT replace ftl files with form > > widget. > > > > Regards > > Anil Patel > > > > > > > > > > On Sun, 2007-11-25 at 02:54 +0000, [EMAIL PROTECTED] wrote: > > > Author: hansbak > > > Date: Sat Nov 24 18:54:44 2007 > > > New Revision: 597948 > > > > > > URL: http://svn.apache.org/viewvc?rev=597948&view=rev > > > Log: > > > more updates and replace ftl by form in projectmgr > > > > > > Removed: > > > > > > ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/project/editphaseandassoc.ftl > > > Modified: > > > > > > ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/controller.xml > > > ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml > > > ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml > > > ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml > > > > > > Modified: > > > ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/controller.xml > > > URL: > > > http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/controller.xml?rev=597948&r1=597947&r2=597948&view=diff > > > ============================================================================== > > > --- > > > ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/controller.xml > > > (original) > > > +++ > > > ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/controller.xml > > > Sat Nov 24 18:54:44 2007 > > > @@ -103,6 +103,12 @@ > > > <response name="success" type="view" value="FindTask"/> > > > <response name="error" type="view" value="FindTask"/> > > > </request-map> > > > + <request-map uri="createProjectPhase"> > > > + <security https="true" auth="true"/> > > > + <event type="simple" > > > path="org/ofbiz/workeffort/workeffort/WorkflowSimpleEvents.xml" > > > invoke="createWorkEffort"/> > > > + <response name="success" type="view" value="FindPhase"/> > > > + <response name="error" type="view" value="FindPhase"/> > > > + </request-map> > > > <request-map uri="updateTask"> > > > <security https="true" auth="true"/> > > > <event type="service" invoke="updateWorkEffort"/> > > > > > > Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml > > > URL: > > > http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml?rev=597948&r1=597947&r2=597948&view=diff > > > ============================================================================== > > > --- ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml > > > (original) > > > +++ ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml Sat > > > Nov 24 18:54:44 2007 > > > @@ -213,7 +213,7 @@ > > > <order-by field-name="phaseName"/> > > > <order-by field-name="taskName"/> > > > </entity-and> > > > - <set field="workEffort" from-field=""/> > > > + <set field="task" from-field=""/> > > > </actions> > > > <widgets> > > > <decorator-screen name="CommonProjectDecorator" > > > location="${parameters.mainDecoratorLocation}"> > > > @@ -339,10 +339,11 @@ > > > <set field="titleProperty" value="PageTitleEditPhase"/> > > > <set field="tabButtonItem" value="phases"/> > > > <set field="labelTitleProperty" > > > value="PageTitleFindPhase"/> > > > - <set field="workEffortId" > > > from-field="parameters.workEffortIdFrom"/> > > > - <set field="workEffortIdFrom" > > > from-field="parameters.workEffortIdFrom"/> > > > - <set field="workEffortTypeId" > > > from-field="parameters.workEffortTypeId"/> > > > - <script > > > location="component://projectmgr/webapp/projectmgr/WEB-INF/actions/ChildWorkEffort.bsh"/> > > > + <set field="projectId" > > > from-field="parameters.workEffortIdFrom"/> > > > + <entity-and entity-name="WorkEffort" list-name="phases"> > > > + <field-map field-name="workEffortParentId" > > > env-name="projectId"/> > > > + <field-map field-name="workEffortTypeId" > > > value="PHASE"/> > > > + </entity-and> > > > </actions> > > > <widgets> > > > <decorator-screen name="CommonProjectDecorator" > > > location="${parameters.mainDecoratorLocation}"> > > > @@ -356,9 +357,12 @@ > > > <include-form name="ListPhases" > > > location="component://projectmgr/widget/forms/ProjectForms.xml"/> > > > </container> > > > > > > </container> > > > - <platform-specific> > > > - <html><html-template > > > location="component://projectmgr/webapp/projectmgr/project/editphaseandassoc.ftl"/></html> > > > - </platform-specific> > > > + <container style="screenlet"> > > > + <container > > > style="screenlet-title-bar"><label > > > style="boxhead">${uiLabelMap.PageTitleAddPhase}</label></container> > > > > > > + <container style="screenlet-body"> > > > + <include-form > > > name="AddProjectPhase" > > > location="component://projectmgr/widget/forms/TaskForms.xml"/> > > > + </container> > > > + </container> > > > </widgets> > > > </section> > > > </decorator-section> > > > > > > Modified: > > > ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml > > > URL: > > > http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml?rev=597948&r1=597947&r2=597948&view=diff > > > ============================================================================== > > > --- ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml > > > (original) > > > +++ ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml > > > Sat Nov 24 18:54:44 2007 > > > @@ -145,13 +145,9 @@ > > > <field-map field-name="statusId" > > > env-name="currentStatusId"/> > > > </entity-one> > > > </row-actions> > > > - <field name="workEffortTypeId"><hidden/></field> > > > - <field name="workEffortId"><hidden/></field> > > > <field name="workEffortIdFrom"><hidden/></field> > > > - <field name="fromDate"><hidden/></field> > > > - <field name="workEffortAssocTypeId"><hidden/></field> > > > <field name="workEffortIdTo" > > > entry-name="workEffortId"><hidden/></field> > > > - <field name="workEffortName" position="1" > > > title="${uiLabelMap.CommonName}*"><display/></field> > > > + <field name="workEffortName" position="1" > > > title="${uiLabelMap.CommonName}*"><text/></field> > > > <field name="currentStatusId"> > > > <drop-down allow-empty="false" > > > current-description="${currentStatus.description}"> > > > <entity-options entity-name="StatusValidChangeToDetail" > > > key-field-name="statusIdTo" description="${transitionName} > > > (${description})"> > > > @@ -161,10 +157,6 @@ > > > </drop-down> > > > </field> > > > <field name="description" > > > title="${uiLabelMap.CommonDescription}"><text size="15"/></field> > > > - <field name="estimatedStartDate" > > > entry-name="workEffortToEstimatedStartDate" > > > title="${uiLabelMap.WorkEffortStartDate}"><date-time/></field> > > > - <field name="estimatedCompletionDate" > > > entry-name="workEffortToEstimatedCompletionDate" > > > title="${uiLabelMap.WorkEffortStartDate}"><date-time/></field> > > > - <field name="actualStartDate" entry-name="actualStartDate" > > > title="${uiLabelMap.WorkEffortCompletionDate}"><date-time/></field> > > > - <field name="actualCompletionDate" > > > entry-name="actualCompletionDate" > > > title="${uiLabelMap.WorkEffortCompletionDate}"><date-time/></field> > > > <field name="submitButton" > > > title="${uiLabelMap.CommonUpdate}"><submit button-type="button"/></field> > > > </form> > > > <form name="ListPhaseTaskInfo" type="list" list-name="phases"> > > > > > > Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml > > > URL: > > > http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml?rev=597948&r1=597947&r2=597948&view=diff > > > ============================================================================== > > > --- ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml > > > (original) > > > +++ ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml Sat > > > Nov 24 18:54:44 2007 > > > @@ -24,12 +24,12 @@ > > > <form name="EditTask" type="single" target="updateTask" > > > default-map-name="task"> > > > <actions> > > > <set field="projectId" > > > from-field="parameters.workEffortIdFrom"/> > > > - <entity-one entity-name="StatusItem" > > > value-name="currentStatus" auto-field-map="false"> > > > + <entity-one entity-name="StatusItem" > > > value-name="currentStatus" auto-field-map="false"> > > > <field-map field-name="statusId" > > > env-name="task.statusId"/> > > > </entity-one> > > > </actions> > > > <alt-target use-when="projectId!=null" > > > target="createProjectTaskOrPhase"/> > > > - <alt-target use-when="task==null" target="createTask"/> > > > + <alt-target use-when="task==null&&projectId==null" > > > target="createTask"/> > > > <field name="workEffortIdFrom"><hidden > > > value="${parameters.workEffortIdFrom}"/></field> > > > <field name="DONE_PAGE"><hidden value="${donePage}"/></field> > > > <field name="workEffortTypeId"><hidden value="TASK"/></field> > > > @@ -37,6 +37,7 @@ > > > <field use-when="task==null&&taskId==null" name="taskId" > > > title="${uiLabelMap.ProjectMgrWorkEffortId}"><ignored/></field> > > > <field use-when="task==null&&taskId!=null" > > > name="workEffortName" title="${uiLabelMap.CommonName}*" > > > tooltip="${uiLabelMap.CommonRequired}"><text/></field> > > > <field use-when="task!=null" name="workEffortName" > > > title="${uiLabelMap.CommonName}*"><display/></field> > > > + <field use-when="task==null&&taskId!=null" > > > name="workEffortName" title="${uiLabelMap.CommonName}*"><text/></field> > > > <field name="description" > > > title="${uiLabelMap.CommonDescription}"><text/></field> > > > <field use-when="task!=null" name="statusId" > > > title="${uiLabelMap.CommonStatus}"> > > > <drop-down allow-empty="false" > > > current-description="${currentStatus.description}"> > > > @@ -97,13 +98,22 @@ > > > <field name="actualCompletionDate" > > > title="${uiLabelMap.FormFieldTitle_actualCompletionDate}"><date-time/></field> > > > <field name="save" > > > title="${uiLabelMap.CommonSave}"><submit/></field> > > > </form> > > > - <form name="AddPhase" type="single" > > > target="createProjectTaskOrPhase" default-map-name="dummy"> > > > + <form name="AddPhase" type="single" > > > target="createProjectTaskOrPhase"> > > > <field name="workEffortIdFrom"><hidden > > > value="${parameters.workEffortIdFrom}"/></field> > > > + <field name="workEffortParentId"><hidden > > > value="${projectId}"/></field> > > > <field name="workEffortTypeId"><hidden value="PHASE"/></field> > > > <field name="currentStatusId"><hidden > > > value="CAL_ACCEPTED"/></field> > > > <field name="workEffortName" title="${uiLabelMap.CommonName}*" > > > tooltip="${uiLabelMap.CommonRequired}"><text/></field> > > > <field name="description" > > > title="${uiLabelMap.CommonDescription}"><text/></field> > > > + <field name="save" > > > title="${uiLabelMap.CommonSave}"><submit/></field> > > > + </form> > > > + <form name="AddProjectPhase" type="single" > > > target="createProjectPhase"> > > > + <field name="workEffortIdFrom"><hidden > > > value="${parameters.workEffortIdFrom}"/></field> > > > <field name="workEffortParentId"><hidden > > > value="${projectId}"/></field> > > > + <field name="workEffortTypeId"><hidden value="PHASE"/></field> > > > + <field name="currentStatusId"><hidden > > > value="CAL_ACCEPTED"/></field> > > > + <field name="workEffortName" title="${uiLabelMap.CommonName}*" > > > tooltip="${uiLabelMap.CommonRequired}"><text/></field> > > > + <field name="description" > > > title="${uiLabelMap.CommonDescription}"><text/></field> > > > <field name="save" > > > title="${uiLabelMap.CommonSave}"><submit/></field> > > > </form> > > > > > > @@ -118,8 +128,8 @@ > > > </field> > > > <field name="workEffortTypeId" > > > title="${uiLabelMap.ProjectMgrWorkEffortTypeId}"><display-entity > > > entity-name="WorkEffortType"/></field> > > > <field name="createdStamp"><display/></field> > > > - <field name="phase"><display > > > description="${phaseName}[${phaseId}]"/></field> > > > - <field name="project"><hyperlink > > > target="EditProject?workEffortId=${projectId}" > > > description="${projectName}[${projectId}]"/></field> > > > + <field name="phase"><hyperlink > > > target="FindPhase?workEffortIdFrom=${projectId}" > > > description="${phaseName}[${phaseId}]"/></field> > > > + <field name="project"><hyperlink > > > target="EditProject?workEffortIdFrom=${projectId}" > > > description="${projectName}[${projectId}]"/></field> > > > </form> > > > <form name="ListChildEfforts" target="updateTaskListAndAssoc" > > > title="" list-name="tasks" type="list" separate-columns="true" > > > paginate-target="FindTaskList"> > > > <row-actions> > > > > > > > > > >
