You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Srikanth Madarapu <sr...@senior-systems.com> on 2005/01/27 15:30:13 UTC

Math in the expressions.

Hi

  How can I do some Math in the expressions, like the following...

                <h:panelGrid cellspacing="3" id="command" columns="#{(manageProfileFace.addressHelper.columnCount+1)}">

I am getting ClassCastException with this kind of expression. Is there any way to achieve this ? I tried with and without parenthesis. I am using this columnCount in couple of places, in one location I need whatever is returned by getColumnCount and here I need to add one.

TIA

-Srikanth Madarapu


Re: Datatable Problem

Posted by Werner Punz <we...@gmx.at>.
Yes immediate does not change anything regarding my problem.
(true or false no big difference)

Ok, I guess I found the problem, or sort of, I am still
kindof stuck on why this happens.
What happens is that the table is rendered before the query values
are set into the query bean.
What happens now is:
I press the link, the table is rendered immediately, the
values are passed down to the query bean, the values are rendered
back into the search part of my form (which are rendered in the correct 
order) and the method is called in the end which should handle the 
forwarding.

A workaround would be, and that seems to work, to set an event
and get the values directly as parameters but that is not what I intended.

The main problem I see is, that the table seems to be stuck at immediate 
true with its rendering and the rest of the components at immediate 
false, but the Data Table component does not accept any immediate params.

Btw... the preserveDataModel value also seems to do nothing....
I implemented a caching in my data model with some kind of access cache 
window but every time the DataTable is rendered anew, the data model is 
generated newly, which renders the caching on model level useless....






Martin Marinschek wrote:

>have you put the "immediate" attribute on the link?
>
>regards,
>
>Martin
>
>
>On Thu, 27 Jan 2005 16:18:06 +0100, Werner Punz <we...@gmx.at> wrote:
>  
>
>>Hi, I have a weird problem, where I dont know what the cause is.
>>Following Situation, I am trying to do a search form with a result
>>data table within one page.
>>
>>What I am doing, is that the search basically is performed via a custom
>>Data model (which works quite nicely)
>>The Query is done via a custom query bean which indirectly has a session
>>scope (I have a history cache with session scope)
>>
>>What happens is following, the search form should pass the search
>>parameters to the query bean, the data model of the table should call
>>the bean and pass the filtered results back to the table view.
>>
>>Well that works sort of, the problem and I dont have any clue why this
>>happens is, that I have to start everything twice until the parameters
>>are passed down the query objects and the query is performed.
>>
>>It seems to me that the order is following:
>>a enter the query params manually, trigger a submit, render the page,
>>fill the form parameters into the query bean....
>>Which is kindof weird and does not make sense.
>>
>>The query bean accessors are standard setter and getters and
>>the query is basically started by pressing a command link which itself
>>triggers a method.
>>
>>I must be missing something here, it seems to me the method is called
>>before the query params are passed into the bean and it definitely is
>>called before the page is rerendered.
>>
>>Did anybody already encounter this weird problem?
>>
>>
>>    
>>
>
>
>  
>


Re: popup problem

Posted by Martin Marinschek <ma...@gmail.com>.
yes, what I meant was that if he wants to go to a page outside of JSF
then he would be alright with using an output-link...

regards

Martin


