You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Hans Bakker <ma...@antwebsystems.com> on 2009/04/22 08:49:32 UTC

Re: svn commit: r767136 - in /ofbiz/branches/release09.04: ./ applications/product/webapp/catalog/category/EditCategoryParties.ftl

can you tell me what the advantage is to do this?
in my opinion it makes the code  unnecessary complicated.

regards,
Hans

On Wed, 2009-04-22 at 10:57 +0530, Ashish Nagar wrote:
> jleroux@apache.org wrote:
> > -                <a href="<@o...@ofbizUrl>" class="buttontext">${uiLabelMap.CommonDelete}</a>
> > +                <FORM method="post" action="<@o...@ofbizUrl>" name="lineForm_delete${line}">
> > +                    <#assign hasExpired = false>
> > +                    <input type="hidden" name="productCategoryId" value="${(productCategoryRole.productCategoryId)?if_exists}">
> > +                    <input type="hidden" name="partyId" value="${(productCategoryRole.partyId)?if_exists}">
> > +                    <input type="hidden" name="roleTypeId" value="${(productCategoryRole.roleTypeId)?if_exists}">
> > +                    <input type="hidden" name="fromDate" value="${(productCategoryRole.getTimestamp("fromDate"))?if_exists}">
> > +                    <INPUT type="submit" value="${uiLabelMap.CommonDelete}" style="font-size: x-small;">
> > +                </FORM>
> >   
> Just wondering, could we use anchor <a href= "javascript: 
> document.lineForm_delete${line}.submit()" class= 
> "buttontext">${uiLabelMap.CommonDelete}</a> instead of a submit button 
> so as to maintain consistency?
> 
> --
> Ashish Nagar
> >             
> >   
> 
> 
-- 
Antwebsystems.com: Quality OFBiz services for competitive rates


Re: svn commit: r767136 - in /ofbiz/branches/release09.04: ./ applications/product/webapp/catalog/category/EditCategoryParties.ftl

Posted by Ashish Nagar <as...@hotwaxmedia.com>.
Thanks Hans,

Also an anchor can be placed outside the form, if somehow there occurs a 
need to change the position of the anchor on the page. Thus facilitates 
to submit any form within the document.

--
Ashish Nagar

Hans Bakker wrote:
> Ok, sounds reasonable
> i can support this.
>
> Regards,
> hans
>
> On Wed, 2009-04-22 at 13:04 +0530, Ashish Nagar wrote:
>   
>> Hello Hans,
>>
>> We have used anchors throughout the applications, wherever needed to 
>> pass url parameters. Doing this change, ensures that the layout of the 
>> link will be same as previous one and used consistently throughout the 
>> system. This is equally important on the pages, where there are some 
>> links which are not calling any service, so need not to modify and also 
>> the links which are calling service, need to be modified. Having a 
>> consistent way to pass the parameters is a good idea. Using javascript 
>> leverages you to use it in various manners.
>>
>> Although you can apply the same css on the submit button as well, but 
>> there will be a very minor difference in the layouts of a submit button 
>> and an anchor.
>>
>> Thanks & Regards,
>> --
>> Ashish Nagar
>>
>> Ashish Vijaywargiya wrote:
>>     
>>> These are the way of handling the same thing.
>>> To maintain consistency I did this change.
>>>
>>> Let's see what other has to say about this.
>>> I am fine with either option.
>>>
>>> -- 
>>> Ashish
>>>
>>>
>>> Hans Bakker wrote:
>>>       
>>>> can you tell me what the advantage is to do this?
>>>> in my opinion it makes the code  unnecessary complicated.
>>>>
>>>> regards,
>>>> Hans
>>>>
>>>> On Wed, 2009-04-22 at 10:57 +0530, Ashish Nagar wrote:
>>>>  
>>>>         
>>>>> jleroux@apache.org wrote:
>>>>>    
>>>>>           
>>>>>> -                <a 
>>>>>> href="<@o...@ofbizUrl>" 
>>>>>> class="buttontext">${uiLabelMap.CommonDelete}</a>
>>>>>> +                <FORM method="post" 
>>>>>> action="<@o...@ofbizUrl>" 
>>>>>> name="lineForm_delete${line}">
>>>>>> +                    <#assign hasExpired = false>
>>>>>> +                    <input type="hidden" name="productCategoryId" 
>>>>>> value="${(productCategoryRole.productCategoryId)?if_exists}">
>>>>>> +                    <input type="hidden" name="partyId" 
>>>>>> value="${(productCategoryRole.partyId)?if_exists}">
>>>>>> +                    <input type="hidden" name="roleTypeId" 
>>>>>> value="${(productCategoryRole.roleTypeId)?if_exists}">
>>>>>> +                    <input type="hidden" name="fromDate" 
>>>>>> value="${(productCategoryRole.getTimestamp("fromDate"))?if_exists}">
>>>>>> +                    <INPUT type="submit" 
>>>>>> value="${uiLabelMap.CommonDelete}" style="font-size: x-small;">
>>>>>> +                </FORM>
>>>>>>         
>>>>>>             
>>>>> Just wondering, could we use anchor <a href= "javascript: 
>>>>> document.lineForm_delete${line}.submit()" class= 
>>>>> "buttontext">${uiLabelMap.CommonDelete}</a> instead of a submit 
>>>>> button so as to maintain consistency?
>>>>>
>>>>> -- 
>>>>> Ashish Nagar
>>>>>    
>>>>>           
>>>>>>                     
>>>>>>             
>>>>>     
>>>>>           


