Re: How to Configure Search results using JSF/MyFaces

2009-01-18 Thread Luca Graf
You can use DISTINCT in HQL or an ResultTransFormer 
(Criteria.DISTINCT_ROOT_ENTITY)  in HQL to get no duplicates if an join 
involved.


Greetings,
Luca

Simon Kitching schrieb:

On an almost-off-topic subject: I've always found Hibernate's maxResult
facility to be quite useless. It limits the number of *SQL ROWS*
returned, not the number of *objects*. Therefore when table joins are
involved (and they often are) then the actual number of *objects* that
will be returned can be significantly different from the maxResult
setting.

Have other people had this problem, and if so is there a known solution?

Cheers,
Simon

On Sun, 2009-01-18 at 17:07 +, Cagatay Civici wrote:
  

This is not a UI thing and I think should be handled at data access
rather than UI level.

Hibernate api supports maxResult so you can limit the number of rows
returned.

On Sun, Jan 18, 2009 at 4:57 PM, bansi  wrote:

We use JSF 1.2, RichFaces 3.1, Spring 2.5, Hibernate 3.2 and

have following
requirement

"The maximum number of rows returned must be configurable so

that users
don't query too much information."

We are able to successfully implement search using RichFaces

walk method of
Serializable data model which provides dataScroller for
pagination

Any pointers/suggestions will be greatly appreciated




  

  




Re: How to Configure Search results using JSF/MyFaces

2009-01-18 Thread bansi

Hi Cagatay
Thanks for quick response. I am looking for configuration of searchResults
through queryString name-value pair  i.e. ?maxResult=100

As its not possible to have GET request in JSF , wondering how it can be
done



Cagatay Civici wrote:
> 
> This is not a UI thing and I think should be handled at data access rather
> than UI level.
> 
> Hibernate api supports maxResult so you can limit the number of rows
> returned.
> 
> On Sun, Jan 18, 2009 at 4:57 PM, bansi  wrote:
> 
>>
>> We use JSF 1.2, RichFaces 3.1, Spring 2.5, Hibernate 3.2 and have
>> following
>> requirement
>>
>> "The maximum number of rows returned must be configurable so that users
>> don't query too much information."
>>
>> We are able to successfully implement search using RichFaces walk method
>> of
>> Serializable data model which provides dataScroller for pagination
>>
>> Any pointers/suggestions will be greatly appreciated
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/How-to-Configure-Search-results-using-JSF-MyFaces-tp21530052p21530052.html
>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-Configure-Search-results-using-JSF-MyFaces-tp21530052p21535978.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Re: How to Configure Search results using JSF/MyFaces

2009-01-18 Thread Simon Kitching
On an almost-off-topic subject: I've always found Hibernate's maxResult
facility to be quite useless. It limits the number of *SQL ROWS*
returned, not the number of *objects*. Therefore when table joins are
involved (and they often are) then the actual number of *objects* that
will be returned can be significantly different from the maxResult
setting.

Have other people had this problem, and if so is there a known solution?

Cheers,
Simon

On Sun, 2009-01-18 at 17:07 +, Cagatay Civici wrote:
> This is not a UI thing and I think should be handled at data access
> rather than UI level.
> 
> Hibernate api supports maxResult so you can limit the number of rows
> returned.
> 
> On Sun, Jan 18, 2009 at 4:57 PM, bansi  wrote:
> 
> We use JSF 1.2, RichFaces 3.1, Spring 2.5, Hibernate 3.2 and
> have following
> requirement
> 
> "The maximum number of rows returned must be configurable so
> that users
> don't query too much information."
> 
> We are able to successfully implement search using RichFaces
> walk method of
> Serializable data model which provides dataScroller for
> pagination
> 
> Any pointers/suggestions will be greatly appreciated
> 

> 



Re: How to Configure Search results using JSF/MyFaces

2009-01-18 Thread Cagatay Civici
This is not a UI thing and I think should be handled at data access rather
than UI level.

Hibernate api supports maxResult so you can limit the number of rows
returned.

On Sun, Jan 18, 2009 at 4:57 PM, bansi  wrote:

>
> We use JSF 1.2, RichFaces 3.1, Spring 2.5, Hibernate 3.2 and have following
> requirement
>
> "The maximum number of rows returned must be configurable so that users
> don't query too much information."
>
> We are able to successfully implement search using RichFaces walk method of
> Serializable data model which provides dataScroller for pagination
>
> Any pointers/suggestions will be greatly appreciated
>
>
> --
> View this message in context:
> http://www.nabble.com/How-to-Configure-Search-results-using-JSF-MyFaces-tp21530052p21530052.html
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>


How to Configure Search results using JSF/MyFaces

2009-01-18 Thread bansi

We use JSF 1.2, RichFaces 3.1, Spring 2.5, Hibernate 3.2 and have following
requirement

"The maximum number of rows returned must be configurable so that users
don't query too much information."

We are able to successfully implement search using RichFaces walk method of
Serializable data model which provides dataScroller for pagination

Any pointers/suggestions will be greatly appreciated


-- 
View this message in context: 
http://www.nabble.com/How-to-Configure-Search-results-using-JSF-MyFaces-tp21530052p21530052.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.