On Sat, 29 Jan 2005 12:02:47 +0100, Matthias Wessendorf
<ma...@matthias-wessendorf.de> wrote:
> Hi,
> 
> Martin Marinschek wrote:
> > do you need to use commandLink? can you use outputLink as well? using
> > that might solve your problem...
> 
> Perhaps abit theoretical, but <h:outputLink/>
> ends up in HTTP.GET, isn't it?
> 
> Result of HTTP.GET is that you give up any possibility of restoring the
> component tree from the view that created this page.
> 
> -Matthias
> 
> 
> > regards,
> >
> > Martin
> >
> >
> > On Thu, 27 Jan 2005 17:05:51 +0100, Francesco Consumi
> > <co...@istitutodeglinnocenti.it> wrote:
> >
> >>Hi,
> >>I'm sorry if the problem was already treated, but I haven't found in mailbox
> >>folder.
> >>I've to open pages in a new window (target="_blank") with commandLink. The new
> >>window is opened, but the old windows doesn't navigate well anymore: if
> >>I click
> >>on another link, the same page is re-opened. It's look exactly like the "back
> >>button" bug.
> >>
> >>Have someone already solved the problem ?
> >>
> >>thanks,
> >>
> >>--
> >>Francesco Consumi
> >>Ufficio Sistemi informativi
> >>Istituto degli Innocenti
> >>Piazza SS.Annunziata, 12
> >>50122 Firenze
> >>consumi at istitutodeglinnocenti.it
> >>Tel. +39 055 2037320
> >>ICQ# 12516133
> >>
> >>
> >
> >
> 
> --
> Matthias Weßendorf
> Aechterhoek 18
> DE-48282 Emsdetten
> Germany
> phone: +49-2572-9170275
> cell phone: +49-179-1118979
> email: matzew AT apache DOT org
> url: http://www.wessendorf.net
> callto://mwessendorf (Skype)
> icq: 47016183
>

Re: popup problem

Posted by Matthias Wessendorf <ma...@matthias-wessendorf.de>.
Hi,

Martin Marinschek wrote:
> do you need to use commandLink? can you use outputLink as well? using
> that might solve your problem...

Perhaps abit theoretical, but <h:outputLink/>
ends up in HTTP.GET, isn't it?

Result of HTTP.GET is that you give up any possibility of restoring the 
component tree from the view that created this page.

-Matthias



> regards,
> 
> Martin
> 
> 
> On Thu, 27 Jan 2005 17:05:51 +0100, Francesco Consumi
> <co...@istitutodeglinnocenti.it> wrote:
> 
>>Hi,
>>I'm sorry if the problem was already treated, but I haven't found in mailbox
>>folder.
>>I've to open pages in a new window (target="_blank") with commandLink. The new
>>window is opened, but the old windows doesn't navigate well anymore: if
>>I click
>>on another link, the same page is re-opened. It's look exactly like the "back
>>button" bug.
>>
>>Have someone already solved the problem ?
>>
>>thanks,
>>
>>--
>>Francesco Consumi
>>Ufficio Sistemi informativi
>>Istituto degli Innocenti
>>Piazza SS.Annunziata, 12
>>50122 Firenze
>>consumi at istitutodeglinnocenti.it
>>Tel. +39 055 2037320
>>ICQ# 12516133
>>
>>
> 
> 

-- 
Matthias Weßendorf
Aechterhoek 18
DE-48282 Emsdetten
Germany
phone: +49-2572-9170275
cell phone: +49-179-1118979
email: matzew AT apache DOT org
url: http://www.wessendorf.net
callto://mwessendorf (Skype)
icq: 47016183

Re: popup problem

Posted by Heath Borders <he...@gmail.com>.
The reason is exactly the same as the back button bug.  If you switch
to client-side state saving it will solve your problem.


On Thu, 27 Jan 2005 17:16:20 +0100, Martin Marinschek
<ma...@gmail.com> wrote:
> do you need to use commandLink? can you use outputLink as well? using
> that might solve your problem...
> 
> regards,
> 
> Martin
> 
> On Thu, 27 Jan 2005 17:05:51 +0100, Francesco Consumi
> <co...@istitutodeglinnocenti.it> wrote:
> > Hi,
> > I'm sorry if the problem was already treated, but I haven't found in mailbox
> > folder.
> > I've to open pages in a new window (target="_blank") with commandLink. The new
> > window is opened, but the old windows doesn't navigate well anymore: if
> > I click
> > on another link, the same page is re-opened. It's look exactly like the "back
> > button" bug.
> >
> > Have someone already solved the problem ?
> >
> > thanks,
> >
> > --
> > Francesco Consumi
> > Ufficio Sistemi informativi
> > Istituto degli Innocenti
> > Piazza SS.Annunziata, 12
> > 50122 Firenze
> > consumi at istitutodeglinnocenti.it
> > Tel. +39 055 2037320
> > ICQ# 12516133
> >
> >
> 


-- 
-Heath Borders-Wing
hborders@mail.win.org

Re: popup problem

