Hi Jonathon,

>What other columns would you like to sort by?
Well you don't have to display row database values. It's possible to convert
them. For example, if
we're using multi language support, then the database value is just a key to
a translated value. 
But the sorting is working on the database value wich can be very confusing
for a user..

>Sometimes, you might want to sort by a field that is external to the
"findBy" request.
My solutions is KISS (Keep it simple stupid). I don't support such queries.

>Looking for a "header column sort UI" that doesn't use GET, but POST
instead (to workaround 
>possible problems with characters incompatible with URL strings).
I'm just using GET. 

You see. I keep standing on the simple side. 
But a small solution is better than no solution, isn't it:-)

Regards
Michael


jonwimp wrote:
> 
> Hi Immi,
> 
>  > Only restriction: It's sorting on database fields, so it's only working
> on
>  > database field columns.
> 
> What other columns would you like to sort by?
> 
> Sometimes, you might want to sort by a field that is external to the
> "findBy" request. Say your 
> SQL statement retrieves WorkEffort.currentStatusId and you want to sort by
> an external value say 
> in StatusType.description. You'll have to do a combined query (SQL joins),
> and then simply feed in 
>   "ORDER BY StatusType.description".
> 
> Or do you mean sorting outside of the database query?
> 
> I'm interested in this too. I've been beefing up the widget module, like
> you did. Looking for a 
> "header column sort UI" that doesn't use GET, but POST instead (to
> workaround possible problems 
> with characters incompatible with URL strings).
> 
> Jonathon
> 
> Immi wrote:
>> I'm missing a functionality to sort a list by clicking on a column
>> header.
>> I saw a few implementations using header-link=<url>?orderBy=<fieldname>
>> but
>> there's no generic
>> construct. 
>> 
>> In our project I'm using such a generic construct. Internally of the
>> ModelFormField class, I'm building
>> a hyper-link out of the name. 
>> Now the only thing I have to do is setting the new attribute sort="true"
>> and
>> I got a header sorting mechanism.
>> 
>> Only restriction: It's sorting on database fields, so it's only working
>> on
>> database field columns.
>> 
>> I'm just wondering if there's a implementation planned for this subject 
>> or if I should submit my changes to the JIRA. What do you think??
>> 
>> Regards,
>> Michael
>> 
>> Sample: Table with two rows Login/ Enabled. Sorting available on Login.
>> ---------------------------------------------------------------------------------------
>>     <form name="ListLogin" type="list" list-name="listIt">
>>         <actions>
>>             <set field="entityName" value="UserLogin"/>
>>             <service service-name="performFind" result-map-name="result"
>> result-map-list-name="listIt">
>>                 <field-map field-name="inputFields"
>> env-name="requestParameters"/>
>>                 <field-map field-name="entityName"
>> env-name="entityName"/>
>>             </service>
>>         </actions>
>>         <field name="userLoginId" title="Login" sort="true">
>>             <display/>
>>         </field>
>>         <field name="enabled" title="Enabled">
>>             <display/>
>>         </field>
>>     </form>   
>> 
>> http://www.nabble.com/file/7851/list.jpg 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Sorting-columns-on-header-click-tf3570354.html#a9981520
Sent from the OFBiz - Dev mailing list archive at Nabble.com.

Reply via email to