Re: svn commit: r767136 - in /ofbiz/branches/release09.04: ./ applications/product/webapp/catalog/category/EditCategoryParties.ftl

Posted by Hans Bakker <ma...@antwebsystems.com>.
Ok, sounds reasonable
i can support this.

Regards,
hans

On Wed, 2009-04-22 at 13:04 +0530, Ashish Nagar wrote:
> Hello Hans,
> 
> We have used anchors throughout the applications, wherever needed to 
> pass url parameters. Doing this change, ensures that the layout of the 
> link will be same as previous one and used consistently throughout the 
> system. This is equally important on the pages, where there are some 
> links which are not calling any service, so need not to modify and also 
> the links which are calling service, need to be modified. Having a 
> consistent way to pass the parameters is a good idea. Using javascript 
> leverages you to use it in various manners.
> 
> Although you can apply the same css on the submit button as well, but 
> there will be a very minor difference in the layouts of a submit button 
> and an anchor.
> 
> Thanks & Regards,
> --
> Ashish Nagar
> 
> Ashish Vijaywargiya wrote:
> > These are the way of handling the same thing.
> > To maintain consistency I did this change.
> >
> > Let's see what other has to say about this.
> > I am fine with either option.
> >
> > -- 
> > Ashish
> >
> >
> > Hans Bakker wrote:
> >> can you tell me what the advantage is to do this?
> >> in my opinion it makes the code  unnecessary complicated.
> >>
> >> regards,
> >> Hans
> >>
> >> On Wed, 2009-04-22 at 10:57 +0530, Ashish Nagar wrote:
> >>  
> >>> jleroux@apache.org wrote:
> >>>    
> >>>> -                <a 
> >>>> href="<@o...@ofbizUrl>" 
> >>>> class="buttontext">${uiLabelMap.CommonDelete}</a>
> >>>> +                <FORM method="post" 
> >>>> action="<@o...@ofbizUrl>" 
> >>>> name="lineForm_delete${line}">
> >>>> +                    <#assign hasExpired = false>
> >>>> +                    <input type="hidden" name="productCategoryId" 
> >>>> value="${(productCategoryRole.productCategoryId)?if_exists}">
> >>>> +                    <input type="hidden" name="partyId" 
> >>>> value="${(productCategoryRole.partyId)?if_exists}">
> >>>> +                    <input type="hidden" name="roleTypeId" 
> >>>> value="${(productCategoryRole.roleTypeId)?if_exists}">
> >>>> +                    <input type="hidden" name="fromDate" 
> >>>> value="${(productCategoryRole.getTimestamp("fromDate"))?if_exists}">
> >>>> +                    <INPUT type="submit" 
> >>>> value="${uiLabelMap.CommonDelete}" style="font-size: x-small;">
> >>>> +                </FORM>
> >>>>         
> >>> Just wondering, could we use anchor <a href= "javascript: 
> >>> document.lineForm_delete${line}.submit()" class= 
> >>> "buttontext">${uiLabelMap.CommonDelete}</a> instead of a submit 
> >>> button so as to maintain consistency?
> >>>
> >>> -- 
> >>> Ashish Nagar
> >>>    
> >>>>                     
> >>>     
> 
-- 
Antwebsystems.com: Quality OFBiz services for competitive rates


Re: svn commit: r767136 - in /ofbiz/branches/release09.04: ./ applications/product/webapp/catalog/category/EditCategoryParties.ftl

Posted by Ashish Nagar <as...@hotwaxmedia.com>.
Hello Hans,