Posted by Martin Marinschek <ma...@gmail.com>.
do you need to use commandLink? can you use outputLink as well? using
that might solve your problem...

regards,

Martin


On Thu, 27 Jan 2005 17:05:51 +0100, Francesco Consumi
<co...@istitutodeglinnocenti.it> wrote:
> Hi,
> I'm sorry if the problem was already treated, but I haven't found in mailbox
> folder.
> I've to open pages in a new window (target="_blank") with commandLink. The new
> window is opened, but the old windows doesn't navigate well anymore: if
> I click
> on another link, the same page is re-opened. It's look exactly like the "back
> button" bug.
> 
> Have someone already solved the problem ?
> 
> thanks,
> 
> --
> Francesco Consumi
> Ufficio Sistemi informativi
> Istituto degli Innocenti
> Piazza SS.Annunziata, 12
> 50122 Firenze
> consumi at istitutodeglinnocenti.it
> Tel. +39 055 2037320
> ICQ# 12516133
> 
>

popup problem

Posted by Francesco Consumi <co...@istitutodeglinnocenti.it>.
Hi,
I'm sorry if the problem was already treated, but I haven't found in mailbox
folder.
I've to open pages in a new window (target="_blank") with commandLink. The new
window is opened, but the old windows doesn't navigate well anymore: if 
I click
on another link, the same page is re-opened. It's look exactly like the "back
button" bug.

Have someone already solved the problem ?

thanks,


-- 
Francesco Consumi
Ufficio Sistemi informativi
Istituto degli Innocenti
Piazza SS.Annunziata, 12
50122 Firenze
consumi at istitutodeglinnocenti.it
Tel. +39 055 2037320
ICQ# 12516133


Re: Datatable Problem

Posted by Martin Marinschek <ma...@gmail.com>.
have you put the "immediate" attribute on the link?

regards,

Martin


On Thu, 27 Jan 2005 16:18:06 +0100, Werner Punz <we...@gmx.at> wrote:
> Hi, I have a weird problem, where I dont know what the cause is.
> Following Situation, I am trying to do a search form with a result
> data table within one page.
> 
> What I am doing, is that the search basically is performed via a custom
> Data model (which works quite nicely)
> The Query is done via a custom query bean which indirectly has a session
> scope (I have a history cache with session scope)
> 
> What happens is following, the search form should pass the search
> parameters to the query bean, the data model of the table should call
> the bean and pass the filtered results back to the table view.
> 
> Well that works sort of, the problem and I dont have any clue why this
> happens is, that I have to start everything twice until the parameters
> are passed down the query objects and the query is performed.
> 
> It seems to me that the order is following:
> a enter the query params manually, trigger a submit, render the page,
> fill the form parameters into the query bean....
> Which is kindof weird and does not make sense.
> 
> The query bean accessors are standard setter and getters and
> the query is basically started by pressing a command link which itself
> triggers a method.
> 
> I must be missing something here, it seems to me the method is called
> before the query params are passed into the bean and it definitely is
> called before the page is rerendered.
> 
> Did anybody already encounter this weird problem?
> 
>

Datatable Problem

Posted by Werner Punz <we...@gmx.at>.
Hi, I have a weird problem, where I dont know what the cause is.
Following Situation, I am trying to do a search form with a result
data table within one page.

What I am doing, is that the search basically is performed via a custom
Data model (which works quite nicely)
The Query is done via a custom query bean which indirectly has a session 
scope (I have a history cache with session scope)

What happens is following, the search form should pass the search 
parameters to the query bean, the data model of the table should call 
the bean and pass the filtered results back to the table view.

Well that works sort of, the problem and I dont have any clue why this 
happens is, that I have to start everything twice until the parameters 
are passed down the query objects and the query is performed.

It seems to me that the order is following:
a enter the query params manually, trigger a submit, render the page, 
fill the form parameters into the query bean....
Which is kindof weird and does not make sense.

The query bean accessors are standard setter and getters and
the query is basically started by pressing a command link which itself
triggers a method.

I must be missing something here, it seems to me the method is called 
before the query params are passed into the bean and it definitely is 
called before the page is rerendered.

Did anybody already encounter this weird problem?