We have used anchors throughout the applications, wherever needed to 
pass url parameters. Doing this change, ensures that the layout of the 
link will be same as previous one and used consistently throughout the 
system. This is equally important on the pages, where there are some 
links which are not calling any service, so need not to modify and also 
the links which are calling service, need to be modified. Having a 
consistent way to pass the parameters is a good idea. Using javascript 
leverages you to use it in various manners.

Although you can apply the same css on the submit button as well, but 
there will be a very minor difference in the layouts of a submit button 
and an anchor.

Thanks & Regards,
--
Ashish Nagar

Ashish Vijaywargiya wrote:
> These are the way of handling the same thing.
> To maintain consistency I did this change.
>
> Let's see what other has to say about this.
> I am fine with either option.
>
> -- 
> Ashish
>
>
> Hans Bakker wrote:
>> can you tell me what the advantage is to do this?
>> in my opinion it makes the code  unnecessary complicated.
>>
>> regards,
>> Hans
>>
>> On Wed, 2009-04-22 at 10:57 +0530, Ashish Nagar wrote:
>>  
>>> jleroux@apache.org wrote:
>>>    
>>>> -                <a 
>>>> href="<@o...@ofbizUrl>" 
>>>> class="buttontext">${uiLabelMap.CommonDelete}</a>
>>>> +                <FORM method="post" 
>>>> action="<@o...@ofbizUrl>" 
>>>> name="lineForm_delete${line}">
>>>> +                    <#assign hasExpired = false>
>>>> +                    <input type="hidden" name="productCategoryId" 
>>>> value="${(productCategoryRole.productCategoryId)?if_exists}">
>>>> +                    <input type="hidden" name="partyId" 
>>>> value="${(productCategoryRole.partyId)?if_exists}">
>>>> +                    <input type="hidden" name="roleTypeId" 
>>>> value="${(productCategoryRole.roleTypeId)?if_exists}">
>>>> +                    <input type="hidden" name="fromDate" 
>>>> value="${(productCategoryRole.getTimestamp("fromDate"))?if_exists}">
>>>> +                    <INPUT type="submit" 
>>>> value="${uiLabelMap.CommonDelete}" style="font-size: x-small;">
>>>> +                </FORM>
>>>>         
>>> Just wondering, could we use anchor <a href= "javascript: 
>>> document.lineForm_delete${line}.submit()" class= 
>>> "buttontext">${uiLabelMap.CommonDelete}</a> instead of a submit 
>>> button so as to maintain consistency?
>>>
>>> -- 
>>> Ashish Nagar
>>>    
>>>>                     
>>>     


Re: svn commit: r767136 - in /ofbiz/branches/release09.04: ./ applications/product/webapp/catalog/category/EditCategoryParties.ftl

Posted by Ashish Vijaywargiya <as...@hotwaxmedia.com>.
These are the way of handling the same thing.
To maintain consistency I did this change.

Let's see what other has to say about this.
I am fine with either option.

--
Ashish


Hans Bakker wrote:
> can you tell me what the advantage is to do this?
> in my opinion it makes the code  unnecessary complicated.
>
> regards,
> Hans
>
> On Wed, 2009-04-22 at 10:57 +0530, Ashish Nagar wrote:
>   
>> jleroux@apache.org wrote:
>>     
>>> -                <a href="<@o...@ofbizUrl>" class="buttontext">${uiLabelMap.CommonDelete}</a>
>>> +                <FORM method="post" action="<@o...@ofbizUrl>" name="lineForm_delete${line}">
>>> +                    <#assign hasExpired = false>
>>> +                    <input type="hidden" name="productCategoryId" value="${(productCategoryRole.productCategoryId)?if_exists}">
>>> +                    <input type="hidden" name="partyId" value="${(productCategoryRole.partyId)?if_exists}">
>>> +                    <input type="hidden" name="roleTypeId" value="${(productCategoryRole.roleTypeId)?if_exists}">
>>> +                    <input type="hidden" name="fromDate" value="${(productCategoryRole.getTimestamp("fromDate"))?if_exists}">
>>> +                    <INPUT type="submit" value="${uiLabelMap.CommonDelete}" style="font-size: x-small;">
>>> +                </FORM>
>>>   
>>>       
>> Just wondering, could we use anchor <a href= "javascript: 
>> document.lineForm_delete${line}.submit()" class= 
>> "buttontext">${uiLabelMap.CommonDelete}</a> instead of a submit button 
>> so as to maintain consistency?
>>
>> --
>> Ashish Nagar
>>     
>>>             
>>>   
>>>       
>>