Re: WARN [HtmlLabelRenderer]

2005-12-05 Thread Dennis Byrne
Kasper, 

try placing the element  
after the element w/ @id=documentTitle .

 Original message 
>Date: Tue, 6 Dec 2005 08:42:19 +0100
>From: Kasper Hansen <[EMAIL PROTECTED]>  
>Subject: WARN  [HtmlLabelRenderer]  
>To: users@myfaces.apache.org
>
>Hi, 
>I get this warning:
>08:28:10,484 WARN  [HtmlLabelRenderer] Unable to find 
component 
>'documentTitle' (calling findComponent on 
component 'form1:_id21')
>
>In fact I get it on all my labels! But I do not understand 
what the error 
>means, since there is a component with id documentTitle. I'm 
I reading the 
>error msg. wrong? Please can anyone help me..
>
>Best regards, Kasper
>
>this is my jsf code (I know the td isn't good coding..):
>
>   
>   

>   

>   
value="#{msg.freeText}" />
>   

>   
>   
>   
value="#{searchPage.documentTitle}" required="false">
>   

>   

>   
>   

Dennis Byrne


WARN [HtmlLabelRenderer]

2005-12-05 Thread Kasper Hansen
Hi, 
I get this warning:
08:28:10,484 WARN  [HtmlLabelRenderer] Unable to find component 
'documentTitle' (calling findComponent on component 'form1:_id21')

In fact I get it on all my labels! But I do not understand what the error 
means, since there is a component with id documentTitle. I'm I reading the 
error msg. wrong? Please can anyone help me..

Best regards, Kasper

this is my jsf code (I know the td isn't good coding..):
















Value is not a valid option

2005-12-05 Thread Khurram Ahmed
We have developed an application using myfaces 1.0.9, however due to
some critical bugs in 1.0.9 we were forced to upgrade to myfaces 1.1.0
with the same code base that was working with the previous version of
myfaces 1.0.9. This was when we ran into the "Value is not a valid
option" bug on a page containing several drop down boxes and the JSF
calendar component. After carrying out some research it was discovered
that the bug had been fixed in the nightly build of 2nd December 2005
so we downloaded the latest nightly build of myfaces 1.1.1 (that of 4th
December 2005), however we are running into the same "Value is not an
option" error again. Can someone verify if the bug has really been
fixed? Are there any workarounds?



Re: naming conventions in faces-config.xml

2005-12-05 Thread Simon Kitching

[EMAIL PROTECTED] wrote:

Mike,

thank you for your patience and effort trying to resolve this issue.
I just changed the essential parts to reproduce the error.
Here's the setter in CasesJdbcDAO:

public void setDataSource(JDBCDataSource dataSource) {
  if (log.isDebugEnabled()) log.debug("setting dataSource in casesDAO");
  this.ds = dataSource;
  //the dataSource has to be updated after the bean has been injected
  this.setDataSource(this.ds.getDs());
}

and the correlating snipplet of the faces-config.xml configuration file:

  this one retrieves the cases
  casesDAOBean
 
com.edegger.dao.springJDBC.CasesJdbcDAO

  session
  
dataSource
#{jdbcDataSourceBean}
   



Since the field ds is only used within the class CasesJdbcDAO, I don't need an
getter for this property.
And finally the signature of the class is:

public class CasesJdbcDAO extends JdbcDaoSupport implements CasesDAO {



Just as a guess, you don't have any methods on the base classes that 
have similar names or signatures do you? eg:


class JdbcDaoSupport {
  public void setDataSource(...);
}


Regards,

Simon


Re: naming conventions in faces-config.xml

2005-12-05 Thread mail
Mike,

thank you for your patience and effort trying to resolve this issue.
I just changed the essential parts to reproduce the error.
Here's the setter in CasesJdbcDAO:

public void setDataSource(JDBCDataSource dataSource) {
  if (log.isDebugEnabled()) log.debug("setting dataSource in casesDAO");
  this.ds = dataSource;
  //the dataSource has to be updated after the bean has been injected
  this.setDataSource(this.ds.getDs());
}

and the correlating snipplet of the faces-config.xml configuration file:

  this one retrieves the cases
  casesDAOBean
 
com.edegger.dao.springJDBC.CasesJdbcDAO
  session
  
dataSource
#{jdbcDataSourceBean}
   


Since the field ds is only used within the class CasesJdbcDAO, I don't need an
getter for this property.
And finally the signature of the class is:

public class CasesJdbcDAO extends JdbcDaoSupport implements CasesDAO {

whereas CasesDAO is the interface defining a methode to get all the cases as a
list.
With this configuration, I'm getting the 'javax.servlet.jsp.el.ELException:
Attempt to coerce a value of type "com.edegger.dao.springJDBC.JDBCDataSource"
to type "javax.sql.DataSource"' exception.

To get rid off this exception, I'll need to apply the following chances:

public void setDs(JDBCDataSource dataSource) {
  if (log.isDebugEnabled()) log.debug("setting dataSource in casesDAO");
  this.ds = dataSource;
  //the dataSource has to be updated after the bean has been injected
  this.setDataSource(this.ds.getDs());
}

and the correlating snipplet of the faces-config.xml configuration file:

  this one retrieves the cases
  casesDAOBean
 
com.edegger.dao.springJDBC.CasesJdbcDAO
  session
  
ds
#{jdbcDataSourceBean}
   


The signature stays the same.

I know something's not adding up - but I can't explain it.

Enjoy,

  Kurt




Quoting Mike Kienenberger <[EMAIL PROTECTED]>:

> Kurt, what does both your setter and getter code and method signatures
> look like on CasesJdbcDAO when you're getting this error?
> 
> 'javax.servlet.jsp.el.ELException: Attempt to coerce a value of type
> "JDBCDataSource" to type "javax.sql.DataSource"' indicates an attempt
> to inject a JDBCDataSource into a value binding expecting a
> javax.sql.DataSource.
> 
> Something's not adding up here.
> 
> On 12/5/05, Kurt Edegger <[EMAIL PROTECTED]> wrote:
> > Hi Mike,
> >
> > thank you for your help, but I don't think that your answer is correct.
> > We are talking about two different classes. The first one is
> > CasesJdbcDAO with the setter taking an JDBCDataSource Object and the
> > second on is the JDBCDataSource class having a getDs() method to return
> > the actual javax.sql.DataSource object. To clearify: The JDBCDataSource
> > object is injected to CasesJdbcDAO using the setter in CasesJdbcDAO
> > which takes the correct type of JDBCDataSource.
> > I don't think this is an issue of a misscasted type since it works if
> > the field in CasesJdbcDAO (marked as [1] in my former postings) isn't
> > named 'dataSource'. In that case the JSF implementation seems to
> > interpret the name as a type and causing the exception. In the case it
> > isn't named 'dataSource' (e.g. 'ds' in my example) the injection is done
> > without any problems.
> >
> > I'm appreciating your help and thoughts.
> >
> > Kurt
> >
> >
> >
> > on 12/5/2005 8:54 AM Mike Kienenberger stated:
> > > Your setter and getter return different types.
> > >
> > >  public DataSource getDs()
> > >
> > > needs to be
> > >
> > >  public JDBCDataSource getDs() {
> > >
> > > On 12/2/05, Kurt Edegger <[EMAIL PROTECTED]> wrote:
> > >
> > >>Hi Mike,
> > >>
> > >>thank you for your response.
> > >>
> > >>on 12/2/2005 7:30 AM Mike Kienenberger stated:
> > >> > Can you post the setter method for ds in CasesJdbcDAO?
> > >>
> > >>Here are the crucial parts of CasesJdbcDAO:
> > >>/* the field definition [1]*/
> > >>private JDBCDataSource ds;
> > >>
> > >>/* the setter*/
> > >>public void setDs(JDBCDataSource dataSource) {
> > >>   this.ds = dataSource;
> > >>   this.setDataSource(this.ds.getDs());
> > >>}
> > >>
> > >> > Also can you post the class definition line for JDBCDataSource?
> > >>The JDBCDataSource class is very simple and just holds an
> > >>javax.sql.DataSource object. Here are the interesting parts:
> > >>
> > >>/*the class definition */
> > >>public class JDBCDataSource{
> > >>
> > >> /*the javax.sql.DataSource*/
> > >> private DataSource ds;
> > >> private String jndiLookup;
> > >>...
> > >>
> > >> public DataSource getDs() {
> > >> doLookup();
> > >> return ds;
> > >> }
> > >>
> > >>}
> > >>
> > >>
> > >>The issue again: If I change the name of the field in CasesJdbcDAO at
> > >>position [1] to dataSource, and adjust the injection in faces-config.xml
> > >>accordingly the application crashes with the stated exception.
> > >>
> > >>Any ideas?
> > >>
> > >> Kurt
> > >>
> >
> >
> 






Re: Drilldown type app. without session bean?

2005-12-05 Thread Mike Kienenberger
If you want to use saveState this way, you can.   I don't remember how
the examples provide an alternative, but I have used savestate like
this.

// Could acquire a reference to your data backing bean some
other way if you want
ValueBinding binding =
FacesContext.getCurrentInstance().getApplication().createValueBinding("#{YourBean}");
YourBeanClass YourBean =
(YourBeanClass)binding.getValue(FacesContext.getCurrentInstance());

// get the row and assign it to your request-scoped data backing bean.
YourRowDataClass selectedRow =
(YourRowDataClass)YourUIDataComponent.getRowData();
YourBean.setYourRowValue(selectedRow);

The Master/Detail example and source is available at this url if you
want to investigate the methodology Simon suggested.

http://www.irian.at/myfaces/masterDetail.jsf

On 12/5/05, Yannick Le Teigner <[EMAIL PROTECTED]> wrote:
> Simon,
>
> The problem I face with the saveState component, is that when I place it
> on the master (1st) page, it is, as expected, initialized with no value
> (because the user has yet to click on a row in the datatable to edit a
> user/item.)
> Once the user click on a row, the detail page is displayed. But the
> BackingBean is reloaded from the saveState component, and is set as
> empty (as it was on the master page) -- and not initialized with the
> data from the row the user has clicked on.
> What I would need is somehow to modify the saveState component before
> the detail page is displayed so that I can modify the backingbean inside
> and put one correctly initialized (corresponding to the row the user has
> clicked on).
>
> This seems like a basic app, but I cannot get around it without using
> session scoped bean. I would be very welcome if anyone could show me
> some code with request scoped beans achieving the same results.
>
> Thanks!
>
>  >  is the correct tag to use when you want to avoid
> session-scoped managed
>  > beans.
>  >
>  > I don't know why you have that command-link code; nothing like this
> is necessary to use
>  > t:saveState. If you wish to preserve the state of an entire managed
> bean, then do:
>  >
>  >Master page:
>  >  
>  >
>  > Detail page:
>  >  
>  >
>  > On first visit to the master page, there is no saved state to
> restore, so a default instance
>  > of that bean is created. When the page is serialized after rendering,
> the bean's state is
>  > stored.
>  >
>  > When either the master or detail page is visited thereafter, the
> saved object is recreated
>  > from the saved state, and #{myBackingBean} is set to be a reference
> to the restored
>  > object.
>  >
>  > You can also save just specific fields of a bean via:
>  >  
>  >
>  >Regards,
>  >
>  >Simon
>
>


Re: Drilldown type app. without session bean?

2005-12-05 Thread Simon Kitching

Hi Yannick,

t:saveState performs two actions:

At the very end of the rendering phase, it looks up the object specified 
by its value attribute and serializes it.


During the "restore view" phase, it deserializes its associated object, 
then evaluates its "value" attribute and assigns the recreated object to it.


I don't understand your statements about having "to modify the saveState 
component". You modify the object that the saveState component points 
to, not the saveState component itself. And in general that's trivial.



However from your description below, it looks like you're just trying to 
do a basic master/detail screen. In this case, you don't need saveState 
at all. Sorry if the reason why you want to use saveState here was given 
at the start of this thread; I haven't got that easily available. 
However for basic master/detail stuff, there is an example in the 
"examples" directory of the MyFaces download that you may wish to look 
at; it doesn't need saveState at all.


Regards,

Simon

PS: aargh, I hate top-posting!

Yannick Le Teigner wrote:

Simon,

The problem I face with the saveState component, is that when I place it 
on the master (1st) page, it is, as expected, initialized with no value 
(because the user has yet to click on a row in the datatable to edit a 
user/item.)
Once the user click on a row, the detail page is displayed. But the 
BackingBean is reloaded from the saveState component, and is set as 
empty (as it was on the master page) -- and not initialized with the 
data from the row the user has clicked on.
What I would need is somehow to modify the saveState component before 
the detail page is displayed so that I can modify the backingbean inside 
and put one correctly initialized (corresponding to the row the user has 
clicked on).


This seems like a basic app, but I cannot get around it without using 
session scoped bean. I would be very welcome if anyone could show me 
some code with request scoped beans achieving the same results.


Thanks!

 >  is the correct tag to use when you want to avoid 
session-scoped managed

 > beans.
 >
 > I don't know why you have that command-link code; nothing like this 
is necessary to use
 > t:saveState. If you wish to preserve the state of an entire managed 
bean, then do:

 >
 >Master page:
 >  
 >
 > Detail page:
 >  
 >
 > On first visit to the master page, there is no saved state to 
restore, so a default instance
 > of that bean is created. When the page is serialized after rendering, 
the bean's state is

 > stored.
 >
 > When either the master or detail page is visited thereafter, the 
saved object is recreated
 > from the saved state, and #{myBackingBean} is set to be a reference 
to the restored

 > object.
 >
 > You can also save just specific fields of a bean via:
 >  
 >
 >Regards,
 >
 >Simon







Re: Drilldown type app. without session bean?

2005-12-05 Thread Yannick Le Teigner

Simon,

The problem I face with the saveState component, is that when I place it 
on the master (1st) page, it is, as expected, initialized with no value 
(because the user has yet to click on a row in the datatable to edit a 
user/item.)
Once the user click on a row, the detail page is displayed. But the 
BackingBean is reloaded from the saveState component, and is set as 
empty (as it was on the master page) -- and not initialized with the 
data from the row the user has clicked on.
What I would need is somehow to modify the saveState component before 
the detail page is displayed so that I can modify the backingbean inside 
and put one correctly initialized (corresponding to the row the user has 
clicked on).


This seems like a basic app, but I cannot get around it without using 
session scoped bean. I would be very welcome if anyone could show me 
some code with request scoped beans achieving the same results.


Thanks!

>  is the correct tag to use when you want to avoid 
session-scoped managed

> beans.
>
> I don't know why you have that command-link code; nothing like this 
is necessary to use
> t:saveState. If you wish to preserve the state of an entire managed 
bean, then do:

>
>Master page:
>  
>
> Detail page:
>  
>
> On first visit to the master page, there is no saved state to 
restore, so a default instance
> of that bean is created. When the page is serialized after rendering, 
the bean's state is

> stored.
>
> When either the master or detail page is visited thereafter, the 
saved object is recreated
> from the saved state, and #{myBackingBean} is set to be a reference 
to the restored

> object.
>
> You can also save just specific fields of a bean via:
>  
>
>Regards,
>
>Simon



RE: editable forms

2005-12-05 Thread Yee CN
What I did is that I maintain an enum called screenMode={VIEW,EDIT,ADDNEW}
in the backing bean. 

public boolean isEditMode() {
return this.screenMode == ScreenMode.EDIT || this.screenMode
== ScreenMode.ADDNEW;
}

public boolean isAddnewMode() {
return this.screenMode == ScreenMode.ADDNEW;
//return this.addNew;
}

/**
 * Getting/Setting the ScreenMode Enum as String
 * @return String
 */
public String getScreenMode() {
return this.screenMode.toString() ;
}

public void setScreenMode(String mode) {
this.screenMode = ScreenMode.valueOf(mode) ;
}


In your jsf file you will do:

mailto:[EMAIL PROTECTED] 
Sent: Monday, 5 December 2005 11:06 PM
To: users@myfaces.apache.org
Subject: editable forms

hi group,

in a particular form i want the fields only editable, if there is 
explicitly set a edit-param.

I've tried it with the following code :





But i've noticed that when submitting the form the 'setter'-method of 
the 'backingBean.value' is never called.
Leaving out the 'rendering'-attribute, which means that the component is 
always editable everthing works fine.
I've got the same behaviour when using the 'disabled'-attribute.

Does anybody has an explanation for this or hints how to solve this in a 
'clean way' ?

thanx


ronald
-- 
*
*M-Unicomp GmbH
*
*Ronald Müller
*
*Plauener Straße 163-165, Haus 11
*13053 Berlin
*
*fon   : +49 ( 0 ) 30  / 98 69 61 54
*mobil : +49 ( 0 ) 172 / 93 95 00 4
*fax   : +49 ( 0 ) 30  / 98 69 61 55
*email : [EMAIL PROTECTED]
*web   : www.unicomp-berlin.de




Problem with selectBooleanCheckbox inside dataTable

2005-12-05 Thread Matthias Kahlau
Hi!


I encounter a strange behavior of selectBooleanCheckbox component-binding
inside a dataTable. When I select the checkbox in the last row and call an
action method to delete the selected row, the page is redisplayed with all
the remaining checkboxes selected, that had been deselected before.

This happens only if I select the last row/checkbox, not if I select another
row and press delete. I don't modify any component state in the application.
This behavior is independent of setting the selectBooleanCheckbox or the
delete commandButton to false/true.

The behavior described doesn't happen in any possible case, but always when
the options are shown the first time and I select the last one and press
delete.

If this happens, and the checkboxes are all redisplayed in selected state,
and I press delete, a runtime error is thrown because a "row is
unavailable":

02:36:22,218 ERROR [Engine] StandardWrapperValve[Faces Servlet]:
Servlet.service() for servlet Faces Servlet threw exception
javax.faces.FacesException: Error calling action method of component with id
_id1:_id34
at
org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListen
erImpl.java:74)
at javax.faces.component.UICommand.broadcast(UICommand.java:106)
at
javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:90)
at
javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:132)
at
org.apache.myfaces.lifecycle.LifecycleImpl.applyRequestValues(LifecycleImpl.
java:219)
at
org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:71)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:106)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:237)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:157)
at
org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsF
ilter.java:123)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:186)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:157)
at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.ja
va:75)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:186)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:157)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:214)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContext
Valve.java:198)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:152)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:104)
at
org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalVal
ve.java:66)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:102)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssoci
ationValve.java:150)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:102)
at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:
54)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:102)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137
)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:104)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118
)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:102)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:109)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:705)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
 

Re: Drilldown type app. without session bean?

2005-12-05 Thread Simon Kitching

Yannick Le Teigner wrote:

Hello,

I am trying to remove as many beans as possible from the session scope, 
and I am facing some difficulties with drilldown pages.


Let's say I have a page listing some users in a dataTable. Clicking on a 
user (commandLink), will bring you to a page where you can edit some 
parameters about this user.


Up until today the selected user was placed in session scope.

Now, after changing the scope to request in faces-config, if I try to 
put the user in the request map during the INVOKE_APPLICATION phase 
(when the action of my commandLink is called), then another user (empty 
this one) gets created during the RENDER_RESPONSE phase. The edit page 
displays an empty user.


If I use the t:saveState component (putting one on the listing page, and 
one on the edit page), the one on the listing page is created empty, and 
it is re-created as empty on the edit page...


The code in the action of my commandLink is something along the lines:
FacesContext ctx = FacesContext.getCurrentInstance();
ctx.getExternalContext().getRequestMap().put("#{User}", new User(id));


Anyone knows the correct way of handling this?


 is the correct tag to use when you want to avoid 
session-scoped managed beans.


I don't know why you have that command-link code; nothing like this is 
necessary to use t:saveState. If you wish to preserve the state of an 
entire managed bean, then do:


Master page:
  

Detail page:
  

On first visit to the master page, there is no saved state to restore, 
so a default instance of that bean is created. When the page is 
serialized after rendering, the bean's state is stored.


When either the master or detail page is visited thereafter, the saved 
object is recreated from the saved state, and #{myBackingBean} is set to 
be a reference to the restored object.


You can also save just specific fields of a bean via:
  

Regards,

Simon


Re: Obtaining the url?

2005-12-05 Thread Simon Kitching
Managed beans are created when they are referenced. Any time the EL 
VariableResolver is asked for a variable like "#{foo}", and there is no 
such variable then it checks the managed bean config info. If foo is 
declared there, then an instance of the specified type is created and 
stored in the specified scope under that name.


As EL expressions will only ever be evaluated after the "restore view" 
phase is complete, managed beans can always assume the current view is 
valid.


Regards,

Simon

Andrew Robinson wrote:

To be honest, I have not covered the part of the specification that
talks about bean initialization time. I would not be surprised if it
depends on the bean's scope. In general, I always feel that it is a
good decision to not put business code in a constructor. However,
since JSF may set managed properties, that brings up another question.
In this case, with a request-scoped variable, I would guess that the
bean would be created in the render response phase, but as I said, I
don't know (although I am curious).

Does anyone know?



On 12/5/05, Julián García <[EMAIL PROTECTED]> wrote:

Is there any approach to access the url when the bean is initializing?


Andrew Robinson wrote:

It is set right after the view is created. This differs based on if
there is queued action. If there is an action, the new view is created
during the application invoke phase. If the view is new (new request
or a redirect), then the view is created earlier in the lifecycle (I
can't remember for sure, but I think I remember it being during the
restore view phase).

Once the view is created, getViewRoot() will not return null. Get view
ID on the view root should always return a value to my knowledge
(unless you have an odd view handler). The new view ID is always
available at the render response phase.

On 12/5/05, Julián García <[EMAIL PROTECTED]> wrote:


Andrew Robinson wrote:


Are you looking for:
FacesContext.getCurrentInstance().getViewRoot().getViewId()?

When is this id setI am trying to access this method just after
setting the values configured in my config xml, and it is always showing
null.

Thanks-.



On 11/28/05, Julián García <[EMAIL PROTECTED]> wrote:



How can I access the url that is being currently displayed for the user
using the FacesContext? I need this to do a custom filter for
authorization using acegi.Any experiences to share with that?

Thanks a lot.

Julian












Drilldown type app. without session bean?

2005-12-05 Thread Yannick Le Teigner

Hello,

I am trying to remove as many beans as possible from the session scope, 
and I am facing some difficulties with drilldown pages.


Let's say I have a page listing some users in a dataTable. Clicking on a 
user (commandLink), will bring you to a page where you can edit some 
parameters about this user.


Up until today the selected user was placed in session scope.

Now, after changing the scope to request in faces-config, if I try to 
put the user in the request map during the INVOKE_APPLICATION phase 
(when the action of my commandLink is called), then another user (empty 
this one) gets created during the RENDER_RESPONSE phase. The edit page 
displays an empty user.


If I use the t:saveState component (putting one on the listing page, and 
one on the edit page), the one on the listing page is created empty, and 
it is re-created as empty on the edit page...


The code in the action of my commandLink is something along the lines:
FacesContext ctx = FacesContext.getCurrentInstance();
ctx.getExternalContext().getRequestMap().put("#{User}", new User(id));


Anyone knows the correct way of handling this?

Thank you,
Yannick


Re: Another Problem with t:inputHtml

2005-12-05 Thread Dave
Has this problem been fixed?  Could you log a bug?     By the way, where to log a MyFaces bug?  Thanks.[EMAIL PROTECTED] wrote:  When a page containing this widget is presented, the initial htmlfragment I want the user to see/edit is shownAs the mouse enters the widget the data is cleared - as thought thevalue has been set to "" or nullIs there a fix / workaround for thisThanksStefan Maric | IT & Professional Services | BT Global Serviceswww.bt.com/globalservicesThis electronic message contains information from BritishTelecommunications plc, which may be privilegedor confidential. The information is intended for use only by theindividual(s) or entity named above. If youare not the intended recipient, be aware 
 that any
 disclosure, copying,distribution or use of the contents ofthis information is strictly prohibited. If you have received thiselectronic message in error, please notifyme by telephone or email (to the number or email address above)immediately.Activity and use of the British Telecommunications plc e-mail system ismonitored to secure its effectiveoperation and for other lawful business purposes. Communications usingthis system will also be monitoredand may be recorded to secure effective operation and for other lawfulbusiness purposes.British Telecommunications plc. Registered office: 81 Newgate StreetLondon EC1A 7AJ Registered inEngland no: 180  
	
		Yahoo! Shopping 
Find Great Deals on Gifts at Yahoo! Shopping 

Re: Obtaining the url?

2005-12-05 Thread Andrew Robinson
To be honest, I have not covered the part of the specification that
talks about bean initialization time. I would not be surprised if it
depends on the bean's scope. In general, I always feel that it is a
good decision to not put business code in a constructor. However,
since JSF may set managed properties, that brings up another question.
In this case, with a request-scoped variable, I would guess that the
bean would be created in the render response phase, but as I said, I
don't know (although I am curious).

Does anyone know?



On 12/5/05, Julián García <[EMAIL PROTECTED]> wrote:
> Is there any approach to access the url when the bean is initializing?
>
>
> Andrew Robinson wrote:
> > It is set right after the view is created. This differs based on if
> > there is queued action. If there is an action, the new view is created
> > during the application invoke phase. If the view is new (new request
> > or a redirect), then the view is created earlier in the lifecycle (I
> > can't remember for sure, but I think I remember it being during the
> > restore view phase).
> >
> > Once the view is created, getViewRoot() will not return null. Get view
> > ID on the view root should always return a value to my knowledge
> > (unless you have an odd view handler). The new view ID is always
> > available at the render response phase.
> >
> > On 12/5/05, Julián García <[EMAIL PROTECTED]> wrote:
> >
> >>Andrew Robinson wrote:
> >>
> >>>Are you looking for:
> >>>FacesContext.getCurrentInstance().getViewRoot().getViewId()?
> >>
> >>When is this id setI am trying to access this method just after
> >>setting the values configured in my config xml, and it is always showing
> >>null.
> >>
> >>Thanks-.
> >>
> >>
> >>>On 11/28/05, Julián García <[EMAIL PROTECTED]> wrote:
> >>>
> >>>
> How can I access the url that is being currently displayed for the user
> using the FacesContext? I need this to do a custom filter for
> authorization using acegi.Any experiences to share with that?
> 
> Thanks a lot.
> 
> Julian
> 
> >>>
> >>>
> >>
> >
>
>


Re: datatable - problems with commandlink

2005-12-05 Thread Simon Kitching

Alexander Traeder wrote:

Hi,

tried this for some days:
t->tomahawk (myfaces-1.1.1 and nightly build)
   rowIndexVar="rowIndex" preserveDataModel="true"

rows="10" rendered="true">
   
  
   
   
   
   
   property="#{test.selectedRow}" value="#{row[0]}" />

   
   
   
  
   
 
   

  
   

The purpose is to detect a row item is selected.
While debugging the setSelectedRow-method is called for every row - not 
only the selected one!

If I try this with  it works.
what I detected on the client side is that the id for  is 
not filled right:


... id="test:testform:test_datatable:_id21" ...
... id="test:testform:test_datatable:_id21" ...
... id="test:testform:test_datatable:_id21" ...

for  it is:

... id="test:testform:test_datatable:0:_id21" ...
... id="test:testform:test_datatable:1:_id21" ...
... id="test:testform:test_datatable:2:_id21" ...


Am I doing something wrong or is this a bug?


I don't know what might be causing your problem. I'm using a SVN build 
from about 4 days ago, and I see this for ids in a table when viewing 
the source in a browser:

   body:searchForm:theGrid_0:rowSelector
   body:searchForm:theGrid_1:rowSelector
   body:searchForm:theGrid_2:rowSelector

It looks to me like your "id" output is instead from logging the 
component's id somehow...how exactly did you get this output?


I haven't seen any commits to UIData that might have broken it in the 
last few days.


Regards,

Simon


datatable - problems with commandlink

2005-12-05 Thread Alexander Traeder

Hi,

tried this for some days:
t->tomahawk (myfaces-1.1.1 and nightly build)
   rowIndexVar="rowIndex" preserveDataModel="true"

rows="10" rendered="true">
   
  
   
 
  immediate="true" >   
   
   property="#{test.selectedRow}" value="#{row[0]}" />

   
   
   
  
   
 
   
   
   

   

The purpose is to detect a row item is selected.
While debugging the setSelectedRow-method is called for every row - not 
only the selected one!

If I try this with  it works.
what I detected on the client side is that the id for  is 
not filled right:


... id="test:testform:test_datatable:_id21" ...
... id="test:testform:test_datatable:_id21" ...
... id="test:testform:test_datatable:_id21" ...

for  it is:

... id="test:testform:test_datatable:0:_id21" ...
... id="test:testform:test_datatable:1:_id21" ...
... id="test:testform:test_datatable:2:_id21" ...


Am I doing something wrong or is this a bug?

Thanks Alex


Re: does not reference an Object of type SelectItem

2005-12-05 Thread Craig McClanahan
On 12/5/05, Simon Kitching <[EMAIL PROTECTED]> wrote:
jsf-api.jar is *not* part of the j2ee.jar (at least not yet).Actually, it's unlikely to ever be bundled, as (at least in the myfaceslibs) there is significant library-specific logic in the "api" classes.
All the "api" indicates is that the APIs for those classes are tightlydefined; this is not an "spi" (service provider interface).
FYI, JSF 1.2 will be a required part of the Java EE 5 platform. 
Compliant app servers must provide not only the API classes, but also
the corresponding implementation, just as they are required to provide
both API and implementation for other APIs like servlet and JSP.
Regards,Simon
Craig
 
Mike Duffy wrote:> I thought that might be it and I could not find the jsf-api.jar
 in any class path.>> Is the jsf-api.jar part of the j2ee.jar?>> Thx.>> Mike>>> --- Martin Marinschek <[EMAIL PROTECTED]
> wrote:>>> ... and this should be ok. You can return an array of SelectItem objects. Do you have any class loader issues here? Maybe your javax.faces.api
 classes are loaded from a class loader>> which is not accessible from your web-app? Or you have both the>> jsf-api.jar and the myfaces-api.jar in your classpath? regards,>>
>> Martin On 12/5/05, Martin van den Bemt <[EMAIL PROTECTED]> wrote:>>> Mike Duffy wrote: I am trying to create a value binding for a  tag.  The object reference is
 definitely a collection of SelectItem objects (I've even tried it with an array). However, I am getting an error that tells me the object reference does not contain
>> SelectItem objects.  The error message state, "but of type : Ljavax.faces.model.SelectItem;". What does the "Ljavax" reference mean?
>>> [Ljavax.faces.model.SelectItem; means an array of SelectItem objects..>>>


Re: valueChangeListener and disappearing cursor

2005-12-05 Thread Rogerio Pereira
Use the new focus component in sandbox.


2005/12/5, Tony Czupryna <[EMAIL PROTECTED]>:
> I have a valueChangeListener set on an inputTextBox. If I change the value
> and once the page is rerendered, there is no cursor. Does anyone know how to
> make sure the cursor shows up in the next input box (assume I hit 'Tab')?
>
>   onchange="submit()"
> valueChangeListener="#{user.firstNameChanged}"
> immediate="true"/>
>
>  public void firstNameChanged(ValueChangeEvent e){
>  String name = (String)e.getNewValue();
>  setFirstName(name);
>  FacesContext.getCurrentInstance().renderResponse();
>}
>
>  Thanks in advance,
>  Tony
>
>
>
>
>


--
Yours truly (Atenciosamente),

Rogério


valueChangeListener and disappearing cursor

2005-12-05 Thread Tony Czupryna
I have a valueChangeListener set on an inputTextBox. If I change the
value and once the page is rerendered, there is no cursor. Does anyone
know how to make sure the cursor shows up in the next input box (assume
I hit 'Tab')?


  
valueChangeListener="#{user.firstNameChanged}" immediate="true"/>

public void firstNameChanged(ValueChangeEvent e){
    String name = (String)e.getNewValue();
    setFirstName(name);
    FacesContext.getCurrentInstance().renderResponse();
  }

Thanks in advance,
Tony






Re: Obtaining the url?

2005-12-05 Thread Julián García

Is there any approach to access the url when the bean is initializing?


Andrew Robinson wrote:

It is set right after the view is created. This differs based on if
there is queued action. If there is an action, the new view is created
during the application invoke phase. If the view is new (new request
or a redirect), then the view is created earlier in the lifecycle (I
can't remember for sure, but I think I remember it being during the
restore view phase).

Once the view is created, getViewRoot() will not return null. Get view
ID on the view root should always return a value to my knowledge
(unless you have an odd view handler). The new view ID is always
available at the render response phase.

On 12/5/05, Julián García <[EMAIL PROTECTED]> wrote:


Andrew Robinson wrote:


Are you looking for:
FacesContext.getCurrentInstance().getViewRoot().getViewId()?


When is this id setI am trying to access this method just after
setting the values configured in my config xml, and it is always showing
null.

Thanks-.



On 11/28/05, Julián García <[EMAIL PROTECTED]> wrote:



How can I access the url that is being currently displayed for the user
using the FacesContext? I need this to do a custom filter for
authorization using acegi.Any experiences to share with that?

Thanks a lot.

Julian












Re: Obtaining the url?

2005-12-05 Thread Andrew Robinson
It is set right after the view is created. This differs based on if
there is queued action. If there is an action, the new view is created
during the application invoke phase. If the view is new (new request
or a redirect), then the view is created earlier in the lifecycle (I
can't remember for sure, but I think I remember it being during the
restore view phase).

Once the view is created, getViewRoot() will not return null. Get view
ID on the view root should always return a value to my knowledge
(unless you have an odd view handler). The new view ID is always
available at the render response phase.

On 12/5/05, Julián García <[EMAIL PROTECTED]> wrote:
> Andrew Robinson wrote:
> > Are you looking for:
> > FacesContext.getCurrentInstance().getViewRoot().getViewId()?
> When is this id setI am trying to access this method just after
> setting the values configured in my config xml, and it is always showing
> null.
>
> Thanks-.
>
> >
> > On 11/28/05, Julián García <[EMAIL PROTECTED]> wrote:
> >
> >>How can I access the url that is being currently displayed for the user
> >>using the FacesContext? I need this to do a custom filter for
> >>authorization using acegi.Any experiences to share with that?
> >>
> >>Thanks a lot.
> >>
> >>Julian
> >>
> >
> >
>
>


Re: Obtaining the url?

2005-12-05 Thread Julián García

Andrew Robinson wrote:

Are you looking for:
FacesContext.getCurrentInstance().getViewRoot().getViewId()?
When is this id setI am trying to access this method just after 
setting the values configured in my config xml, and it is always showing 
null.


Thanks-.



On 11/28/05, Julián García <[EMAIL PROTECTED]> wrote:


How can I access the url that is being currently displayed for the user
using the FacesContext? I need this to do a custom filter for
authorization using acegi.Any experiences to share with that?

Thanks a lot.

Julian








Re: Tree2 unique attribute id creation problem

2005-12-05 Thread Anu Padki
All this server-side things are working fine.
My problem is the  is not known to _javascript_.
I need to read the node in _javascript_. Javscrit can read only the id that is available to the web page.
Any suggestions to creat this id in jsp, any pointers to such scripts?
Is there any other way to open the tree in a separate window, check a
node and take the node id to the page that opened the tree window?
Please advise.
Thanks all.
- AnuOn 12/2/05, Sean Schofield <[EMAIL PROTECTED]> wrote:
You cannot use a valuebinding _expression_ for the id of a JSFcomponent.  Try the  technique that Keith is suggesting.seanOn 12/2/05, Keith Lynch <[EMAIL PROTECTED]
> wrote:> As far as I know this is impossible to do. The id's need to be set with> static data which is embedded in the jsp file.>> You can alternatively set them yourself in the jsp, which is cumborsome, or
> alternatively you could use the node id  as a parameter to an> actionListener.>> >> actionListener="#{YourActionListenerClass.doSomething
}">>> >> In doSomething>> public void doSomething(ActionEvent action) {
>   String nodeID => getParameterFromActionEvent(event,"node-id");>// .> }>>>   public static Object> getParameterFromActionEvent(ActionEvent actionEvent, String
> paramName)>   {> UIComponent component = actionEvent.getComponent();> List children = component.getChildren ();> for (Iterator iter = children.iterator(); iter.hasNext();) {
>   UIComponent element = (UIComponent) iter.next();>   if(element.getClass() == UIParameter.class) {> if( StringUtils.equals(> ((UIParameter)element).getName(), paramName)) {
>   return ((UIParameter)element).getValue();> }>   }> }> return null;>>   }>> On 12/1/05, Anu Padki < 
[EMAIL PROTECTED]> wrote:> > Thanks for your response.> > Here is how it is done.> > I do set the identifier using node.setIdentfier.> > What I want is in the facet where I display the node give it a unique id,
> where I define> >  want to set this id.> > JSF generates some id, however, it is not meaningful, it is cryptic. I> would like to have this id same value as that I set in new TreeNodeBase.
> > Please advise.> > - anu> >> >> >> >> > On 12/1/05, Keith Lynch <[EMAIL PROTECTED] > wrote:> > > I'm not sure if you're setting the node-id in your code. You have to do
> this when you create the tree element.> > >> > > TreeNodeBase newNode = new TreeNodeBase("node-type", description> ,theNodeIdentifier , true);> > >> > > You can then use #{
node.identifier}> > >> > > where node is> > >> > >  > > >   id="elementTree"> > >   var="node"
> > >   binding="#{Binding}">> > >> > > Hope this is your problem> > > Keith> > >> > >> > >> > > On 12/1/05, Anu Padki < 
[EMAIL PROTECTED]> wrote:> > > >> > > > hi All,> > > >> > > > I am working on  a checkbox version of the tree2. I have extneded the
> nodebase class and it works fine.> > > > I want to select some nodes and then display the selected nodes on> other web pages. To achieve this, I have to use _javascript_. However, in> order to make it work with the _javascript_, I have to create a unique id for
> the checkbox.> > > > An Id that identifies with the database. The id created by jsf is of> no use to track the selected node.> > > > I use selectBooleanCheckbox on the web page.There
 is a unique> identifier set to the node.> > > > But if I try id ="#{node.identifier} it of courde fails, teied> ${node.identifier} and <%=nodeidentifier>> > > > both failed. I also tried to panelGrid binding at the node level.
> Created the panelGrid method in the node class, but that does gives> "instantiation of bean" problem.> > > > Any thoughts, really appreciate all help from this user group.> > > > - Anu
> > >> > >> >> >>>


tree2, varNodeToggler attribute

2005-12-05 Thread Thomas A Hurley








Hi,

 

I am trying to work out how the
'varNodeToggler' attribute works in the tree2 component. In all of the examples
it is set equal to 't’. What code does 't' refer to? I’m assuming
that it works like the ‘var’ attribute does.

 

I want to add an actionListener to a
 i.e. actionListener="#{t.getCurrentNode}" so
that I can respond when the user clicks on a node. Where to I put my
getCurrentNode method?

 

Thank you in advance for any help.

 

Tom.

 








Re: Problem with the newspaperTable

2005-12-05 Thread Volker Weber
Hi,

just for info:

The ScalarDataModel is a DataModel for a single row with the value
object as row-data. If you put a Set as value to the dataTable you can
create a table with one row, but how will you define your column values?

So of cause a Set is of 'any other type', but it made no sense to do that.

Regards

  Volker

Martin Marinschek wrote:
> Hans Bergsten is correct,
> 
> you have
> 
> java.util.List, Arrays, etc. supported
> 
> but no Sets!
> 
> regards,
> 
> Martin
> 
> On 12/5/05, Matthias Kahlau <[EMAIL PROTECTED]> wrote:
> 
>>Hi Mike!
>>
>>
>>As described in the JSF book of Hans Bergsten, a member of the JSF
>>specification team, the value attribute value of a h:dataTable can be of any
>>type, but the primary model type is the javax.faces.model.DataModel class.
>>
>>- a value of type Object[] is wrapped automatically in an instance of
>>ArrayDataModel
>>- a java.util.List in a ListDataModel
>>- a javax.servlet.jsp.jstl.sql.Result in a ResultDataModel
>>- a java.sql.ResultSet in a ResultSetDataModel
>>- and any other type in a ScalarDataModel
>>
>>If the HtmlNewspaperTable is based on the JSF standard HtmlDataTable (what
>>can be seen in the API Doc), why is the value attribute value of type
>>java.util.Set not supported? Or is the info of Hans Bergsten not correct?
>>
>>
>>Regards,
>>Matthias
>>
>>
>>>-Ursprüngliche Nachricht-
>>>Von: [EMAIL PROTECTED]
>>>[mailto:[EMAIL PROTECTED] Auftrag
>>>von Mike Kienenberger
>>>Gesendet: Montag, 5. Dezember 2005 17:03
>>>An: MyFaces Discussion
>>>Betreff: Re: Problem with the newspaperTable
>>>
>>>
>>>I don't think Set is a valid UIData value type.   It requires an
>>>ordered collection like List.
>>>I remember reading in the past that MyFaces UIData erroneously
>>>supported Set, but I'm pretty sure that this error was corrected.
>>>It's possible that it's still supported by UIData subclasses like
>>>t:dataTable (but not h:dataTable).
>>>
>>>On 12/2/05, Matthias Kahlau <[EMAIL PROTECTED]> wrote:
>>>
Hi!


I have a problem with the newspaperTable. It seems to
>>>
>>>incorrectly resolve a
>>>
ValueBinding. The same value/var/outputText values work correctly with a
dataList!


>>>  value="#{CreateEditTansBacking.tans}"
  var="tan">

  

  




The "tans" property is a HashSet containing Tan objects.


I get the following stacktrace when using the newspaperTable:

2005-12-02 18:09:14,093 DEBUG
[org.apache.myfaces.application.jsp.JspViewHandlerImpl] Dispatching to
/Management/ShowTans.jsp
2005-12-02 18:09:15,875 DEBUG [org.apache.myfaces.taglib.core.ViewTag]
entering ViewTag.doStartTag
2005-12-02 18:09:15,875 DEBUG [org.apache.myfaces.taglib.core.ViewTag]
leaving ViewTag.doStartTag
2005-12-02 18:09:15,890 DEBUG
>>>
>>>[org.apache.myfaces.el.PropertyResolverImpl]
>>>
Exception while retrieving property; base :

>>>
>>>[de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrag
>>>[EMAIL PROTECTED],
>>>
>>>de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
>>>[EMAIL PROTECTED],
>>>
>>>de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
>>>[EMAIL PROTECTED],
>>>
>>>de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
>>>[EMAIL PROTECTED],
>>>
>>>de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
>>>[EMAIL PROTECTED],
>>>
>>>de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
>>>[EMAIL PROTECTED],
>>>
>>>de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
>>>[EMAIL PROTECTED],
>>>
>>>de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
>>>[EMAIL PROTECTED],
>>>
>>>de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
>>>[EMAIL PROTECTED],
>>>
>>>de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
>>>[EMAIL PROTECTED],
>>>
>>>de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
>>>[EMAIL PROTECTED],
>>>
>>>de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
>>>[EMAIL PROTECTED],
>>>
>>>de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
>>>[EMAIL PROTECTED],
>>>
>>>de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
>>>[EMAIL PROTECTED],
>>>
>>>de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
>>>[EMAIL PROTECTED],
>>>
>>>de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
>>>[EMAIL PROTECTED],
>>>
>>>de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
>>>[EMAIL PROTECTED],
>>>
>>>de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
>>>[EMAIL PROTECTED],
>>>
>>>de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
>>>[EMAIL PROTECTED],
>>>
>>>de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
>>>[EMAIL PROTECTED],
>>>
>>>de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
>>>[EMAIL PROTECTED],
>>>
>>>de

Re: Problem with the newspaperTable

2005-12-05 Thread Mike Kienenberger
4.1.3.2 Properties
The current value identified by the value property is normally of type
DataModel.
However, a DataModel wrapper instance must automatically be provided by the JSF
implementation if the current value is of one of the following types:
 java.util.List
 Array of java.util.Object
 java.sql.ResultSet (which therefore also supports javax.sql.RowSet)
 javax.servlet.jsp.jstl.sql.Result
 Any other Java object is wrapped by a DataModel instance with a single row.
Convenience implementations of DataModel are provided in the
javax.faces.model package for each of the above (see Section 4.2.1.4 "Concrete
Implementations"), and must be used by the UIData component to create the
required DataModel wrapper.

4.2.1.4 Concrete Implementations
The JSF implementation
the javax.faces.model
 ArrayDataModel
 ListDataModel
 ResultDataModel
javax.servlet.
tag library)
 ResultSetDataModel
therefore means
 ScalarDataModel
data set.

Note that there is no SetDataModel available.   However, you could
write your own.

On 12/5/05, Martin Marinschek <[EMAIL PROTECTED]> wrote:
> P.S. I do think that Mike is right and t:dataTable still supports 
> java.util.Set.
>
> regards,
>
> Martin
>
> On 12/5/05, Martin Marinschek <[EMAIL PROTECTED]> wrote:
> > Hans Bergsten is correct,
> >
> > you have
> >
> > java.util.List, Arrays, etc. supported
> >
> > but no Sets!
> >
> > regards,
> >
> > Martin
> >
> > On 12/5/05, Matthias Kahlau <[EMAIL PROTECTED]> wrote:
> > > Hi Mike!
> > >
> > >
> > > As described in the JSF book of Hans Bergsten, a member of the JSF
> > > specification team, the value attribute value of a h:dataTable can be of 
> > > any
> > > type, but the primary model type is the javax.faces.model.DataModel class.
> > >
> > > - a value of type Object[] is wrapped automatically in an instance of
> > > ArrayDataModel
> > > - a java.util.List in a ListDataModel
> > > - a javax.servlet.jsp.jstl.sql.Result in a ResultDataModel
> > > - a java.sql.ResultSet in a ResultSetDataModel
> > > - and any other type in a ScalarDataModel
> > >
> > > If the HtmlNewspaperTable is based on the JSF standard HtmlDataTable (what
> > > can be seen in the API Doc), why is the value attribute value of type
> > > java.util.Set not supported? Or is the info of Hans Bergsten not correct?
> > >
> > >
> > > Regards,
> > > Matthias
> > >
> > > > -Ursprüngliche Nachricht-
> > > > Von: [EMAIL PROTECTED]
> > > > [mailto:[EMAIL PROTECTED] Auftrag
> > > > von Mike Kienenberger
> > > > Gesendet: Montag, 5. Dezember 2005 17:03
> > > > An: MyFaces Discussion
> > > > Betreff: Re: Problem with the newspaperTable
> > > >
> > > >
> > > > I don't think Set is a valid UIData value type.   It requires an
> > > > ordered collection like List.
> > > > I remember reading in the past that MyFaces UIData erroneously
> > > > supported Set, but I'm pretty sure that this error was corrected.
> > > > It's possible that it's still supported by UIData subclasses like
> > > > t:dataTable (but not h:dataTable).
> > > >
> > > > On 12/2/05, Matthias Kahlau <[EMAIL PROTECTED]> wrote:
> > > > > Hi!
> > > > >
> > > > >
> > > > > I have a problem with the newspaperTable. It seems to
> > > > incorrectly resolve a
> > > > > ValueBinding. The same value/var/outputText values work correctly 
> > > > > with a
> > > > > dataList!
> > > > >
> > > > >
> > > > >  > > > >   value="#{CreateEditTansBacking.tans}"
> > > > >   var="tan">
> > > > >
> > > > >   
> > > > > 
> > > > >   
> > > > >
> > > > > 
> > > > >
> > > > >
> > > > > The "tans" property is a HashSet containing Tan objects.
> > > > >
> > > > >
> > > > > I get the following stacktrace when using the newspaperTable:
> > > > >
> > > > > 2005-12-02 18:09:14,093 DEBUG
> > > > > [org.apache.myfaces.application.jsp.JspViewHandlerImpl] Dispatching to
> > > > > /Management/ShowTans.jsp
> > > > > 2005-12-02 18:09:15,875 DEBUG [org.apache.myfaces.taglib.core.ViewTag]
> > > > > entering ViewTag.doStartTag
> > > > > 2005-12-02 18:09:15,875 DEBUG [org.apache.myfaces.taglib.core.ViewTag]
> > > > > leaving ViewTag.doStartTag
> > > > > 2005-12-02 18:09:15,890 DEBUG
> > > > [org.apache.myfaces.el.PropertyResolverImpl]
> > > > > Exception while retrieving property; base :
> > > > >
> > > > [de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrag
> > > > [EMAIL PROTECTED],
> > > > >
> > > > de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> > > > [EMAIL PROTECTED],
> > > > >
> > > > de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> > > > [EMAIL PROTECTED],
> > > > >
> > > > de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> > > > [EMAIL PROTECTED],
> > > > >
> > > > de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> > > > [EMAIL PROTECTED],
> > > > >
> > > > de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> > > > [EMAIL PROTECTED],
> > > > >
> > > > de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfr

Re: does not reference an Object of type SelectItem

2005-12-05 Thread Simon Kitching

Hi Mike,

If you're using JBoss 4.0.3 with tomcat, you'll find the sun 
implementation is bundled under:

  server/default/deploy/jbossweb-tomcat55.sar

These jars need to be removed if you're using MyFaces.

jsf-api.jar is *not* part of the j2ee.jar (at least not yet).
Actually, it's unlikely to ever be bundled, as (at least in the myfaces 
libs) there is significant library-specific logic in the "api" classes. 
All the "api" indicates is that the APIs for those classes are tightly 
defined; this is not an "spi" (service provider interface).


Regards,

Simon

Mike Duffy wrote:
I thought that might be it and I could not find the jsf-api.jar in any class path.  


Is the jsf-api.jar part of the j2ee.jar?

Thx.

Mike


--- Martin Marinschek <[EMAIL PROTECTED]> wrote:


... and this should be ok. You can return an array of SelectItem objects.

Do you have any class loader issues here?

Maybe your javax.faces.api classes are loaded from a class loader
which is not accessible from your web-app? Or you have both the
jsf-api.jar and the myfaces-api.jar in your classpath?

regards,

Martin

On 12/5/05, Martin van den Bemt <[EMAIL PROTECTED]> wrote:

Mike Duffy wrote:

I am trying to create a value binding for a  tag.  The object 
reference is
definitely a collection of SelectItem objects (I've even tried it with an 
array).

However, I am getting an error that tells me the object reference does not 
contain

SelectItem

objects.  The error message state, "but of type : 
Ljavax.faces.model.SelectItem;".

What does the "Ljavax" reference mean?


[Ljavax.faces.model.SelectItem; means an array of SelectItem objects..



Re: naming conventions in faces-config.xml

2005-12-05 Thread Mike Kienenberger
Kurt, what does both your setter and getter code and method signatures
look like on CasesJdbcDAO when you're getting this error?

'javax.servlet.jsp.el.ELException: Attempt to coerce a value of type
"JDBCDataSource" to type "javax.sql.DataSource"' indicates an attempt
to inject a JDBCDataSource into a value binding expecting a
javax.sql.DataSource.

Something's not adding up here.

On 12/5/05, Kurt Edegger <[EMAIL PROTECTED]> wrote:
> Hi Mike,
>
> thank you for your help, but I don't think that your answer is correct.
> We are talking about two different classes. The first one is
> CasesJdbcDAO with the setter taking an JDBCDataSource Object and the
> second on is the JDBCDataSource class having a getDs() method to return
> the actual javax.sql.DataSource object. To clearify: The JDBCDataSource
> object is injected to CasesJdbcDAO using the setter in CasesJdbcDAO
> which takes the correct type of JDBCDataSource.
> I don't think this is an issue of a misscasted type since it works if
> the field in CasesJdbcDAO (marked as [1] in my former postings) isn't
> named 'dataSource'. In that case the JSF implementation seems to
> interpret the name as a type and causing the exception. In the case it
> isn't named 'dataSource' (e.g. 'ds' in my example) the injection is done
> without any problems.
>
> I'm appreciating your help and thoughts.
>
> Kurt
>
>
>
> on 12/5/2005 8:54 AM Mike Kienenberger stated:
> > Your setter and getter return different types.
> >
> >  public DataSource getDs()
> >
> > needs to be
> >
> >  public JDBCDataSource getDs() {
> >
> > On 12/2/05, Kurt Edegger <[EMAIL PROTECTED]> wrote:
> >
> >>Hi Mike,
> >>
> >>thank you for your response.
> >>
> >>on 12/2/2005 7:30 AM Mike Kienenberger stated:
> >> > Can you post the setter method for ds in CasesJdbcDAO?
> >>
> >>Here are the crucial parts of CasesJdbcDAO:
> >>/* the field definition [1]*/
> >>private JDBCDataSource ds;
> >>
> >>/* the setter*/
> >>public void setDs(JDBCDataSource dataSource) {
> >>   this.ds = dataSource;
> >>   this.setDataSource(this.ds.getDs());
> >>}
> >>
> >> > Also can you post the class definition line for JDBCDataSource?
> >>The JDBCDataSource class is very simple and just holds an
> >>javax.sql.DataSource object. Here are the interesting parts:
> >>
> >>/*the class definition */
> >>public class JDBCDataSource{
> >>
> >> /*the javax.sql.DataSource*/
> >> private DataSource ds;
> >> private String jndiLookup;
> >>...
> >>
> >> public DataSource getDs() {
> >> doLookup();
> >> return ds;
> >> }
> >>
> >>}
> >>
> >>
> >>The issue again: If I change the name of the field in CasesJdbcDAO at
> >>position [1] to dataSource, and adjust the injection in faces-config.xml
> >>accordingly the application crashes with the stated exception.
> >>
> >>Any ideas?
> >>
> >> Kurt
> >>
>
>


Re: newspaperTable merge with dataTable

2005-12-05 Thread Mike Kienenberger
I don't think so, but you could create a trivial subclass of
t:dataTable called t:newspaperTable, and change the renderer.   Then
you'd inherit all of the non-rendering behavior of t:dataTable.

As I said, this is just a workaround until someone did the work to
combine the two rendering classes properly.   But it seems like doing
so might provide a partial quick-fix.

On 12/5/05, Jesse Wilson <[EMAIL PROTECTED]> wrote:
> It's just a separate renderer, but it's a renderer that requires some
> parameters - the number of newspaper columns, and the gap
> between newspaper columns.
>
> Does JSF support multiple renderers for the same component
> simultaneously? In effect, could you render a dataTable with
> its regular renderer and a newspaper renderer in the same page?
> As far as I know this isn't supported.
>
>
>
> On 12/5/05, Mike Kienenberger <[EMAIL PROTECTED]> wrote:
> > Is the only difference in rendering?
> >
> > Perhaps someone could create a patch that provided an alternate
> > renderer for t:dataTable that performed the newspaper column layout.
> > That'd be a simpler intermediate step than trying to combine both
> > components.
> >
> > If nothing else, it'd make sense to open a JIRA improvement issue on this.
> >
> > On 12/2/05, Jesse Wilson <[EMAIL PROTECTED]> wrote:
> > > I wrote newspaperTable a long time ago and
> > > I think this is a great idea. When I wrote the
> > > class I didn't extend dataTable as to make it
> > > much more attractive to the MyFaces admins -
> > > it would be quite controversial to add an attribute
> > > to one of the most popular components.
> > >
> > > But newspaperTable and dataTable are 99%
> > > the same code, and making this change makes
> > > a lot of sense. Unfortunately I won't be able to
> > > implement it due to lack of time and familiarity.
> > >
> > > Cheers,
> > > Jesse
> > >
> > >
> > > On 12/2/05, Dave <[EMAIL PROTECTED]> wrote:
> > > >
> > > > newspaperTable should be merged with dataTable. It should be a property 
> > > > of
> > > > dataTable.
> > > >
> > > >  > > >   newspaperColumns="8"/>
> > > >
> > > > if the property is 0 or not defined, it is a normal table, otherwise 
> > > > render
> > > > as newspaper.
> > > >
> > > > This way it can leverage all features of dataTable such as sorting and
> > > > dynamic column model, etc.
> > > > what do you think?
> > > >
> > > > Dave
> > > >
> > > >
> > > >
> > > >  
> > > >  Yahoo! Personals
> > > >  Skip the bars and set-ups and start using Yahoo! Personals for free
> > > >
> > > >
> > >
> >
>


Re: naming conventions in faces-config.xml

2005-12-05 Thread Kurt Edegger

Hi Mike,

thank you for your help, but I don't think that your answer is correct.
We are talking about two different classes. The first one is 
CasesJdbcDAO with the setter taking an JDBCDataSource Object and the 
second on is the JDBCDataSource class having a getDs() method to return 
the actual javax.sql.DataSource object. To clearify: The JDBCDataSource 
object is injected to CasesJdbcDAO using the setter in CasesJdbcDAO 
which takes the correct type of JDBCDataSource.
I don't think this is an issue of a misscasted type since it works if 
the field in CasesJdbcDAO (marked as [1] in my former postings) isn't 
named 'dataSource'. In that case the JSF implementation seems to 
interpret the name as a type and causing the exception. In the case it 
isn't named 'dataSource' (e.g. 'ds' in my example) the injection is done 
without any problems.


I'm appreciating your help and thoughts.

Kurt



on 12/5/2005 8:54 AM Mike Kienenberger stated:

Your setter and getter return different types.

 public DataSource getDs()

needs to be

 public JDBCDataSource getDs() {

On 12/2/05, Kurt Edegger <[EMAIL PROTECTED]> wrote:


Hi Mike,

thank you for your response.

on 12/2/2005 7:30 AM Mike Kienenberger stated:
> Can you post the setter method for ds in CasesJdbcDAO?

Here are the crucial parts of CasesJdbcDAO:
/* the field definition [1]*/
private JDBCDataSource ds;

/* the setter*/
public void setDs(JDBCDataSource dataSource) {
  this.ds = dataSource;
  this.setDataSource(this.ds.getDs());
}

> Also can you post the class definition line for JDBCDataSource?
The JDBCDataSource class is very simple and just holds an
javax.sql.DataSource object. Here are the interesting parts:

/*the class definition */
public class JDBCDataSource{

/*the javax.sql.DataSource*/
private DataSource ds;
private String jndiLookup;
...

public DataSource getDs() {
doLookup();
return ds;
}

}


The issue again: If I change the name of the field in CasesJdbcDAO at
position [1] to dataSource, and adjust the injection in faces-config.xml
accordingly the application crashes with the stated exception.

Any ideas?

Kurt





Re: Problem with the newspaperTable

2005-12-05 Thread Martin Marinschek
P.S. I do think that Mike is right and t:dataTable still supports java.util.Set.

regards,

Martin

On 12/5/05, Martin Marinschek <[EMAIL PROTECTED]> wrote:
> Hans Bergsten is correct,
>
> you have
>
> java.util.List, Arrays, etc. supported
>
> but no Sets!
>
> regards,
>
> Martin
>
> On 12/5/05, Matthias Kahlau <[EMAIL PROTECTED]> wrote:
> > Hi Mike!
> >
> >
> > As described in the JSF book of Hans Bergsten, a member of the JSF
> > specification team, the value attribute value of a h:dataTable can be of any
> > type, but the primary model type is the javax.faces.model.DataModel class.
> >
> > - a value of type Object[] is wrapped automatically in an instance of
> > ArrayDataModel
> > - a java.util.List in a ListDataModel
> > - a javax.servlet.jsp.jstl.sql.Result in a ResultDataModel
> > - a java.sql.ResultSet in a ResultSetDataModel
> > - and any other type in a ScalarDataModel
> >
> > If the HtmlNewspaperTable is based on the JSF standard HtmlDataTable (what
> > can be seen in the API Doc), why is the value attribute value of type
> > java.util.Set not supported? Or is the info of Hans Bergsten not correct?
> >
> >
> > Regards,
> > Matthias
> >
> > > -Ursprüngliche Nachricht-
> > > Von: [EMAIL PROTECTED]
> > > [mailto:[EMAIL PROTECTED] Auftrag
> > > von Mike Kienenberger
> > > Gesendet: Montag, 5. Dezember 2005 17:03
> > > An: MyFaces Discussion
> > > Betreff: Re: Problem with the newspaperTable
> > >
> > >
> > > I don't think Set is a valid UIData value type.   It requires an
> > > ordered collection like List.
> > > I remember reading in the past that MyFaces UIData erroneously
> > > supported Set, but I'm pretty sure that this error was corrected.
> > > It's possible that it's still supported by UIData subclasses like
> > > t:dataTable (but not h:dataTable).
> > >
> > > On 12/2/05, Matthias Kahlau <[EMAIL PROTECTED]> wrote:
> > > > Hi!
> > > >
> > > >
> > > > I have a problem with the newspaperTable. It seems to
> > > incorrectly resolve a
> > > > ValueBinding. The same value/var/outputText values work correctly with a
> > > > dataList!
> > > >
> > > >
> > > >  > > >   value="#{CreateEditTansBacking.tans}"
> > > >   var="tan">
> > > >
> > > >   
> > > > 
> > > >   
> > > >
> > > > 
> > > >
> > > >
> > > > The "tans" property is a HashSet containing Tan objects.
> > > >
> > > >
> > > > I get the following stacktrace when using the newspaperTable:
> > > >
> > > > 2005-12-02 18:09:14,093 DEBUG
> > > > [org.apache.myfaces.application.jsp.JspViewHandlerImpl] Dispatching to
> > > > /Management/ShowTans.jsp
> > > > 2005-12-02 18:09:15,875 DEBUG [org.apache.myfaces.taglib.core.ViewTag]
> > > > entering ViewTag.doStartTag
> > > > 2005-12-02 18:09:15,875 DEBUG [org.apache.myfaces.taglib.core.ViewTag]
> > > > leaving ViewTag.doStartTag
> > > > 2005-12-02 18:09:15,890 DEBUG
> > > [org.apache.myfaces.el.PropertyResolverImpl]
> > > > Exception while retrieving property; base :
> > > >
> > > [de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrag
> > > [EMAIL PROTECTED],
> > > >
> > > de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> > > [EMAIL PROTECTED],
> > > >
> > > de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> > > [EMAIL PROTECTED],
> > > >
> > > de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> > > [EMAIL PROTECTED],
> > > >
> > > de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> > > [EMAIL PROTECTED],
> > > >
> > > de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> > > [EMAIL PROTECTED],
> > > >
> > > de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> > > [EMAIL PROTECTED],
> > > >
> > > de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> > > [EMAIL PROTECTED],
> > > >
> > > de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> > > [EMAIL PROTECTED],
> > > >
> > > de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> > > [EMAIL PROTECTED],
> > > >
> > > de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> > > [EMAIL PROTECTED],
> > > >
> > > de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> > > [EMAIL PROTECTED],
> > > >
> > > de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> > > [EMAIL PROTECTED],
> > > >
> > > de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> > > [EMAIL PROTECTED],
> > > >
> > > de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> > > [EMAIL PROTECTED],
> > > >
> > > de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> > > [EMAIL PROTECTED],
> > > >
> > > de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> > > [EMAIL PROTECTED],
> > > >
> > > de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> > > [EMAIL PROTECTED],
> > > >
> > > de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> > > [EMAIL PROTECTED],
> > > >
> > > de.fhzw.portal.umf

Re: Problem with the newspaperTable

2005-12-05 Thread Martin Marinschek
Hans Bergsten is correct,

you have

java.util.List, Arrays, etc. supported

but no Sets!

regards,

Martin

On 12/5/05, Matthias Kahlau <[EMAIL PROTECTED]> wrote:
> Hi Mike!
>
>
> As described in the JSF book of Hans Bergsten, a member of the JSF
> specification team, the value attribute value of a h:dataTable can be of any
> type, but the primary model type is the javax.faces.model.DataModel class.
>
> - a value of type Object[] is wrapped automatically in an instance of
> ArrayDataModel
> - a java.util.List in a ListDataModel
> - a javax.servlet.jsp.jstl.sql.Result in a ResultDataModel
> - a java.sql.ResultSet in a ResultSetDataModel
> - and any other type in a ScalarDataModel
>
> If the HtmlNewspaperTable is based on the JSF standard HtmlDataTable (what
> can be seen in the API Doc), why is the value attribute value of type
> java.util.Set not supported? Or is the info of Hans Bergsten not correct?
>
>
> Regards,
> Matthias
>
> > -Ursprüngliche Nachricht-
> > Von: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] Auftrag
> > von Mike Kienenberger
> > Gesendet: Montag, 5. Dezember 2005 17:03
> > An: MyFaces Discussion
> > Betreff: Re: Problem with the newspaperTable
> >
> >
> > I don't think Set is a valid UIData value type.   It requires an
> > ordered collection like List.
> > I remember reading in the past that MyFaces UIData erroneously
> > supported Set, but I'm pretty sure that this error was corrected.
> > It's possible that it's still supported by UIData subclasses like
> > t:dataTable (but not h:dataTable).
> >
> > On 12/2/05, Matthias Kahlau <[EMAIL PROTECTED]> wrote:
> > > Hi!
> > >
> > >
> > > I have a problem with the newspaperTable. It seems to
> > incorrectly resolve a
> > > ValueBinding. The same value/var/outputText values work correctly with a
> > > dataList!
> > >
> > >
> > >  > >   value="#{CreateEditTansBacking.tans}"
> > >   var="tan">
> > >
> > >   
> > > 
> > >   
> > >
> > > 
> > >
> > >
> > > The "tans" property is a HashSet containing Tan objects.
> > >
> > >
> > > I get the following stacktrace when using the newspaperTable:
> > >
> > > 2005-12-02 18:09:14,093 DEBUG
> > > [org.apache.myfaces.application.jsp.JspViewHandlerImpl] Dispatching to
> > > /Management/ShowTans.jsp
> > > 2005-12-02 18:09:15,875 DEBUG [org.apache.myfaces.taglib.core.ViewTag]
> > > entering ViewTag.doStartTag
> > > 2005-12-02 18:09:15,875 DEBUG [org.apache.myfaces.taglib.core.ViewTag]
> > > leaving ViewTag.doStartTag
> > > 2005-12-02 18:09:15,890 DEBUG
> > [org.apache.myfaces.el.PropertyResolverImpl]
> > > Exception while retrieving property; base :
> > >
> > [de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrag
> > [EMAIL PROTECTED],
> > >
> > de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> > [EMAIL PROTECTED],
> > >
> > de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> > [EMAIL PROTECTED],
> > >
> > de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> > [EMAIL PROTECTED],
> > >
> > de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> > [EMAIL PROTECTED],
> > >
> > de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> > [EMAIL PROTECTED],
> > >
> > de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> > [EMAIL PROTECTED],
> > >
> > de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> > [EMAIL PROTECTED],
> > >
> > de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> > [EMAIL PROTECTED],
> > >
> > de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> > [EMAIL PROTECTED],
> > >
> > de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> > [EMAIL PROTECTED],
> > >
> > de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> > [EMAIL PROTECTED],
> > >
> > de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> > [EMAIL PROTECTED],
> > >
> > de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> > [EMAIL PROTECTED],
> > >
> > de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> > [EMAIL PROTECTED],
> > >
> > de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> > [EMAIL PROTECTED],
> > >
> > de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> > [EMAIL PROTECTED],
> > >
> > de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> > [EMAIL PROTECTED],
> > >
> > de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> > [EMAIL PROTECTED],
> > >
> > de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> > [EMAIL PROTECTED],
> > >
> > de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> > [EMAIL PROTECTED],
> > >
> > de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> > [EMAIL PROTECTED],
> > >
> > de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> > [EMAIL PROTECTED],
> > >
> > de.fhzw.portal.umfragesystem.model.persistence.domainmodel.um

Re: newspaperTable merge with dataTable

2005-12-05 Thread Jesse Wilson
It's just a separate renderer, but it's a renderer that requires some
parameters - the number of newspaper columns, and the gap
between newspaper columns.

Does JSF support multiple renderers for the same component
simultaneously? In effect, could you render a dataTable with
its regular renderer and a newspaper renderer in the same page?
As far as I know this isn't supported.



On 12/5/05, Mike Kienenberger <[EMAIL PROTECTED]> wrote:
> Is the only difference in rendering?
>
> Perhaps someone could create a patch that provided an alternate
> renderer for t:dataTable that performed the newspaper column layout.
> That'd be a simpler intermediate step than trying to combine both
> components.
>
> If nothing else, it'd make sense to open a JIRA improvement issue on this.
>
> On 12/2/05, Jesse Wilson <[EMAIL PROTECTED]> wrote:
> > I wrote newspaperTable a long time ago and
> > I think this is a great idea. When I wrote the
> > class I didn't extend dataTable as to make it
> > much more attractive to the MyFaces admins -
> > it would be quite controversial to add an attribute
> > to one of the most popular components.
> >
> > But newspaperTable and dataTable are 99%
> > the same code, and making this change makes
> > a lot of sense. Unfortunately I won't be able to
> > implement it due to lack of time and familiarity.
> >
> > Cheers,
> > Jesse
> >
> >
> > On 12/2/05, Dave <[EMAIL PROTECTED]> wrote:
> > >
> > > newspaperTable should be merged with dataTable. It should be a property of
> > > dataTable.
> > >
> > >  > >   newspaperColumns="8"/>
> > >
> > > if the property is 0 or not defined, it is a normal table, otherwise 
> > > render
> > > as newspaper.
> > >
> > > This way it can leverage all features of dataTable such as sorting and
> > > dynamic column model, etc.
> > > what do you think?
> > >
> > > Dave
> > >
> > >
> > >
> > >  
> > >  Yahoo! Personals
> > >  Skip the bars and set-ups and start using Yahoo! Personals for free
> > >
> > >
> >
>


Fwd: Custom Component problem

2005-12-05 Thread Martin Marinschek
-- Forwarded message --
From: Martin Marinschek <[EMAIL PROTECTED]>
Date: Dec 5, 2005 8:29 PM
Subject: Re: Custom Component problem
To: wasim bhatti <[EMAIL PROTECTED]>


Best would be you would start your debugger and debug into the
processValidators and processUpdates methods of your component -
principally, the value should be transferred automatically. If it
isn't, it's either as the component itself doesn't run through
conversion or validation properly or any other component on the page
doesn't.

regards,

Martin

On 12/5/05, wasim bhatti <[EMAIL PROTECTED]> wrote:
> Sir
> As i have written on my previous mail that my setSubmittedValue is not
> working ( in the sense that the value of bean attribute is not updated. )
> Now i have called the metthod getSubmittedValue() after setSubmittetValue(),
> it shows the correct submitted value but the actual problem is still there (
> Means Bean value is not being updated. ).
> Sir what should i do?
> Regards
>
>
>  
>  Yahoo! Personals
>  Single? There's someone we'd like you to meet.
>  Lots of someones, actually. Try Yahoo! Personals
>
>


--

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces


--

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces


AW: Problem with the newspaperTable

2005-12-05 Thread Matthias Kahlau
Hi Mike!


As described in the JSF book of Hans Bergsten, a member of the JSF
specification team, the value attribute value of a h:dataTable can be of any
type, but the primary model type is the javax.faces.model.DataModel class.

- a value of type Object[] is wrapped automatically in an instance of
ArrayDataModel
- a java.util.List in a ListDataModel
- a javax.servlet.jsp.jstl.sql.Result in a ResultDataModel
- a java.sql.ResultSet in a ResultSetDataModel
- and any other type in a ScalarDataModel

If the HtmlNewspaperTable is based on the JSF standard HtmlDataTable (what
can be seen in the API Doc), why is the value attribute value of type
java.util.Set not supported? Or is the info of Hans Bergsten not correct?


Regards,
Matthias

> -Ursprüngliche Nachricht-
> Von: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Auftrag
> von Mike Kienenberger
> Gesendet: Montag, 5. Dezember 2005 17:03
> An: MyFaces Discussion
> Betreff: Re: Problem with the newspaperTable
>
>
> I don't think Set is a valid UIData value type.   It requires an
> ordered collection like List.
> I remember reading in the past that MyFaces UIData erroneously
> supported Set, but I'm pretty sure that this error was corrected.
> It's possible that it's still supported by UIData subclasses like
> t:dataTable (but not h:dataTable).
>
> On 12/2/05, Matthias Kahlau <[EMAIL PROTECTED]> wrote:
> > Hi!
> >
> >
> > I have a problem with the newspaperTable. It seems to
> incorrectly resolve a
> > ValueBinding. The same value/var/outputText values work correctly with a
> > dataList!
> >
> >
> >  >   value="#{CreateEditTansBacking.tans}"
> >   var="tan">
> >
> >   
> > 
> >   
> >
> > 
> >
> >
> > The "tans" property is a HashSet containing Tan objects.
> >
> >
> > I get the following stacktrace when using the newspaperTable:
> >
> > 2005-12-02 18:09:14,093 DEBUG
> > [org.apache.myfaces.application.jsp.JspViewHandlerImpl] Dispatching to
> > /Management/ShowTans.jsp
> > 2005-12-02 18:09:15,875 DEBUG [org.apache.myfaces.taglib.core.ViewTag]
> > entering ViewTag.doStartTag
> > 2005-12-02 18:09:15,875 DEBUG [org.apache.myfaces.taglib.core.ViewTag]
> > leaving ViewTag.doStartTag
> > 2005-12-02 18:09:15,890 DEBUG
> [org.apache.myfaces.el.PropertyResolverImpl]
> > Exception while retrieving property; base :
> >
> [de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrag
> [EMAIL PROTECTED],
> >
> de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> [EMAIL PROTECTED],
> >
> de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> [EMAIL PROTECTED],
> >
> de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> [EMAIL PROTECTED],
> >
> de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> [EMAIL PROTECTED],
> >
> de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> [EMAIL PROTECTED],
> >
> de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> [EMAIL PROTECTED],
> >
> de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> [EMAIL PROTECTED],
> >
> de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> [EMAIL PROTECTED],
> >
> de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> [EMAIL PROTECTED],
> >
> de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> [EMAIL PROTECTED],
> >
> de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> [EMAIL PROTECTED],
> >
> de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> [EMAIL PROTECTED],
> >
> de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> [EMAIL PROTECTED],
> >
> de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> [EMAIL PROTECTED],
> >
> de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> [EMAIL PROTECTED],
> >
> de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> [EMAIL PROTECTED],
> >
> de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> [EMAIL PROTECTED],
> >
> de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> [EMAIL PROTECTED],
> >
> de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> [EMAIL PROTECTED],
> >
> de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> [EMAIL PROTECTED],
> >
> de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> [EMAIL PROTECTED],
> >
> de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> [EMAIL PROTECTED],
> >
> de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> [EMAIL PROTECTED],
> >
> de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> [EMAIL PROTECTED],
> >
> de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> [EMAIL PROTECTED],
> >
> de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> [EMAIL PROTECTED],
> >
> de.fhzw.portal.umfragesystem.model.persistence.domainmodel.umfrage
> [EMAIL PROTECTED],
> >
> de.fhzw.portal.umfragesystem.model.per

Re: OnLoad in Myfaces -->something like in Oracle ADF?

2005-12-05 Thread Craig McClanahan
On 12/5/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]
> wrote:









Hi all!


Can I find a similar component like the Oracle ADF body, especially the "onload", component in Myfaces?

Or can I do a workaround to load a method from the backing bean at Onload of the jsf page?
One approach to this kind of issue would be to use Shale's
ViewController functionality on your backing beans ... Shale will call
an init() method for you when the page is loaded, plus three other
interesting event callbacks:

* preprocess() - if your backing bean is the one that is going to process this form submit

* prerender() - if your backing bean is associated with the page that is about to be rendered

* destroy() - after rendering is completed, called if init() was ever called.

For more information, see the Shale web pages at:

    http://struts.apache.org/struts-shale/

Craig
 
Regards

Andy



__

This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
your system manager.
 
This footnote also confirms that this email message has been swept
for the presence of computer viruses. 
__





RE: OnLoad in Myfaces -->something like in Oracle ADF?

2005-12-05 Thread Burke, Rodney
Title: OnLoad in Myfaces -->something like in Oracle ADF?








Here’s a work around that may do the
trick:

 

Essentially create a dummy component which
uses a backing bean attached to rendered option.

The dummy component should go right after 

 





…



 

 

public Boolean getOnLoad()

{

  // do your on load stuff here

  // always return false so dummy
component is not rendered

  return Boolean.FALSE;

}

 

Rodney

 









From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Monday, December 05, 2005
12:16 PM
To: users@myfaces.apache.org
Subject: OnLoad in Myfaces
-->something like in Oracle ADF?



 

Hi
all! 

Can
I find a similar component like the Oracle ADF body, especially the
"onload", component in Myfaces? 
Or can
I do a workaround to load a method from the backing bean at Onload of the jsf
page? 

Regards

Andy



__ This
email and any files transmitted with it are confidential and intended solely
for the use of the individual or entity to whom they are addressed. If you have
received this email in error please notify your system manager. This footnote
also confirms that this email message has been swept for the presence of computer
viruses. __









Re: editable forms

2005-12-05 Thread Mike Kienenberger
The problem is that #{param.edit} doesn't maintain a constant value.
The component's "rendered" attribute value must be the same between
the first and second request.   If it's rendered on the initial
request, but not rendered on the submitting request, then the backing
bean won't be updated (the value won't even be validated).  
Components are only evaluated (decoded, converted, validated, copied
to backing beans, rendered) if the rendered attribute is true.

On 12/5/05, "R. Müller" <[EMAIL PROTECTED]> wrote:
> hi group,
>
> in a particular form i want the fields only editable, if there is
> explicitly set a edit-param.
>
> I've tried it with the following code :
>
>  value="#{backingBean.value}/>
>  value="#{backingBean.value}">
> 
> 
>
> But i've noticed that when submitting the form the 'setter'-method of
> the 'backingBean.value' is never called.
> Leaving out the 'rendering'-attribute, which means that the component is
> always editable everthing works fine.
> I've got the same behaviour when using the 'disabled'-attribute.
>
> Does anybody has an explanation for this or hints how to solve this in a
> 'clean way' ?
>
> thanx
>
>
> ronald
> --
> *
> *M-Unicomp GmbH
> *
> *Ronald Müller
> *
> *Plauener Straße 163-165, Haus 11
> *13053 Berlin
> *
> *fon   : +49 ( 0 ) 30  / 98 69 61 54
> *mobil : +49 ( 0 ) 172 / 93 95 00 4
> *fax   : +49 ( 0 ) 30  / 98 69 61 55
> *email : [EMAIL PROTECTED]
> *web   : www.unicomp-berlin.de
> 
>


Re: facelet

2005-12-05 Thread Mike Kienenberger
There's quite a few people using this framework.   Which license issue
are you needing to solve?   As I recall, tobago is just using a
different renderkit.   I don't think there would be any issues using
it with facelets.   You'd just need to set up a facelets taglib.xml
file for it, but that's true for all nonstandard JSF components.  
However, I haven't tried using tobago with facelets.

You'll probably receive more in-depth answers on the facelets users
mailing list.

On 12/3/05, Arash Bijanzadeh <[EMAIL PROTECTED]> wrote:
> Hi,
>  I would like to here any advise regarding to facelets. Did anybody used
> this framework?
>  What is the situation?
>  How could license issue be solved?
>  Is there the possibility to combine tobago and facelets?
>
>  Thanks in advance
>
> --
> from debian manifesto:
> Debian Linux is a brand-new kind of Linux distribution.
>  Rather than being developed by one isolated individua
> l or group, as other distributions of Linux have been developed in the
>  past, Debian is being developed openly in the spirit of Linux and GNU.


Re: newspaperTable merge with dataTable

2005-12-05 Thread Mike Kienenberger
Is the only difference in rendering?

Perhaps someone could create a patch that provided an alternate
renderer for t:dataTable that performed the newspaper column layout.  
That'd be a simpler intermediate step than trying to combine both
components.

If nothing else, it'd make sense to open a JIRA improvement issue on this.

On 12/2/05, Jesse Wilson <[EMAIL PROTECTED]> wrote:
> I wrote newspaperTable a long time ago and
> I think this is a great idea. When I wrote the
> class I didn't extend dataTable as to make it
> much more attractive to the MyFaces admins -
> it would be quite controversial to add an attribute
> to one of the most popular components.
>
> But newspaperTable and dataTable are 99%
> the same code, and making this change makes
> a lot of sense. Unfortunately I won't be able to
> implement it due to lack of time and familiarity.
>
> Cheers,
> Jesse
>
>
> On 12/2/05, Dave <[EMAIL PROTECTED]> wrote:
> >
> > newspaperTable should be merged with dataTable. It should be a property of
> > dataTable.
> >
> >  >   newspaperColumns="8"/>
> >
> > if the property is 0 or not defined, it is a normal table, otherwise render
> > as newspaper.
> >
> > This way it can leverage all features of dataTable such as sorting and
> > dynamic column model, etc.
> > what do you think?
> >
> > Dave
> >
> >
> >
> >  
> >  Yahoo! Personals
> >  Skip the bars and set-ups and start using Yahoo! Personals for free
> >
> >
>


Re: OnLoad in Myfaces -->something like in Oracle ADF?

2005-12-05 Thread Andrew Robinson
I have an OnLoad phase listener implemented. It is part of
http://sourceforge.net/projects/jsf-comp

Check out the "jsfExt" release. It isn't a component, but may provide
the functionality that you are looking for.

-Andrew

On 12/5/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
> Hi all!
>
> Can I find a similar component like the Oracle ADF body, especially the
> "onload", component in Myfaces?
> Or can I do a workaround to load a method from the backing bean at Onload of
> the jsf page?
>
> Regards
> Andy
> __
> This email and any files transmitted with it are confidential and intended
> solely for the use of the individual or entity to whom they are addressed.
> If you have received this email in error please notify your system manager.
> This footnote also confirms that this email message has been swept for the
> presence of computer viruses.
> __
>


OnLoad in Myfaces -->something like in Oracle ADF?

2005-12-05 Thread andreas.mitter
Title: OnLoad in Myfaces -->something like in Oracle ADF?






Hi all!


Can I find a similar component like the Oracle ADF body, especially the "onload", component in Myfaces?

Or can I do a workaround to load a method from the backing bean at Onload of the jsf page?


Regards

Andy



__

This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
your system manager.

This footnote also confirms that this email message has been swept
for the presence of computer viruses.
__



Re: naming conventions in faces-config.xml

2005-12-05 Thread Mike Kienenberger
Your setter and getter return different types.

 public DataSource getDs()

needs to be

 public JDBCDataSource getDs() {

On 12/2/05, Kurt Edegger <[EMAIL PROTECTED]> wrote:
> Hi Mike,
>
> thank you for your response.
>
> on 12/2/2005 7:30 AM Mike Kienenberger stated:
>  > Can you post the setter method for ds in CasesJdbcDAO?
>
> Here are the crucial parts of CasesJdbcDAO:
> /* the field definition [1]*/
> private JDBCDataSource ds;
>
> /* the setter*/
> public void setDs(JDBCDataSource dataSource) {
>this.ds = dataSource;
>this.setDataSource(this.ds.getDs());
> }
>
>  > Also can you post the class definition line for JDBCDataSource?
> The JDBCDataSource class is very simple and just holds an
> javax.sql.DataSource object. Here are the interesting parts:
>
> /*the class definition */
> public class JDBCDataSource{
>
>  /*the javax.sql.DataSource*/
>  private DataSource ds;
>  private String jndiLookup;
> ...
>
>  public DataSource getDs() {
>  doLookup();
>  return ds;
>  }
>
> }
>
>
> The issue again: If I change the name of the field in CasesJdbcDAO at
> position [1] to dataSource, and adjust the injection in faces-config.xml
> accordingly the application crashes with the stated exception.
>
> Any ideas?
>
>  Kurt
>


AW: Progress Bar in Myfaces

2005-12-05 Thread andreas.mitter
Yes, that's what I mean.

Did you implement it within an Myfaces Application? I just get no error stack, 
but nothing is displayed...

Here is my code which i used:

(in my jsf page:)






<[EMAIL PROTECTED] 
file="fragments/header.jspf"%>











and this is the bean (which i just copied)


import java.util.Random;

public class ProcessBean
{

private int percentage;
private int increment;
private Random random;
private int pollInterval;

public ProcessBean()
{
percentage = 0;
increment = 10;
random = new Random();
pollInterval = 250;
}

public int getPercentage()
{
if(100 < percentage)
percentage = 0 - increment;
return percentage += increment;
}

public int getRandomPercentage()
{
return random.nextInt(101);
}

public int getPollInterval()
{
return pollInterval;
}

public void setPollInterval(int i)
{
pollInterval = i;
}
}

And I have added the progressbar.jar to my LIB Folder

Have I done anything wrong?

Regards
Andy


-Ursprüngliche Nachricht-
Von: Stand Trooper [mailto:[EMAIL PROTECTED]
Gesendet: Montag, 5. Dezember 2005 17:47
An: MyFaces Discussion
Betreff: Re: Progress Bar in Myfaces


sure, let me get it zipped up and I'll post the link here

Just to make sure, we are talking about the bpcatalog at
https://bpcatalog.dev.java.net/, yes?

thx,

timo

On 12/5/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> I tried it, but it didn't work.
>
> Can you post your code?
>
> -Ursprüngliche Nachricht-
> Von: Stand Trooper [mailto:[EMAIL PROTECTED]
> Gesendet: Montag, 5. Dezember 2005 17:09
> An: MyFaces Discussion
> Betreff: Re: Progress Bar in Myfaces
>
>
> I was able to get the progress bar from the blueprints to work just
> fine.  I didn't have any issues at all
>
> On 12/5/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> > Hi all!
> >
> > Has anybody experiences with Progress Bars and myfaces? I have found the Sun
> > Blueprint Progress Bar with googling but I have also read, that it doesn't
> > work with myfaces.
> >
> > Has anyone experieces with it, or are there other components that delivers a
> > progress bar functionality?
> >
> > Regards
> > Andy
> > __
> > This email and any files transmitted with it are confidential and intended
> > solely for the use of the individual or entity to whom they are addressed.
> > If you have received this email in error please notify your system manager.
> > This footnote also confirms that this email message has been swept for the
> > presence of computer viruses.
>
>
> __
>
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error please notify
> your system manager.
>
> This footnote also confirms that this email message has been swept
> for the presence of computer viruses.


__

This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
your system manager.

This footnote also confirms that this email message has been swept
for the presence of computer viruses.
__


Re: Progress Bar in Myfaces

2005-12-05 Thread Stand Trooper
sure, let me get it zipped up and I'll post the link here

Just to make sure, we are talking about the bpcatalog at
https://bpcatalog.dev.java.net/, yes?

thx,

timo

On 12/5/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> I tried it, but it didn't work.
>
> Can you post your code?
>
> -Ursprüngliche Nachricht-
> Von: Stand Trooper [mailto:[EMAIL PROTECTED]
> Gesendet: Montag, 5. Dezember 2005 17:09
> An: MyFaces Discussion
> Betreff: Re: Progress Bar in Myfaces
>
>
> I was able to get the progress bar from the blueprints to work just
> fine.  I didn't have any issues at all
>
> On 12/5/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> > Hi all!
> >
> > Has anybody experiences with Progress Bars and myfaces? I have found the Sun
> > Blueprint Progress Bar with googling but I have also read, that it doesn't
> > work with myfaces.
> >
> > Has anyone experieces with it, or are there other components that delivers a
> > progress bar functionality?
> >
> > Regards
> > Andy
> > __
> > This email and any files transmitted with it are confidential and intended
> > solely for the use of the individual or entity to whom they are addressed.
> > If you have received this email in error please notify your system manager.
> > This footnote also confirms that this email message has been swept for the
> > presence of computer viruses.
>
>
> __
>
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error please notify
> your system manager.
>
> This footnote also confirms that this email message has been swept
> for the presence of computer viruses.


Bug with t:inputCalendar???

2005-12-05 Thread Boris Kovalenko

Hello!

	When I use t:inputCalendar with popupDateFormat="dd.MM." I getting 
and error - The given value "05.12.2005" could not be converted to a 
date. Of course there may be any date instead of 05.12.2005. When no 
popupDateFormat is used all is ok. Error is reproducable with 1.1.1R and 
20051201 nightly. I have one old jar from May 27, and it works fine.

Have I missed something or new bug is introduced?

With respect,
Boris


AW: MethodBinding in CustomRenderer(2)

2005-12-05 Thread Marcel Soulier
Hi,

thanks Volker, adding the Components the right way made the Links work.

But! Now I run into another problem:

As soon as I add the second Component I get the following exeption:

javax.faces.FacesException: Client-id : sucheRoot_1 is duplicated in the faces 
tree.

"suchRoot" is the id I specified for the surrounding tag on the jsp.
But I explicitly set the id of all components I am adding. So where does this 
_1 come from. 

Could this come from some Id generated in Javascript for the CommandLinks??

Does anyone know at what point MyFaces generates Id's with "_1"?

Any suggestion appreciated.

Marcel


~~~
OPITZ CONSULTING bringt Ihnen alle Termine auf einen Blick!
Bestellen Sie unseren kostenlosen Jahres-Wandkalender 2006
unter mailto:[EMAIL PROTECTED] - http://www.opitz-consulting.de
~~~

-Ursprüngliche Nachricht-
Von: Volker Weber [mailto:[EMAIL PROTECTED] 
Gesendet: Donnerstag, 1. Dezember 2005 16:20
An: 'MyFaces Discussion'
Betreff: Re: MethodBinding in CustomRenderer(2)

Hi,

ok, you have a panelGrid in your jsp with component binding to your
managed-bean property 'panelGrid' ?
In your action-method schrittweiseKriteriumHinzufuegen() your are
creating a new instance of SuchkriterienTable.

I can't see wehre you add this instance to any parent component.
Note: child.setParent(parent) don't add a child to the parent!
Use, as you do it with your commandLinks,
parent.getChildren().add(child) instead.

If this is not the problem, than i have no idea, but if you create a
example i can have a look again.

Regards
  Volker


Marcel Soulier wrote:
> Hi,
>
>
>
> ok, here's what my code looks like:
>
>
>
> I create new components in the schrittweiseKriteriumHinzufuegen method
> in a managed-bean. The new Component gets a CommandLink and is added to
> the tree.
>
>
>
> public void schrittweiseKriteriumHinzufuegen(ActionEvent ae)
>
>   {
>
> setTabIndex(1);
>
> SuchkriterienTable bean = erzeugeBean();
>
> addLoeschenLink(bean);
>
>
>
> if (baumWurzel==null)
>
> {
>
>   bean.setParent(this.getPanelGrid());
>
>   baumWurzel = bean;
>
> }
>
> else
>
> {
>
>   bean.setParent(((UIComponent)ae.getSource()).getParent());
>
>   baumWurzel.addKriterium(bean);
>
> }
>
>
>
>   }
>
>
>
>
>
>   private SuchkriterienTable erzeugeBean()
>
>   {
>
> SuchkriterienTable suchBean = new SuchkriterienTable();
>
> suchBean.setSuchSpalte(kriteriumSpalte);
>
>
> suchBean.setSuchSpalteLabel(getLabelToValueFromList(suchspaltenListe,kriteriumSpalte));
>
> suchBean.setSuchOperator(kriteriumOperator);
>
>
> suchBean.setSuchOperatorLabel(getLabelToValueFromList(suchoperatorListe,kriteriumOperator));
>
> suchBean.setSuchWert(kriteriumWert);
>
>
> suchBean.setVerknuepfung(MessageUtil.getMessageString("suche_kriterium_und","messages",null,FacesContext.getCurrentInstance().getExternalContext().getRequestLocale()));
>
>
>
> return suchBean;
>
>   }
>
>
>
>   private void addLoeschenLink(SuchkriterienTable bean)
>
>   {
>
> HtmlCommandLink loeschenLink = new HtmlCommandLink();
>
> HtmlGraphicImage image = new HtmlGraphicImage();
>
> image.setUrl("/images/delete_icon.jpg");
>
> loeschenLink.getChildren().add(image);
>
> MethodBinding binding =
> FacesContext.getCurrentInstance().getApplication().createMethodBinding("#{sucheHandler.schrittweiseKriteriumLoeschen}",new
> Class[]{ActionEvent.class});
>
> loeschenLink.setActionListener(binding);
>
> bean.getChildren().add(loeschenLink);
>
>   }
>
>
>
>
>
>   PanelGrid is a binding to the surrounding PanelGridTag on the jsp so
> that I can set the correct parent for the first node in the tree.
> BaumWurzel is the rootNode of the tree. Each of my CustomComponents has
> a addKriteium method that adds the new Component to a list of dependant
> components. (separate List to separate them form the Links that are
> stored as Children).
>
>
>
> The MethodBinding should point to a method in a session-scope managed-bean.
>
>
>
> My Component 'SuchkriteriumTable' extends UIComponentBase with some
> additional Attributes that should not be involved with this problem.
>
>
>
> When rendering the CommandLink I render a table-like HTML structure in a
> CustomRenderer and let the Link render itself in the right table-cell.
>
>
>
>  for (int j=0;j
>  {
>
>
> ((UIComponent)leaf.getChildren().get(j)).encodeBegin(facesContext);
>
>
> ((UIComponent)leaf.getChildren().get(j)).encodeChildren(facesContext);
>
>((UIComponent)leaf.getChildren().get(j)).encodeEnd(facesContext);
>
>  }
>
>
>
>
>
> I hope this is enough to make a guess. If not please respond an I will
> try to set up a complete example of my case.
>
>
>
> Marcel
>
>
>
>
>
>
>
> ~~~
> Besuchen Sie unsere kostenlose Veranstaltung
> "Effizientes Prozess- und IT-Management -
> Die Verbindung v

Re: does not reference an Object of type SelectItem

2005-12-05 Thread Mike Duffy
I thought that might be it and I could not find the jsf-api.jar in any class 
path.  

Is the jsf-api.jar part of the j2ee.jar?

Thx.

Mike


--- Martin Marinschek <[EMAIL PROTECTED]> wrote:

> ... and this should be ok. You can return an array of SelectItem objects.
> 
> Do you have any class loader issues here?
> 
> Maybe your javax.faces.api classes are loaded from a class loader
> which is not accessible from your web-app? Or you have both the
> jsf-api.jar and the myfaces-api.jar in your classpath?
> 
> regards,
> 
> Martin
> 
> On 12/5/05, Martin van den Bemt <[EMAIL PROTECTED]> wrote:
> > Mike Duffy wrote:
> > > I am trying to create a value binding for a  tag.  The 
> > > object reference is
> > > definitely a collection of SelectItem objects (I've even tried it with an 
> > > array).
> > >
> > > However, I am getting an error that tells me the object reference does 
> > > not contain
> SelectItem
> > > objects.  The error message state, "but of type : 
> > > Ljavax.faces.model.SelectItem;".
> > >
> > > What does the "Ljavax" reference mean?
> > >
> >
> > [Ljavax.faces.model.SelectItem; means an array of SelectItem objects..
> >
> >
> > Mvgr,
> > Martin
> >
> >
> 
> 
> --
> 
> http://www.irian.at
> 
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
> 
> Professional Support for Apache MyFaces
> 




__ 
Yahoo! DSL – Something to write home about. 
Just $16.99/mo. or less. 
dsl.yahoo.com 



AW: Progress Bar in Myfaces

2005-12-05 Thread andreas.mitter
I tried it, but it didn't work.

Can you post your code?

-Ursprüngliche Nachricht-
Von: Stand Trooper [mailto:[EMAIL PROTECTED]
Gesendet: Montag, 5. Dezember 2005 17:09
An: MyFaces Discussion
Betreff: Re: Progress Bar in Myfaces


I was able to get the progress bar from the blueprints to work just
fine.  I didn't have any issues at all

On 12/5/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
>
> Hi all!
>
> Has anybody experiences with Progress Bars and myfaces? I have found the Sun
> Blueprint Progress Bar with googling but I have also read, that it doesn't
> work with myfaces.
>
> Has anyone experieces with it, or are there other components that delivers a
> progress bar functionality?
>
> Regards
> Andy
> __
> This email and any files transmitted with it are confidential and intended
> solely for the use of the individual or entity to whom they are addressed.
> If you have received this email in error please notify your system manager.
> This footnote also confirms that this email message has been swept for the
> presence of computer viruses.


__

This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
your system manager.

This footnote also confirms that this email message has been swept
for the presence of computer viruses.
__


Re: Progress Bar in Myfaces

2005-12-05 Thread Stand Trooper
I was able to get the progress bar from the blueprints to work just
fine.  I didn't have any issues at all

On 12/5/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
>
> Hi all!
>
> Has anybody experiences with Progress Bars and myfaces? I have found the Sun
> Blueprint Progress Bar with googling but I have also read, that it doesn't
> work with myfaces.
>
> Has anyone experieces with it, or are there other components that delivers a
> progress bar functionality?
>
> Regards
> Andy
> __
> This email and any files transmitted with it are confidential and intended
> solely for the use of the individual or entity to whom they are addressed.
> If you have received this email in error please notify your system manager.
> This footnote also confirms that this email message has been swept for the
> presence of computer viruses.


Re: Problem with the newspaperTable

2005-12-05 Thread Mike Kienenberger
I don't think Set is a valid UIData value type.   It requires an
ordered collection like List.
I remember reading in the past that MyFaces UIData erroneously
supported Set, but I'm pretty sure that this error was corrected.  
It's possible that it's still supported by UIData subclasses like
t:dataTable (but not h:dataTable).

On 12/2/05, Matthias Kahlau <[EMAIL PROTECTED]> wrote:
> Hi!
>
>
> I have a problem with the newspaperTable. It seems to incorrectly resolve a
> ValueBinding. The same value/var/outputText values work correctly with a
> dataList!
>
>
>value="#{CreateEditTansBacking.tans}"
>   var="tan">
>
>   
> 
>   
>
> 
>
>
> The "tans" property is a HashSet containing Tan objects.
>
>
> I get the following stacktrace when using the newspaperTable:
>
> 2005-12-02 18:09:14,093 DEBUG
> [org.apache.myfaces.application.jsp.JspViewHandlerImpl] Dispatching to
> /Management/ShowTans.jsp
> 2005-12-02 18:09:15,875 DEBUG [org.apache.myfaces.taglib.core.ViewTag]
> entering ViewTag.doStartTag
> 2005-12-02 18:09:15,875 DEBUG [org.apache.myfaces.taglib.core.ViewTag]
> leaving ViewTag.doStartTag
> 2005-12-02 18:09:15,890 DEBUG [org.apache.myfaces.el.PropertyResolverImpl]
> Exception while retrieving property; base :
> [EMAIL PROTECTED],
> [EMAIL PROTECTED],
> [EMAIL PROTECTED],
> [EMAIL PROTECTED],
> [EMAIL PROTECTED],
> [EMAIL PROTECTED],
> [EMAIL PROTECTED],
> [EMAIL PROTECTED],
> [EMAIL PROTECTED],
> [EMAIL PROTECTED],
> [EMAIL PROTECTED],
> [EMAIL PROTECTED],
> [EMAIL PROTECTED],
> [EMAIL PROTECTED],
> [EMAIL PROTECTED],
> [EMAIL PROTECTED],
> [EMAIL PROTECTED],
> [EMAIL PROTECTED],
> [EMAIL PROTECTED],
> [EMAIL PROTECTED],
> [EMAIL PROTECTED],
> [EMAIL PROTECTED],
> [EMAIL PROTECTED],
> [EMAIL PROTECTED],
> [EMAIL PROTECTED],
> [EMAIL PROTECTED],
> [EMAIL PROTECTED],
> [EMAIL PROTECTED],
> [EMAIL PROTECTED],
> [EMAIL PROTECTED],
> [EMAIL PROTECTED],
> [EMAIL PROTECTED],
> [EMAIL PROTECTED],
> [EMAIL PROTECTED],
> [EMAIL PROTECTED],
> [EMAIL PROTECTED],
> [EMAIL PROTECTED],
> [EMAIL PROTECTED],
> [EMAIL PROTECTED],
> [EMAIL PROTECTED],
> [EMAIL PROTECTED],
> [EMAIL PROTECTED],
> [EMAIL PROTECTED],
> [EMAIL PROTECTED],
> [EMAIL PROTECTED],
> [EMAIL PROTECTED],
> [EMAIL PROTECTED],
> [EMAIL PROTECTED],
> [EMAIL PROTECTED],
> [EMAIL PROTECTED],
> property : tanstring
> javax.faces.el.PropertyNotFoundException: Bean: java.util.HashSet, property:
> tanstring
> at
> org.apache.myfaces.el.PropertyResolverImpl.getPropertyDescriptor(PropertyRes
> olverImpl.java:476)
> at
> org.apache.myfaces.el.PropertyResolverImpl.getPropertyDescriptor(PropertyRes
> olverImpl.java:447)
> at
> org.apache.myfaces.el.PropertyResolverImpl.getProperty(PropertyResolverImpl.
> java:410)
> at
> org.apache.myfaces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.jav
> a:82)
> at
> org.apache.myfaces.el.ELParserHelper$MyPropertySuffix.evaluate(ELParserHelpe
> r.java:532)
> at org.apache.commons.el.ComplexValue.evaluate(ComplexValue.java:145)
> at
> org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:380)
> at javax.faces.component.UIOutput.getValue(UIOutput.java:75)
> at
> org.apache.myfaces.renderkit.RendererUtils.getStringValue(RendererUtils.java
> :219)
> at
> org.apache.myfaces.renderkit.html.HtmlTextRendererBase.renderOutput(HtmlText
> RendererBase.java:66)
> at
> org.apache.myfaces.renderkit.html.HtmlTextRendererBase.encodeEnd(HtmlTextRen
> dererBase.java:54)
> at
> javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:521)
> at
> org.apache.myfaces.renderkit.RendererUtils.renderChild(RendererUtils.java:44
> 4)
> at
> org.apache.myfaces.renderkit.RendererUtils.renderChildren(RendererUtils.java
> :421)
> at
> org.apache.myfaces.renderkit.RendererUtils.renderChild(RendererUtils.java:44
> 2)
> at
> org.apache.myfaces.custom.newspaper.HtmlNewspaperTableRenderer.encodeChildre
> n(HtmlNewspaperTableRenderer.java:127)
> at
> javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:50
> 9)
> at
> javax.faces.webapp.UIComponentTag.encodeChildren(UIComponentTag.java:466)
> at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:356)
> at
> org.apache.myfaces.taglib.UIComponentBodyTagBase.doEndTag(UIComponentBodyTag
> Base.java:55)
> at
> org.apache.jsp.Management.ShowTans_jsp._jspx_meth_t_newspaperTable_0(ShowTan
> s_jsp.java:409)
> at
> org.apache.jsp.Management.ShowTans_jsp._jspx_meth_h_form_0(ShowTans_jsp.java
> :219)
> at
> org.apache.jsp.Management.ShowTans_jsp._jspx_meth_f_view_0(ShowTans_jsp.java
> :120)
> at 
> org.apache.jsp.Management.ShowTans_jsp._jspService(ShowTans_jsp.java:83)
> at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
> at
> org.apache.

Re: Can't parse configuration file

2005-12-05 Thread Mike Kienenberger
For me, putting it in the WEB-INF directory has always worked for web apps.
The one time I had to write an EntityResolver was when I was parsing
dtd files in a batch job instead of a web app.

On 12/5/05, Juan Medín Piñeiro <[EMAIL PROTECTED]> wrote:
> Unfortunately putting the file in the WEB-INF dir doesn't work for me
> (other people have the same problem:
> http://forum.java.sun.com/thread.jspa?threadID=676326).
>
> Isn't writing your own EntityResolver a bit too much for this problem?
>
> Regards,
>
> - Juan
>
> On 11/29/05, Mike Kienenberger <[EMAIL PROTECTED]> wrote:
> > What works for me is to add the dtd files to the WEB-INF directory,
> > and the xml parser searches there before trying the URL.
> > I think the solution to this problem depends on your xml parser, though.
> > I've also seen others suggest writing your own EntityResolver.
>


editable forms

2005-12-05 Thread R. Müller

hi group,

in a particular form i want the fields only editable, if there is 
explicitly set a edit-param.


I've tried it with the following code :

value="#{backingBean.value}/>
value="#{backingBean.value}">




But i've noticed that when submitting the form the 'setter'-method of 
the 'backingBean.value' is never called.
Leaving out the 'rendering'-attribute, which means that the component is 
always editable everthing works fine.

I've got the same behaviour when using the 'disabled'-attribute.

Does anybody has an explanation for this or hints how to solve this in a 
'clean way' ?


thanx


ronald
--
*
*M-Unicomp GmbH
*
*Ronald Müller
*
*Plauener Straße 163-165, Haus 11
*13053 Berlin
*
*fon   : +49 ( 0 ) 30  / 98 69 61 54
*mobil : +49 ( 0 ) 172 / 93 95 00 4
*fax   : +49 ( 0 ) 30  / 98 69 61 55
*email : [EMAIL PROTECTED]
*web   : www.unicomp-berlin.de



AW: Problems with ValueChangeListener and FacesMessages

2005-12-05 Thread andreas.mitter
Hi Martin!

Thx, but the problem still resist, because the ValueChangeMethod (where i also 
remove the messages) isn't executed, because the message from the inputtext 
component is thrown before. (If I remove the immediate=true attribute at the 
inputtext component, everything works, but I need the immediate=true, because I 
have another ValueChangeListener at this InputTextComponent)

Bytheway, do you have experiences with ProgressBars and do you know if such a 
component is planned for myfaces or is there another component which I can use 
with myfaces.

Thx
Regards
Andy

-Ursprüngliche Nachricht-
Von: Martin Marinschek [mailto:[EMAIL PROTECTED]
Gesendet: Montag, 5. Dezember 2005 14:49
An: MyFaces Discussion
Betreff: Re: Problems with ValueChangeListener and FacesMessages


You have to say

it.remove();

instead of

context.getMessages().remove();

regards,

Martin

On 12/5/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> An second question:
>
> How can I remove the messages?
> I tried:
>
> Iterator it = context.getMessages();
> while(it.hasNext())
> {
> context.getMessages().remove();
> }
>
> But I get an error stack.
>
> javax.faces.el.EvaluationException: Exception while invoking expression 
> #{linker.setEndDate}
> at 
> org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:153)
> at javax.faces.component.UIInput.broadcast(UIInput.java:200)
> at 
> javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:90)
> at 
> javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:143)
> at 
> org.apache.myfaces.lifecycle.LifecycleImpl.processValidations(LifecycleImpl.java:260)
> at 
> org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:77)
> at javax.faces.webapp.FacesServlet.service(FacesServlet.java:106)
> at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
> at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> at 
> org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:123)
> at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
> at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> at 
> com.magnasteyr.msaaa.client.web.SecurityFilter.doFilter(SecurityFilter.java:139)
> at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
> at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> at 
> com.magnasteyr.msaaa.client.web.PortalRedirectFilter.doFilter(PortalRedirectFilter.java:105)
> at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
> at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> at 
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
> at 
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
> at 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
> at 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
> at 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
> at 
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
> at 
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
> at 
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
> at 
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
> at 
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
> at 
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
> at java.lang.Thread.run(Thread.java:534)
> Caused by: java.lang.IllegalStateException
> at java.util.AbstractList$Itr.remove(AbstractList.java:432)
> at com.magnasteyr.editool.Linker.setEndDate(Linker.java:507)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:324)
> at 
> org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:129)
> ... 29 more
>
> -Ursprüngliche Nachricht-
> Von: Martin Marinschek [mailto:[EMAIL PROTECTED]
> Gesendet: M

Re: Problems with ValueChangeListener and FacesMessages

2005-12-05 Thread Martin Marinschek
You have to say

it.remove();

instead of

context.getMessages().remove();

regards,

Martin

On 12/5/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> An second question:
>
> How can I remove the messages?
> I tried:
>
> Iterator it = context.getMessages();
> while(it.hasNext())
> {
> context.getMessages().remove();
> }
>
> But I get an error stack.
>
> javax.faces.el.EvaluationException: Exception while invoking expression 
> #{linker.setEndDate}
> at 
> org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:153)
> at javax.faces.component.UIInput.broadcast(UIInput.java:200)
> at 
> javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:90)
> at 
> javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:143)
> at 
> org.apache.myfaces.lifecycle.LifecycleImpl.processValidations(LifecycleImpl.java:260)
> at 
> org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:77)
> at javax.faces.webapp.FacesServlet.service(FacesServlet.java:106)
> at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
> at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> at 
> org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:123)
> at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
> at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> at 
> com.magnasteyr.msaaa.client.web.SecurityFilter.doFilter(SecurityFilter.java:139)
> at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
> at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> at 
> com.magnasteyr.msaaa.client.web.PortalRedirectFilter.doFilter(PortalRedirectFilter.java:105)
> at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
> at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> at 
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
> at 
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
> at 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
> at 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
> at 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
> at 
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
> at 
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
> at 
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
> at 
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
> at 
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
> at 
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
> at java.lang.Thread.run(Thread.java:534)
> Caused by: java.lang.IllegalStateException
> at java.util.AbstractList$Itr.remove(AbstractList.java:432)
> at com.magnasteyr.editool.Linker.setEndDate(Linker.java:507)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:324)
> at 
> org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:129)
> ... 29 more
>
> -Ursprüngliche Nachricht-
> Von: Martin Marinschek [mailto:[EMAIL PROTECTED]
> Gesendet: Montag, 5. Dezember 2005 11:57
> An: MyFaces Discussion
> Betreff: Re: Problems with ValueChangeListener and FacesMessages
>
>
> Short answer: no way ;)
>
> A workaround is coming to my mind: iterate through your faces-messages
> in the second valueChangeListener and remove them?
>
> regards,
>
> Martin
>
> On 12/5/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > I have one component on my page, where the immediate Attribute is set to 
> > true. And for this component the message is shown when the 
> > ValueChangeListener from my Selectbox is executed. For others no message is 
> > shown!
> > The Problem is, that I need this immediate Attribute to set to true, 
> > because on this component (it's a InputTextBox) I also have a 
> > ValueChangeListener.
> >
> > So is there a way to sk

Progress Bar in Myfaces

2005-12-05 Thread andreas.mitter
Title: Progress Bar in Myfaces







Hi all!


Has anybody experiences with Progress Bars and myfaces? I have found the Sun Blueprint Progress Bar with googling but I have also read, that it doesn't work with myfaces. 

Has anyone experieces with it, or are there other components that delivers a progress bar functionality?


Regards

Andy



__

This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
your system manager.

This footnote also confirms that this email message has been swept
for the presence of computer viruses.
__



AW: Problems with ValueChangeListener and FacesMessages

2005-12-05 Thread andreas.mitter
An second question:

How can I remove the messages?
I tried:

Iterator it = context.getMessages();
while(it.hasNext())
{
context.getMessages().remove();
}

But I get an error stack.

javax.faces.el.EvaluationException: Exception while invoking expression 
#{linker.setEndDate}
at 
org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:153)
at javax.faces.component.UIInput.broadcast(UIInput.java:200)
at 
javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:90)
at 
javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:143)
at 
org.apache.myfaces.lifecycle.LifecycleImpl.processValidations(LifecycleImpl.java:260)
at 
org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:77)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:106)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at 
org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:123)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at 
com.magnasteyr.msaaa.client.web.SecurityFilter.doFilter(SecurityFilter.java:139)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at 
com.magnasteyr.msaaa.client.web.PortalRedirectFilter.doFilter(PortalRedirectFilter.java:105)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at 
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:534)
Caused by: java.lang.IllegalStateException
at java.util.AbstractList$Itr.remove(AbstractList.java:432)
at com.magnasteyr.editool.Linker.setEndDate(Linker.java:507)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at 
org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:129)
... 29 more

-Ursprüngliche Nachricht-
Von: Martin Marinschek [mailto:[EMAIL PROTECTED]
Gesendet: Montag, 5. Dezember 2005 11:57
An: MyFaces Discussion
Betreff: Re: Problems with ValueChangeListener and FacesMessages


Short answer: no way ;)

A workaround is coming to my mind: iterate through your faces-messages
in the second valueChangeListener and remove them?

regards,

Martin

On 12/5/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> I have one component on my page, where the immediate Attribute is set to 
> true. And for this component the message is shown when the 
> ValueChangeListener from my Selectbox is executed. For others no message is 
> shown!
> The Problem is, that I need this immediate Attribute to set to true, because 
> on this component (it's a InputTextBox) I also have a ValueChangeListener.
>
> So is there a way to skip the validation for this one component (for the 
> InputTextBox) during the first ValueChangeListener method?
>
> Regards,
> Andy
>
> -Ursprüngliche Nachricht-
> Von: Martin Marinschek [mailto:[EMAIL PROTECTED]
> Gesendet: Montag, 5. Dezember 2005 10:57
> An: MyFaces Discussion
> Betreff: Re: Problems with ValueChangeListener and FacesMessages
>
>
> It'

AW: Problems with ValueChangeListener and FacesMessages

2005-12-05 Thread andreas.mitter
I just noticed, that the ValueChangeListener method isn't executed because the 
Required validation of the InputText (where the immediate attribute is set to 
true) shows the message first.
When I enter some data into this InputText component, the ValueChangeListener 
method is executed.

Any ideas how I can get rid of this message

-Ursprüngliche Nachricht-
Von: Martin Marinschek [mailto:[EMAIL PROTECTED]
Gesendet: Montag, 5. Dezember 2005 11:57
An: MyFaces Discussion
Betreff: Re: Problems with ValueChangeListener and FacesMessages


Short answer: no way ;)

A workaround is coming to my mind: iterate through your faces-messages
in the second valueChangeListener and remove them?

regards,

Martin

On 12/5/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> I have one component on my page, where the immediate Attribute is set to 
> true. And for this component the message is shown when the 
> ValueChangeListener from my Selectbox is executed. For others no message is 
> shown!
> The Problem is, that I need this immediate Attribute to set to true, because 
> on this component (it's a InputTextBox) I also have a ValueChangeListener.
>
> So is there a way to skip the validation for this one component (for the 
> InputTextBox) during the first ValueChangeListener method?
>
> Regards,
> Andy
>
> -Ursprüngliche Nachricht-
> Von: Martin Marinschek [mailto:[EMAIL PROTECTED]
> Gesendet: Montag, 5. Dezember 2005 10:57
> An: MyFaces Discussion
> Betreff: Re: Problems with ValueChangeListener and FacesMessages
>
>
> It's only executed for the components which have immediate set to true
> - if you call facesContext.renderResponse in your valueChangeListener,
> it won't be executed for the others.
>
> regards,
>
> Martin
>
> On 12/5/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > The only thing I want to do is:
> >
> > Set some values from the backing bean into some inputtext tags (and this is 
> > done in the valuechangelistener method)
> >
> > I didn't know, that the conversion and validation phase is executed...
> > Is there a way to skip this?
> >
> > Regards,
> > Andy
> >
> > -Ursprüngliche Nachricht-
> > Von: Martin Marinschek [mailto:[EMAIL PROTECTED]
> > Gesendet: Montag, 5. Dezember 2005 10:23
> > An: MyFaces Discussion
> > Betreff: Re: Problems with ValueChangeListener and FacesMessages
> >
> >
> > so in fact you want to get rid of the submitted values, and for this
> > you recreate the whole tree?
> >
> > maybe you could use component binding on those inputTexts that should
> > loose their submitted value and reset the submitted value yourself for
> > them?
> >
> > In any case I don't see why your approach shouldn't work. Have you
> > checked if the conversion and validation phase is executed for the
> > other components except your immediate components?
> >
> > You know that for the immediate components, the conversion and
> > validation _is_ executed anyways, so you would see those messages in
> > any case?
> >
> > regards,
> >
> > Martin
> >
> > On 12/5/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > > No it's the same page, but in the ValueChangeListener some values for 
> > > inputtext Tags are set and I have to refresh the page to display them.
> > > This works fine, but is there another method to refresh the page?
> > >
> > > Regards,
> > > Andy
> > >
> > >
> > > -Ursprüngliche Nachricht-
> > > Von: Martin Marinschek [mailto:[EMAIL PROTECTED]
> > > Gesendet: Montag, 5. Dezember 2005 10:14
> > > An: MyFaces Discussion
> > > Betreff: Re: Problems with ValueChangeListener and FacesMessages
> > >
> > >
> > > Hmmm...
> > >
> > > Let me try to understand what you are doing here - you want to head
> > > off to a new page, right?
> > >
> > > regards,
> > >
> > > Martin
> > >
> > > On 12/5/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > > >
> > > >
> > > > Hi All!
> > > >
> > > > I have problems with a ValueChangeListener and FacesMessages.
> > > > In my JSP Site there is a Selectbox with a ValueChangeListener. 
> > > > Although I
> > > > have set the immediate=True Attribute at this Selectbox, messages are 
> > > > shown
> > > > after the ValueChangeListener has been executed..
> > > >
> > > > Can you tell me why this happens??Is it perhaps the Context.setViewRoot?
> > > >
> > > > Here is my code:(JSP)
> > > >
> > > >  > > > id="newPartnerstatus" styleClass="mustfield"
> > > > value="#{newPartnerDto.statusId}" required="true"
> > > > valueChangeListener="#{linker.setEndDate}"
> > > > onchange="submit()">
> > > > 
> > > > 
> > > >
> > > >
> > > > Here is my code:(ValueChangeListener Method:)
> > > >
> > > > public void setEndDate(ValueChangeEvent event) {
> > > > editDto = (EditDto) FacesUtil.getManagedBean("editDto");
> > > > sessionDto = (SessionDto)
> > > > FacesUtil.getManagedBean("sessionDto");
> > > > newPartnerDto = (NewPartnerDto) FacesUtil
> > > >
> > > > .getManagedBean("newPartnerDto");
> > > >
> > > 

Re: Problems with ValueChangeListener and FacesMessages

2005-12-05 Thread Martin Marinschek
Short answer: no way ;)

A workaround is coming to my mind: iterate through your faces-messages
in the second valueChangeListener and remove them?

regards,

Martin

On 12/5/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> I have one component on my page, where the immediate Attribute is set to 
> true. And for this component the message is shown when the 
> ValueChangeListener from my Selectbox is executed. For others no message is 
> shown!
> The Problem is, that I need this immediate Attribute to set to true, because 
> on this component (it's a InputTextBox) I also have a ValueChangeListener.
>
> So is there a way to skip the validation for this one component (for the 
> InputTextBox) during the first ValueChangeListener method?
>
> Regards,
> Andy
>
> -Ursprüngliche Nachricht-
> Von: Martin Marinschek [mailto:[EMAIL PROTECTED]
> Gesendet: Montag, 5. Dezember 2005 10:57
> An: MyFaces Discussion
> Betreff: Re: Problems with ValueChangeListener and FacesMessages
>
>
> It's only executed for the components which have immediate set to true
> - if you call facesContext.renderResponse in your valueChangeListener,
> it won't be executed for the others.
>
> regards,
>
> Martin
>
> On 12/5/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > The only thing I want to do is:
> >
> > Set some values from the backing bean into some inputtext tags (and this is 
> > done in the valuechangelistener method)
> >
> > I didn't know, that the conversion and validation phase is executed...
> > Is there a way to skip this?
> >
> > Regards,
> > Andy
> >
> > -Ursprüngliche Nachricht-
> > Von: Martin Marinschek [mailto:[EMAIL PROTECTED]
> > Gesendet: Montag, 5. Dezember 2005 10:23
> > An: MyFaces Discussion
> > Betreff: Re: Problems with ValueChangeListener and FacesMessages
> >
> >
> > so in fact you want to get rid of the submitted values, and for this
> > you recreate the whole tree?
> >
> > maybe you could use component binding on those inputTexts that should
> > loose their submitted value and reset the submitted value yourself for
> > them?
> >
> > In any case I don't see why your approach shouldn't work. Have you
> > checked if the conversion and validation phase is executed for the
> > other components except your immediate components?
> >
> > You know that for the immediate components, the conversion and
> > validation _is_ executed anyways, so you would see those messages in
> > any case?
> >
> > regards,
> >
> > Martin
> >
> > On 12/5/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > > No it's the same page, but in the ValueChangeListener some values for 
> > > inputtext Tags are set and I have to refresh the page to display them.
> > > This works fine, but is there another method to refresh the page?
> > >
> > > Regards,
> > > Andy
> > >
> > >
> > > -Ursprüngliche Nachricht-
> > > Von: Martin Marinschek [mailto:[EMAIL PROTECTED]
> > > Gesendet: Montag, 5. Dezember 2005 10:14
> > > An: MyFaces Discussion
> > > Betreff: Re: Problems with ValueChangeListener and FacesMessages
> > >
> > >
> > > Hmmm...
> > >
> > > Let me try to understand what you are doing here - you want to head
> > > off to a new page, right?
> > >
> > > regards,
> > >
> > > Martin
> > >
> > > On 12/5/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > > >
> > > >
> > > > Hi All!
> > > >
> > > > I have problems with a ValueChangeListener and FacesMessages.
> > > > In my JSP Site there is a Selectbox with a ValueChangeListener. 
> > > > Although I
> > > > have set the immediate=True Attribute at this Selectbox, messages are 
> > > > shown
> > > > after the ValueChangeListener has been executed..
> > > >
> > > > Can you tell me why this happens??Is it perhaps the Context.setViewRoot?
> > > >
> > > > Here is my code:(JSP)
> > > >
> > > >  > > > id="newPartnerstatus" styleClass="mustfield"
> > > > value="#{newPartnerDto.statusId}" required="true"
> > > > valueChangeListener="#{linker.setEndDate}"
> > > > onchange="submit()">
> > > > 
> > > > 
> > > >
> > > >
> > > > Here is my code:(ValueChangeListener Method:)
> > > >
> > > > public void setEndDate(ValueChangeEvent event) {
> > > > editDto = (EditDto) FacesUtil.getManagedBean("editDto");
> > > > sessionDto = (SessionDto)
> > > > FacesUtil.getManagedBean("sessionDto");
> > > > newPartnerDto = (NewPartnerDto) FacesUtil
> > > >
> > > > .getManagedBean("newPartnerDto");
> > > >
> > > > if (((Long) event.getNewValue()).compareTo(new Long(1)) 
> > > > == 0
> > > > && editDto.getEndDate() == null
> > > > &&
> > > > event.getComponent().getId().equalsIgnoreCase("status")) {
> > > > editDto.setEndDate(new Date());
> > > > editDto.setEndPerson(sessionDto.getUserName());
> > > >
> > > > String viewId = "/edit.jsp";
> > > > FacesContext context =
> > > > Fac

Re: Custom Component Binding problem

2005-12-05 Thread wasim bhatti
Sir  My class is inherited from UIInput, but the problem is that, when i call setSubmittedValue in decode method, it does not work( in the sense that the bean value is not updated ).  Waiting for ur reply.  Regards     Martin Marinschek <[EMAIL PROTECTED]> wrote:  If you subclass from UIInput, the rest is done implicitly in theprocessValidators and the processUpdates Method.regards,MartinOn 12/5/05, wasim bhatti <[EMAIL PROTECTED]>wrote:> Hey martin,>> Of the three states that you have mentioned ... which one do i have to do> explicity ?> because i am calling the>> set as a submitted value (done in decoding phase)>> explicitly but i think the value is not bein
 g set. i
 have no validators for> my component. should that cause some problem ? the rest of the 2 phases are> invoked implicitly ?>> what do u mean when u say local values ?>> how do i check whether the value is being set when i call setSubmittedvalue.> all i know is that i place a call to setSubmittedvalue but the setter in> the bean is never callled.>> Thanx a lot.>> Martin Marinschek <[EMAIL PROTECTED]>wrote:> that needs quite a long explanation, I'll try to give you a short one ;)>> there are three states your component values can be in:>> - set as a submitted value (done in decoding phase)> - set as a local value (done after conversion and validation has been> processed, this is when setValid() is called, you don't have to do it> yourself)> - set in the backing bean (done in the update model phase)>> so in deco
 de, you
 need to set the submitted value.>> for conversion and validation, you have to make sure that the value is> convertable and valid, else the local value will never be set.>> if the local value is set - and all other components on the page have> valid values, the value is written through to the backing bean in the> update model phase.>> somewhat clearer?>> regards,>> Martin On 12/5/05, wasim bhatti wrote:> > Greetings,> >> > I have made a custom component using myfaces 1.0.9. Everythi ng worked> fine>> > to start with, and i was able to bind values of the component to the back> > end managed bean. At least there was no problem in retrieving values from> > the bean. The trouble occurs when the vlaue changes from the front.> > According to the binding principles the value shou
 ld be
 set at the back> end> > bean. but the setter is never called.> >> > Should the value setting take place in the decode method ?> > My decode method is as follows :>>> >> > public void decode( FacesContext context )> > {> > Map requestMap => > context.getExternalContext().getRequestParameterMap();> > String clientId = getClientId( context );> > try> > {> > String dateFrom = requestMap.get( clientId + DATE_FROM> > ).toString() ;> > setSubmittedValue( dateFrom );> > setValid( true );> > }> > catch( NumberFormatException ex )> > {> > ex.printStackTrace();> > setSubmittedValue( (String)requestMap.get(clientId + DATE_FROM)> > );> > }> > }> >> > What is the specific function of the setSubmittedVal ue ? as i
 n if i
 have> > more than 1 inputs in my encode method which ones value would be set when> > decode is called ?> > I can get the new values from the front using getSubmittedValue but the> > value is never propagated to the bean.> >> > Any help would be much appreciated.> >> > regards,> > a newbie to jsf> >> >> >> > > > Yahoo! DSL Something to write home about. Just $16.99/mo. or less> >>  -->> http://www.irian.at>> Your JSF powerhouse -> JSF Consulting, Development and> Courses in English and German>> Professional Support for Apache MyFaces> > Yahoo! Shopping> Find Great Deals on Gifts at Yahoo!
 Shopping>>--http://www.irian.atYour JSF powerhouse -JSF Consulting, Development andCourses in English and GermanProfessional Support for Apache MyFaces  
	
		Yahoo! Shopping 
Find Great Deals on Gifts at Yahoo! Shopping 

AW: Problems with ValueChangeListener and FacesMessages

2005-12-05 Thread andreas.mitter
I have one component on my page, where the immediate Attribute is set to true. 
And for this component the message is shown when the ValueChangeListener from 
my Selectbox is executed. For others no message is shown!
The Problem is, that I need this immediate Attribute to set to true, because on 
this component (it's a InputTextBox) I also have a ValueChangeListener.

So is there a way to skip the validation for this one component (for the 
InputTextBox) during the first ValueChangeListener method?

Regards,
Andy

-Ursprüngliche Nachricht-
Von: Martin Marinschek [mailto:[EMAIL PROTECTED]
Gesendet: Montag, 5. Dezember 2005 10:57
An: MyFaces Discussion
Betreff: Re: Problems with ValueChangeListener and FacesMessages


It's only executed for the components which have immediate set to true
- if you call facesContext.renderResponse in your valueChangeListener,
it won't be executed for the others.

regards,

Martin

On 12/5/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> The only thing I want to do is:
>
> Set some values from the backing bean into some inputtext tags (and this is 
> done in the valuechangelistener method)
>
> I didn't know, that the conversion and validation phase is executed...
> Is there a way to skip this?
>
> Regards,
> Andy
>
> -Ursprüngliche Nachricht-
> Von: Martin Marinschek [mailto:[EMAIL PROTECTED]
> Gesendet: Montag, 5. Dezember 2005 10:23
> An: MyFaces Discussion
> Betreff: Re: Problems with ValueChangeListener and FacesMessages
>
>
> so in fact you want to get rid of the submitted values, and for this
> you recreate the whole tree?
>
> maybe you could use component binding on those inputTexts that should
> loose their submitted value and reset the submitted value yourself for
> them?
>
> In any case I don't see why your approach shouldn't work. Have you
> checked if the conversion and validation phase is executed for the
> other components except your immediate components?
>
> You know that for the immediate components, the conversion and
> validation _is_ executed anyways, so you would see those messages in
> any case?
>
> regards,
>
> Martin
>
> On 12/5/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > No it's the same page, but in the ValueChangeListener some values for 
> > inputtext Tags are set and I have to refresh the page to display them.
> > This works fine, but is there another method to refresh the page?
> >
> > Regards,
> > Andy
> >
> >
> > -Ursprüngliche Nachricht-
> > Von: Martin Marinschek [mailto:[EMAIL PROTECTED]
> > Gesendet: Montag, 5. Dezember 2005 10:14
> > An: MyFaces Discussion
> > Betreff: Re: Problems with ValueChangeListener and FacesMessages
> >
> >
> > Hmmm...
> >
> > Let me try to understand what you are doing here - you want to head
> > off to a new page, right?
> >
> > regards,
> >
> > Martin
> >
> > On 12/5/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > >
> > >
> > > Hi All!
> > >
> > > I have problems with a ValueChangeListener and FacesMessages.
> > > In my JSP Site there is a Selectbox with a ValueChangeListener. Although I
> > > have set the immediate=True Attribute at this Selectbox, messages are 
> > > shown
> > > after the ValueChangeListener has been executed..
> > >
> > > Can you tell me why this happens??Is it perhaps the Context.setViewRoot?
> > >
> > > Here is my code:(JSP)
> > >
> > >  > > id="newPartnerstatus" styleClass="mustfield"
> > > value="#{newPartnerDto.statusId}" required="true"
> > > valueChangeListener="#{linker.setEndDate}"
> > > onchange="submit()">
> > > 
> > > 
> > >
> > >
> > > Here is my code:(ValueChangeListener Method:)
> > >
> > > public void setEndDate(ValueChangeEvent event) {
> > > editDto = (EditDto) FacesUtil.getManagedBean("editDto");
> > > sessionDto = (SessionDto)
> > > FacesUtil.getManagedBean("sessionDto");
> > > newPartnerDto = (NewPartnerDto) FacesUtil
> > >
> > > .getManagedBean("newPartnerDto");
> > >
> > > if (((Long) event.getNewValue()).compareTo(new Long(1)) 
> > > == 0
> > > && editDto.getEndDate() == null
> > > &&
> > > event.getComponent().getId().equalsIgnoreCase("status")) {
> > > editDto.setEndDate(new Date());
> > > editDto.setEndPerson(sessionDto.getUserName());
> > >
> > > String viewId = "/edit.jsp";
> > > FacesContext context =
> > > FacesContext.getCurrentInstance();
> > > UIViewRoot view =
> > > context.getApplication().getViewHandler()
> > > .createView(context, viewId);
> > >
> > > view.setViewId(viewId);
> > > context.setViewRoot(view);
> > > context.renderResponse();
> > > }
> > >
> > > }
> > >
> > > THX for help,
> > > Regards
> > > Andy
> > > _

Re: AW: Problems with ValueChangeListener and FacesMessages

2005-12-05 Thread Mario Ivankovits

Hi!

The only thing I want to do is:

Set some values from the backing bean into some inputtext tags (and this is 
done in the valuechangelistener method)
  

I guess you might experience other problems too.
The valueChangeListener is executed before the model update, so if you 
change a value in your model you will loose it afterwards.


There are (at least) two workarounds:

*) use the valueChangeNotifier which will be execute AFTER the model 
update and thus allows a more natural solution

http://issues.apache.org/jira/browse/MYFACES-864

*) set the value of your inputText through the component binding
--
Mario



Re: Custom Component Binding problem

2005-12-05 Thread Martin Marinschek
If you subclass from UIInput, the rest is done implicitly in the
processValidators and the processUpdates Method.

regards,

Martin

On 12/5/05, wasim bhatti <[EMAIL PROTECTED]> wrote:
> Hey martin,
>
> Of the three states that you have mentioned ... which one do i have to do
> explicity ?
> because i am calling the
>
> set as a submitted value (done in decoding phase)
>
> explicitly but i think the value is not being set. i have no validators for
> my component. should that cause some problem ?  the rest of the 2 phases are
> invoked implicitly ?
>
> what do u mean when u say local values ?
>
> how do i check whether the value is being set when i call setSubmittedvalue.
> all i know is that i place a call to  setSubmittedvalue but the setter in
> the bean is never callled.
>
> Thanx a lot.
>
> Martin Marinschek <[EMAIL PROTECTED]> wrote:
> that needs quite a long explanation, I'll try to give you a short one ;)
>
> there are three states your component values can be in:
>
> - set as a submitted value (done in decoding phase)
> - set as a local value (done after conversion and validation has been
> processed, this is when setValid() is called, you don't have to do it
> yourself)
> - set in the backing bean (done in the update model phase)
>
> so in decode, you need to set the submitted value.
>
> for conversion and validation, you have to make sure that the value is
> convertable and valid, else the local value will never be set.
>
> if the local value is set - and all other components on the page have
> valid values, the value is written through to the backing bean in the
> update model phase.
>
> somewhat clearer?
>
> regards,
>
> Martin
>
>
>
> On 12/5/05, wasim bhatti wrote:
> > Greetings,
> >
> > I have made a custom component using myfaces 1.0.9. Everythi ng worked
> fine
>
> > to start with, and i was able to bind values of the component to the back
> > end managed bean. At least there was no problem in retrieving values from
> > the bean. The trouble occurs when the vlaue changes from the front.
> > According to the binding principles the value should be set at the back
> end
> > bean. but the setter is never called.
> >
> > Should the value setting take place in the decode method ?
> > My decode method is as follows :
>
>
> >
> > public void decode( FacesContext context )
> > {
> > Map requestMap =
> > context.getExternalContext().getRequestParameterMap();
> > String clientId = getClientId( context );
> > try
> > {
> > String dateFrom = requestMap.get( clientId + DATE_FROM
> > ).toString() ;
> > setSubmittedValue( dateFrom );
> > setValid( true );
> > }
> > catch( NumberFormatException ex )
> > {
> > ex.printStackTrace();
> > setSubmittedValue( (String)requestMap.get(clientId + DATE_FROM)
> > );
> > }
> > }
> >
> > What is the specific function of the setSubmittedVal ue ? as in if i have
> > more than 1 inputs in my encode method which ones value would be set when
> > decode is called ?
> > I can get the new values from the front using getSubmittedValue but the
> > value is never propagated to the bean.
> >
> > Any help would be much appreciated.
> >
> > regards,
> > a newbie to jsf
> >
> >
> >
> > 
> > Yahoo! DSL Something to write home about. Just $16.99/mo. or less
> >
> >
>
>
> --
>
> http://www.irian.at
>
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
>
>
>  
> Yahoo! Shopping
>  Find Great Deals on Gifts at Yahoo! Shopping
>
>


--

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces


Re: Custom Component Binding problem

2005-12-05 Thread wasim bhatti
Hey martin,     Of the three states that you have mentioned ... which one do i have to do explicity ?  because i am calling the      set as a submitted value (done in decoding phase)  explicitly but i think the value is not being set. i have no validators for my component. should that cause some problem ?  the rest of the 2 phases are invoked implicitly ?     what do u mean when u say local values ?     how do i check whether the value is being set when i call setSubmittedvalue. all i know is that i place a call to  setSubmittedvalue but the setter in the bean is never callled.     Thanx a lot.Martin Marinschek <[EMAIL PROTECTED]> wrote:  that needs quite 
 a long
 explanation, I'll try to give you a short one ;)there are three states your component values can be in:- set as a submitted value (done in decoding phase)- set as a local value (done after conversion and validation has beenprocessed, this is when setValid() is called, you don't have to do ityourself)- set in the backing bean (done in the update model phase)so in decode, you need to set the submitted value.for conversion and validation, you have to make sure that the value isconvertable and valid, else the local value will never be set.if the local value is set - and all other components on the page havevalid values, the value is written through to the backing bean in theupdate model phase.somewhat clearer?regards,MartinOn 12/5/05, wasim bhatti <[EMAIL PROTECTED]>wrote:> Greetings,>> I have made a custom component using myfaces 1.0.9. Everythi
 ng
 worked fine> to start with, and i was able to bind values of the component to the back> end managed bean. At least there was no problem in retrieving values from> the bean. The trouble occurs when the vlaue changes from the front.> According to the binding principles the value should be set at the back end> bean. but the setter is never called.>> Should the value setting take place in the decode method ?> My decode method is as follows :>> public void decode( FacesContext context )> {> Map requestMap => context.getExternalContext().getRequestParameterMap();> String clientId = getClientId( context );> try> {> String dateFrom = requestMap.get( clientId + DATE_FROM> ).toString() ;> setSubmittedValue( dateFrom );> setValid( true );> }> catch( NumberFormatException ex )> {> ex.printStackTrace();>
 setSubmittedValue( (String)requestMap.get(clientId + DATE_FROM)> );> }> }>> What is the specific function of the setSubmittedVal ue ? as in if i have> more than 1 inputs in my encode method which ones value would be set when> decode is called ?> I can get the new values from the front using getSubmittedValue but the> value is never propagated to the bean.>> Any help would be much appreciated.>> regards,> a newbie to jsf > Yahoo! DSL Something to write home about. Just $16.99/mo. or less>>--http://www.irian.atYour JSF powerhouse -JSF Consulting, Development andCourses in English and GermanProfessional Support for Apache MyFaces  
	
		Yahoo! Shopping 
Find Great Deals on Gifts at Yahoo! Shopping 

Re: Custom Component Binding problem

2005-12-05 Thread Martin Marinschek
that needs quite a long explanation, I'll try to give you a short one ;)

there are three states your component values can be in:

- set as a submitted value (done in decoding phase)
- set as a local value (done after conversion and validation has been
processed, this is when setValid() is called, you don't have to do it
yourself)
- set in the backing bean (done in the update model phase)

so in decode, you need to set the submitted value.

for conversion and validation, you have to make sure that the value is
convertable and valid, else the local value will never be set.

if the local value is set - and all other components on the page have
valid values, the value is written through to the backing bean in the
update model phase.

somewhat clearer?

regards,

Martin



On 12/5/05, wasim bhatti <[EMAIL PROTECTED]> wrote:
> Greetings,
>
> I have made a custom component using myfaces 1.0.9. Everything worked fine
> to start with, and i was able to bind values of the component to the back
> end managed bean. At least there was no problem in retrieving values from
> the bean. The trouble occurs when the vlaue changes from the front.
> According to the binding principles the value should be set at the back end
> bean. but the setter is never called.
>
> Should the value setting take place in the decode method ?
> My decode method is as follows :


>
> public void decode( FacesContext context )
> {
> Map requestMap =
> context.getExternalContext().getRequestParameterMap();
> String clientId = getClientId( context );
> try
> {
> String dateFrom = requestMap.get( clientId + DATE_FROM
> ).toString() ;
> setSubmittedValue( dateFrom );
> setValid( true );
> }
> catch( NumberFormatException ex )
> {
> ex.printStackTrace();
> setSubmittedValue( (String)requestMap.get(clientId + DATE_FROM)
> );
> }
> }
>
> What is the specific function of the setSubmittedVal ue ? as in if i have
> more than 1 inputs in my encode method which ones value would be set when
> decode is called ?
> I can get the new values from the front using getSubmittedValue but the
> value is never propagated to the bean.
>
> Any help would be much appreciated.
>
> regards,
> a newbie to jsf
>
>
>
>  
>  Yahoo! DSL Something to write home about. Just $16.99/mo. or less
>
>


--

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces


Custom Component Binding problem

2005-12-05 Thread wasim bhatti
Greetings,     I have made a custom component using myfaces 1.0.9. Everything worked fine to start with, and i was able to bind values of the component to the back end managed bean. At least there was no problem in retrieving values from the bean. The trouble occurs when the vlaue changes from the front. According to the binding principles the value should be set at the back end bean. but the setter is never called.     Should the value setting take place in the decode method ?  My decode method is as follows :     public void decode( FacesContext context )    {    Map requestMap = context.getExternalContext().getRequestParameterMap();    String clientId = getClientId( context );     
 try    {    String dateFrom = requestMap.get( clientId + DATE_FROM ).toString() ; setSubmittedValue( dateFrom );      setValid( true );    }    catch( NumberFormatException ex )    {    ex.printStackTrace();    setSubmittedValue( (String)requestMap.get(clientId + DATE_FROM) );    }      }     What is the specific function of the setSubmittedVal
 ue ? as
 in if i have more than 1 inputs in my encode method which ones value would be set when decode is called ?  I can get the new values from the front using getSubmittedValue but the value is never propagated to the bean.     Any help would be much appreciated.     regards,  a newbie to jsf      
		 Yahoo! DSL Something to write home about. Just $16.99/mo. or less

Re: does not reference an Object of type SelectItem

2005-12-05 Thread Martin Marinschek
... and this should be ok. You can return an array of SelectItem objects.

Do you have any class loader issues here?

Maybe your javax.faces.api classes are loaded from a class loader
which is not accessible from your web-app? Or you have both the
jsf-api.jar and the myfaces-api.jar in your classpath?

regards,

Martin

On 12/5/05, Martin van den Bemt <[EMAIL PROTECTED]> wrote:
> Mike Duffy wrote:
> > I am trying to create a value binding for a  tag.  The 
> > object reference is
> > definitely a collection of SelectItem objects (I've even tried it with an 
> > array).
> >
> > However, I am getting an error that tells me the object reference does not 
> > contain SelectItem
> > objects.  The error message state, "but of type : 
> > Ljavax.faces.model.SelectItem;".
> >
> > What does the "Ljavax" reference mean?
> >
>
> [Ljavax.faces.model.SelectItem; means an array of SelectItem objects..
>
>
> Mvgr,
> Martin
>
>


--

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces


RE: Serialization problem with nightly builds

2005-12-05 Thread Lefevre, Daniel
 Hello,

Dennis, you are right. It seems that I got a serious caching problem.
I tried everything again and I observe the problem with 
JspStateManagerImpl.writeState only when the save state is on the client side. 
When save state is on the server side, I get a problem with 
JspStateManagerImpl.serializeView.
.. And when org.apache.myfaces.SERIALIZE_STATE_IN_SESSION is set to false... 
Everything goes fine!

Thanks guys, and sorry for the bad diagnose on my side.

Bye, Dan

-Original Message-
From: Dennis Byrne [mailto:[EMAIL PROTECTED] 
Sent: lundi 5 décembre 2005 10:27
To: MyFaces Discussion
Subject: RE: Serialization problem with nightly builds

JspStateManagerImpl.writeState is only supposed to call 
HtmlResponseStateManager.writeState when you are saving the 
state on the client side.  Let me know if you are observing 
otherwise.

Can you please post a full stack after you have verified that 
org.apache.myfaces.SERIALIZE_STATE_IN_SESSION is set to false 
and javax.faces.STATE_SAVING_METHOD is set to server?


Dennis Byrne


RE: selectOneRadio / f:selectItem in different table cells.

2005-12-05 Thread Jeffrey Porter
Cheers.

I think I've got it working, I'll update the WIKI page when I get an
example running.

:-)

http://wiki.apache.org/myfaces/Radio?action=show



-Original Message-
From: Martin Marinschek [mailto:[EMAIL PROTECTED] 
Sent: 05 December 2005 09:42
To: MyFaces Discussion
Subject: Re: selectOneRadio / f:selectItem in different table cells.

I guess that's all - at least in the open source world...

you could bug Thomas Spiegl for some more explanation, he is the
author of the beast.

regards,

Martin

On 12/5/05, Jeffrey Porter <[EMAIL PROTECTED]> wrote:
> Thanks Martin.
>
> I've found the spec at...
> http://myfaces.apache.org/tlddoc/tomahawk/t/radio.html
>
>
> and a bit of an example at...
> http://www.irian.at/myfaces/selectbox.jsp.source
>
>
> Is there any other help files/examples that you know of?
>
> Thanks
> Jeff
>
>
>
> -Original Message-
> From: Martin Marinschek [mailto:[EMAIL PROTECTED]
> Sent: 05 December 2005 09:08
> To: MyFaces Discussion
> Subject: Re: selectOneRadio / f:selectItem in different table cells.
>
> Have you looked at the t:radio component of MyFaces?
>
> Might be helpful in your case - with this component you can layout the
> radio components where you really want them to be.
>
> regards,
>
> Martin
>
> On 12/5/05, Jeffrey Porter <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> > So has anyone used a selectOneRadio with the selectItem in different
> HTML
> > table cells?
> >
> >
> >
> > JP
> >
> >
> >
> > -Original Message-
> >  From: Jeffrey Porter [mailto:[EMAIL PROTECTED]
> >  Sent: 02 December 2005 15:56
> >  To: MyFaces Discussion
> >  Subject: h:selectOneRadio / f:selectItem in different table cells.
> >
> >
> >
> > I'm trying to put radio buttons in different cells of a table, but
> they
> > don't appear.
> >
> >
> >
> > Do I have to use a selectOneRadio for each radio button? Even though
I
> want
> > the buttons to be part of the same group.
> >
> >
> >
> > Does anyone have an example?
> >
> >
> >
> > Thanks
> >
> > Jeff.
> >
> > (almost home time J  )
> >
> >
> >
> >
> >
> > Code..
> >
> >
> >
> > 
> >
> > 
> >
> > 
> >
> > 
>
>
> --
>
> http://www.irian.at
>
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>


--

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces


Re: does not reference an Object of type SelectItem

2005-12-05 Thread Martin van den Bemt

Mike Duffy wrote:

I am trying to create a value binding for a  tag.  The object 
reference is
definitely a collection of SelectItem objects (I've even tried it with an 
array).

However, I am getting an error that tells me the object reference does not 
contain SelectItem
objects.  The error message state, "but of type : 
Ljavax.faces.model.SelectItem;".

What does the "Ljavax" reference mean?



[Ljavax.faces.model.SelectItem; means an array of SelectItem objects..


Mvgr,
Martin



Re: Problems with ValueChangeListener and FacesMessages

2005-12-05 Thread Martin Marinschek
It's only executed for the components which have immediate set to true
- if you call facesContext.renderResponse in your valueChangeListener,
it won't be executed for the others.

regards,

Martin

On 12/5/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> The only thing I want to do is:
>
> Set some values from the backing bean into some inputtext tags (and this is 
> done in the valuechangelistener method)
>
> I didn't know, that the conversion and validation phase is executed...
> Is there a way to skip this?
>
> Regards,
> Andy
>
> -Ursprüngliche Nachricht-
> Von: Martin Marinschek [mailto:[EMAIL PROTECTED]
> Gesendet: Montag, 5. Dezember 2005 10:23
> An: MyFaces Discussion
> Betreff: Re: Problems with ValueChangeListener and FacesMessages
>
>
> so in fact you want to get rid of the submitted values, and for this
> you recreate the whole tree?
>
> maybe you could use component binding on those inputTexts that should
> loose their submitted value and reset the submitted value yourself for
> them?
>
> In any case I don't see why your approach shouldn't work. Have you
> checked if the conversion and validation phase is executed for the
> other components except your immediate components?
>
> You know that for the immediate components, the conversion and
> validation _is_ executed anyways, so you would see those messages in
> any case?
>
> regards,
>
> Martin
>
> On 12/5/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > No it's the same page, but in the ValueChangeListener some values for 
> > inputtext Tags are set and I have to refresh the page to display them.
> > This works fine, but is there another method to refresh the page?
> >
> > Regards,
> > Andy
> >
> >
> > -Ursprüngliche Nachricht-
> > Von: Martin Marinschek [mailto:[EMAIL PROTECTED]
> > Gesendet: Montag, 5. Dezember 2005 10:14
> > An: MyFaces Discussion
> > Betreff: Re: Problems with ValueChangeListener and FacesMessages
> >
> >
> > Hmmm...
> >
> > Let me try to understand what you are doing here - you want to head
> > off to a new page, right?
> >
> > regards,
> >
> > Martin
> >
> > On 12/5/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > >
> > >
> > > Hi All!
> > >
> > > I have problems with a ValueChangeListener and FacesMessages.
> > > In my JSP Site there is a Selectbox with a ValueChangeListener. Although I
> > > have set the immediate=True Attribute at this Selectbox, messages are 
> > > shown
> > > after the ValueChangeListener has been executed..
> > >
> > > Can you tell me why this happens??Is it perhaps the Context.setViewRoot?
> > >
> > > Here is my code:(JSP)
> > >
> > >  > > id="newPartnerstatus" styleClass="mustfield"
> > > value="#{newPartnerDto.statusId}" required="true"
> > > valueChangeListener="#{linker.setEndDate}"
> > > onchange="submit()">
> > > 
> > > 
> > >
> > >
> > > Here is my code:(ValueChangeListener Method:)
> > >
> > > public void setEndDate(ValueChangeEvent event) {
> > > editDto = (EditDto) FacesUtil.getManagedBean("editDto");
> > > sessionDto = (SessionDto)
> > > FacesUtil.getManagedBean("sessionDto");
> > > newPartnerDto = (NewPartnerDto) FacesUtil
> > >
> > > .getManagedBean("newPartnerDto");
> > >
> > > if (((Long) event.getNewValue()).compareTo(new Long(1)) 
> > > == 0
> > > && editDto.getEndDate() == null
> > > &&
> > > event.getComponent().getId().equalsIgnoreCase("status")) {
> > > editDto.setEndDate(new Date());
> > > editDto.setEndPerson(sessionDto.getUserName());
> > >
> > > String viewId = "/edit.jsp";
> > > FacesContext context =
> > > FacesContext.getCurrentInstance();
> > > UIViewRoot view =
> > > context.getApplication().getViewHandler()
> > > .createView(context, viewId);
> > >
> > > view.setViewId(viewId);
> > > context.setViewRoot(view);
> > > context.renderResponse();
> > > }
> > >
> > > }
> > >
> > > THX for help,
> > > Regards
> > > Andy
> > > __
> > > This email and any files transmitted with it are confidential and intended
> > > solely for the use of the individual or entity to whom they are addressed.
> > > If you have received this email in error please notify your system 
> > > manager.
> > > This footnote also confirms that this email message has been swept for the
> > > presence of computer viruses.
> > > __
> > >
> >
> >
> > --
> >
> > http://www.irian.at
> >
> > Your JSF powerhouse -
> > JSF Consulting, Development and
> > Courses in English and German
> >
> > Professional Support for Apache MyFaces
> >
> >
> > __

does not reference an Object of type SelectItem

2005-12-05 Thread Mike Duffy
I am trying to create a value binding for a  tag.  The object 
reference is
definitely a collection of SelectItem objects (I've even tried it with an 
array).

However, I am getting an error that tells me the object reference does not 
contain SelectItem
objects.  The error message state, "but of type : 
Ljavax.faces.model.SelectItem;".

What does the "Ljavax" reference mean?

Very frustrating.  Please help.

Mike

javax.servlet.ServletException: 
Value binding '#{issueCreate.testItems}'of UISelectItems with component-path 
{Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: 
/view/tracker/issueCreate.jsp]
[Class: javax.faces.component.html.HtmlForm,Id: issueCreateForm][Class:
org.apache.myfaces.custom.div.Div,Id: _id74]
[Class: org.apache.myfaces.custom.div.Div,Id: _id84][Class:
javax.faces.component.html.HtmlSelectOneMenu,Id: test1][Class:
javax.faces.component.UISelectItems,Id: _id85]} 
does not reference an Object of type SelectItem, SelectItem[], Collection or 
Map but of type : [Ljavax.faces.model.SelectItem;



__ 
Yahoo! DSL – Something to write home about. 
Just $16.99/mo. or less. 
dsl.yahoo.com 



AW: Problems with ValueChangeListener and FacesMessages

2005-12-05 Thread andreas.mitter
The only thing I want to do is:

Set some values from the backing bean into some inputtext tags (and this is 
done in the valuechangelistener method)

I didn't know, that the conversion and validation phase is executed...
Is there a way to skip this?

Regards,
Andy

-Ursprüngliche Nachricht-
Von: Martin Marinschek [mailto:[EMAIL PROTECTED]
Gesendet: Montag, 5. Dezember 2005 10:23
An: MyFaces Discussion
Betreff: Re: Problems with ValueChangeListener and FacesMessages


so in fact you want to get rid of the submitted values, and for this
you recreate the whole tree?

maybe you could use component binding on those inputTexts that should
loose their submitted value and reset the submitted value yourself for
them?

In any case I don't see why your approach shouldn't work. Have you
checked if the conversion and validation phase is executed for the
other components except your immediate components?

You know that for the immediate components, the conversion and
validation _is_ executed anyways, so you would see those messages in
any case?

regards,

Martin

On 12/5/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> No it's the same page, but in the ValueChangeListener some values for 
> inputtext Tags are set and I have to refresh the page to display them.
> This works fine, but is there another method to refresh the page?
>
> Regards,
> Andy
>
>
> -Ursprüngliche Nachricht-
> Von: Martin Marinschek [mailto:[EMAIL PROTECTED]
> Gesendet: Montag, 5. Dezember 2005 10:14
> An: MyFaces Discussion
> Betreff: Re: Problems with ValueChangeListener and FacesMessages
>
>
> Hmmm...
>
> Let me try to understand what you are doing here - you want to head
> off to a new page, right?
>
> regards,
>
> Martin
>
> On 12/5/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> >
> >
> > Hi All!
> >
> > I have problems with a ValueChangeListener and FacesMessages.
> > In my JSP Site there is a Selectbox with a ValueChangeListener. Although I
> > have set the immediate=True Attribute at this Selectbox, messages are shown
> > after the ValueChangeListener has been executed..
> >
> > Can you tell me why this happens??Is it perhaps the Context.setViewRoot?
> >
> > Here is my code:(JSP)
> >
> >  > id="newPartnerstatus" styleClass="mustfield"
> > value="#{newPartnerDto.statusId}" required="true"
> > valueChangeListener="#{linker.setEndDate}"
> > onchange="submit()">
> > 
> > 
> >
> >
> > Here is my code:(ValueChangeListener Method:)
> >
> > public void setEndDate(ValueChangeEvent event) {
> > editDto = (EditDto) FacesUtil.getManagedBean("editDto");
> > sessionDto = (SessionDto)
> > FacesUtil.getManagedBean("sessionDto");
> > newPartnerDto = (NewPartnerDto) FacesUtil
> >
> > .getManagedBean("newPartnerDto");
> >
> > if (((Long) event.getNewValue()).compareTo(new Long(1)) == 0
> > && editDto.getEndDate() == null
> > &&
> > event.getComponent().getId().equalsIgnoreCase("status")) {
> > editDto.setEndDate(new Date());
> > editDto.setEndPerson(sessionDto.getUserName());
> >
> > String viewId = "/edit.jsp";
> > FacesContext context =
> > FacesContext.getCurrentInstance();
> > UIViewRoot view =
> > context.getApplication().getViewHandler()
> > .createView(context, viewId);
> >
> > view.setViewId(viewId);
> > context.setViewRoot(view);
> > context.renderResponse();
> > }
> >
> > }
> >
> > THX for help,
> > Regards
> > Andy
> > __
> > This email and any files transmitted with it are confidential and intended
> > solely for the use of the individual or entity to whom they are addressed.
> > If you have received this email in error please notify your system manager.
> > This footnote also confirms that this email message has been swept for the
> > presence of computer viruses.
> > __
> >
>
>
> --
>
> http://www.irian.at
>
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
> __
>
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error please notify
> your system manager.
>
> This footnote also confirms that this email message has been swept
> for the presence of computer viruses.
> __
>


--

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Course

Re: selectOneRadio / f:selectItem in different table cells.

2005-12-05 Thread Martin Marinschek
I guess that's all - at least in the open source world...

you could bug Thomas Spiegl for some more explanation, he is the
author of the beast.

regards,

Martin

On 12/5/05, Jeffrey Porter <[EMAIL PROTECTED]> wrote:
> Thanks Martin.
>
> I've found the spec at...
> http://myfaces.apache.org/tlddoc/tomahawk/t/radio.html
>
>
> and a bit of an example at...
> http://www.irian.at/myfaces/selectbox.jsp.source
>
>
> Is there any other help files/examples that you know of?
>
> Thanks
> Jeff
>
>
>
> -Original Message-
> From: Martin Marinschek [mailto:[EMAIL PROTECTED]
> Sent: 05 December 2005 09:08
> To: MyFaces Discussion
> Subject: Re: selectOneRadio / f:selectItem in different table cells.
>
> Have you looked at the t:radio component of MyFaces?
>
> Might be helpful in your case - with this component you can layout the
> radio components where you really want them to be.
>
> regards,
>
> Martin
>
> On 12/5/05, Jeffrey Porter <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> > So has anyone used a selectOneRadio with the selectItem in different
> HTML
> > table cells?
> >
> >
> >
> > JP
> >
> >
> >
> > -Original Message-
> >  From: Jeffrey Porter [mailto:[EMAIL PROTECTED]
> >  Sent: 02 December 2005 15:56
> >  To: MyFaces Discussion
> >  Subject: h:selectOneRadio / f:selectItem in different table cells.
> >
> >
> >
> > I'm trying to put radio buttons in different cells of a table, but
> they
> > don't appear.
> >
> >
> >
> > Do I have to use a selectOneRadio for each radio button? Even though I
> want
> > the buttons to be part of the same group.
> >
> >
> >
> > Does anyone have an example?
> >
> >
> >
> > Thanks
> >
> > Jeff.
> >
> > (almost home time J  )
> >
> >
> >
> >
> >
> > Code..
> >
> >
> >
> > 
> >
> > 
> >
> > 
> >
> > 
>
>
> --
>
> http://www.irian.at
>
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>


--

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces


RE: selectOneRadio / f:selectItem in different table cells.

2005-12-05 Thread Jeffrey Porter
Thanks Martin.

I've found the spec at...
http://myfaces.apache.org/tlddoc/tomahawk/t/radio.html


and a bit of an example at...
http://www.irian.at/myfaces/selectbox.jsp.source


Is there any other help files/examples that you know of?

Thanks
Jeff



-Original Message-
From: Martin Marinschek [mailto:[EMAIL PROTECTED] 
Sent: 05 December 2005 09:08
To: MyFaces Discussion
Subject: Re: selectOneRadio / f:selectItem in different table cells.

Have you looked at the t:radio component of MyFaces?

Might be helpful in your case - with this component you can layout the
radio components where you really want them to be.

regards,

Martin

On 12/5/05, Jeffrey Porter <[EMAIL PROTECTED]> wrote:
>
>
>
> So has anyone used a selectOneRadio with the selectItem in different
HTML
> table cells?
>
>
>
> JP
>
>
>
> -Original Message-
>  From: Jeffrey Porter [mailto:[EMAIL PROTECTED]
>  Sent: 02 December 2005 15:56
>  To: MyFaces Discussion
>  Subject: h:selectOneRadio / f:selectItem in different table cells.
>
>
>
> I'm trying to put radio buttons in different cells of a table, but
they
> don't appear.
>
>
>
> Do I have to use a selectOneRadio for each radio button? Even though I
want
> the buttons to be part of the same group.
>
>
>
> Does anyone have an example?
>
>
>
> Thanks
>
> Jeff.
>
> (almost home time J  )
>
>
>
>
>
> Code..
>
>
>
> 
>
> 
>
> 
>
> 


--

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces


RE: Serialization problem with nightly builds

2005-12-05 Thread Dennis Byrne
JspStateManagerImpl.writeState is only supposed to call 
HtmlResponseStateManager.writeState when you are saving the 
state on the client side.  Let me know if you are observing 
otherwise.

Can you please post a full stack after you have verified that 
org.apache.myfaces.SERIALIZE_STATE_IN_SESSION is set to false 
and javax.faces.STATE_SAVING_METHOD is set to server?

 Original message 
>Date: Mon, 5 Dec 2005 10:01:25 +0100
>From: "Lefevre, Daniel" <[EMAIL PROTECTED]>  
>Subject: RE: Serialization problem with nightly builds  
>To: "MyFaces Discussion" 
>
>Here it is!
>
>
>javax.faces.FacesException: java.io.NotSerializableException:
>org.springframework.beans.factory.support.DefaultListableBean
Factory
>   at
>org.apache.myfaces.util.StateUtils.getAsByteArray
(StateUtils.java:161)
>   at
>org.apache.myfaces.util.StateUtils.construct
(StateUtils.java:137)
>   at
>org.apache.myfaces.renderkit.html.HtmlResponseStateManager.wr
iteState(Ht
>mlResponseStateManager.java:101)
>   at
>org.apache.myfaces.application.jsp.JspStateManagerImpl.writeS
tate(JspSta
>teManagerImpl.java:362)
>   at
>org.apache.myfaces.taglib.core.ViewTag.doAfterBody
(ViewTag.java:160)
>   at
>org.apache.jsp.protected_.manageProductsRedirector_jsp._jspx_
meth_f_view
>_0(manageProductsRedirector_jsp.java:178)
>   at
>org.apache.jsp.protected_.manageProductsRedirector_jsp._jspSe
rvice(manag
>eProductsRedirector_jsp.java:91)
>   at
>org.apache.jasper.runtime.HttpJspBase.service
(HttpJspBase.java:94)
>   at javax.servlet.http.HttpServlet.service
(HttpServlet.java:802)
>   at
>org.apache.jasper.servlet.JspServletWrapper.service
(JspServletWrapper.ja
>va:324)
>   at
>org.apache.jasper.servlet.JspServlet.serviceJspFile
(JspServlet.java:292)
>   at
>org.apache.jasper.servlet.JspServlet.service
(JspServlet.java:236)
>   at javax.servlet.http.HttpServlet.service
(HttpServlet.java:802)
>   at
>org.apache.catalina.core.ApplicationFilterChain.internalDoFil
ter(Applica
>tionFilterChain.java:237)
>   at
>org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilt
>erChain.java:157)
>   at
>org.apache.catalina.core.ApplicationDispatcher.invoke
(ApplicationDispatc
>her.java:704)
>   at
>org.apache.catalina.core.ApplicationDispatcher.processRequest
(Applicatio
>nDispatcher.java:474)
>   at
>org.apache.catalina.core.ApplicationDispatcher.doForward
(ApplicationDisp
>atcher.java:409)
>   at
>org.apache.catalina.core.ApplicationDispatcher.forward
(ApplicationDispat
>cher.java:312)
>   at
>org.apache.myfaces.context.servlet.ServletExternalContextImpl
.dispatch(S
>ervletExternalContextImpl.java:416)
>   at
>org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderV
iew(JspView
>HandlerImpl.java:234)
>   at
>org.apache.myfaces.lifecycle.LifecycleImpl.render
(LifecycleImpl.java:372
>)
>   at
>javax.faces.webapp.FacesServlet.service
(FacesServlet.java:107)
>   at
>org.apache.catalina.core.ApplicationFilterChain.internalDoFil
ter(Applica
>tionFilterChain.java:237)
>   at
>org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilt
>erChain.java:157)
>   at
>org.apache.catalina.core.ApplicationDispatcher.invoke
(ApplicationDispatc
>her.java:704)
>   at
>org.apache.catalina.core.ApplicationDispatcher.processRequest
(Applicatio
>nDispatcher.java:474)
>   at
>org.apache.catalina.core.ApplicationDispatcher.doForward
(ApplicationDisp
>atcher.java:409)
>   at
>org.apache.catalina.core.ApplicationDispatcher.forward
(ApplicationDispat
>cher.java:312)
>   at
>org.apache.myfaces.context.servlet.ServletExternalContextImpl
.dispatch(S
>ervletExternalContextImpl.java:416)
>   at
>org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderV
iew(JspView
>HandlerImpl.java:234)
>   at
>org.apache.myfaces.lifecycle.LifecycleImpl.render
(LifecycleImpl.java:372
>)
>   at
>javax.faces.webapp.FacesServlet.service
(FacesServlet.java:107)
>   at
>org.apache.catalina.core.ApplicationFilterChain.internalDoFil
ter(Applica
>tionFilterChain.java:237)
>   at
>org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilt
>erChain.java:157)
>   at
>com.opensymphony.module.sitemesh.filter.PageFilter.parsePage
(PageFilter.
>java:118)
>   at
>com.opensymphony.module.sitemesh.filter.PageFilter.doFilter
(PageFilter.j
>ava:52)
>   at
>org.apache.catalina.core.ApplicationFilterChain.internalDoFil
ter(Applica
>tionFilterChain.java:186)
>   at
>org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilt
>erChain.java:157)
>   at
>org.apache.myfaces.component.html.util.ExtensionsFilter.doFil
ter(Extensi
>onsFilter.java:123)
>   at
>org.apache.catalina.core.ApplicationFilterChain.internalDoFil
ter(Applica
>tionFilterChain.java:186)
>   at
>org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilt
>erChain.java:157)
>   at
>eu.cec.trade.sigl2.filters.GacaAuthenti

Re: Problems with ValueChangeListener and FacesMessages

2005-12-05 Thread Martin Marinschek
so in fact you want to get rid of the submitted values, and for this
you recreate the whole tree?

maybe you could use component binding on those inputTexts that should
loose their submitted value and reset the submitted value yourself for
them?

In any case I don't see why your approach shouldn't work. Have you
checked if the conversion and validation phase is executed for the
other components except your immediate components?

You know that for the immediate components, the conversion and
validation _is_ executed anyways, so you would see those messages in
any case?

regards,

Martin

On 12/5/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> No it's the same page, but in the ValueChangeListener some values for 
> inputtext Tags are set and I have to refresh the page to display them.
> This works fine, but is there another method to refresh the page?
>
> Regards,
> Andy
>
>
> -Ursprüngliche Nachricht-
> Von: Martin Marinschek [mailto:[EMAIL PROTECTED]
> Gesendet: Montag, 5. Dezember 2005 10:14
> An: MyFaces Discussion
> Betreff: Re: Problems with ValueChangeListener and FacesMessages
>
>
> Hmmm...
>
> Let me try to understand what you are doing here - you want to head
> off to a new page, right?
>
> regards,
>
> Martin
>
> On 12/5/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> >
> >
> > Hi All!
> >
> > I have problems with a ValueChangeListener and FacesMessages.
> > In my JSP Site there is a Selectbox with a ValueChangeListener. Although I
> > have set the immediate=True Attribute at this Selectbox, messages are shown
> > after the ValueChangeListener has been executed..
> >
> > Can you tell me why this happens??Is it perhaps the Context.setViewRoot?
> >
> > Here is my code:(JSP)
> >
> >  > id="newPartnerstatus" styleClass="mustfield"
> > value="#{newPartnerDto.statusId}" required="true"
> > valueChangeListener="#{linker.setEndDate}"
> > onchange="submit()">
> > 
> > 
> >
> >
> > Here is my code:(ValueChangeListener Method:)
> >
> > public void setEndDate(ValueChangeEvent event) {
> > editDto = (EditDto) FacesUtil.getManagedBean("editDto");
> > sessionDto = (SessionDto)
> > FacesUtil.getManagedBean("sessionDto");
> > newPartnerDto = (NewPartnerDto) FacesUtil
> >
> > .getManagedBean("newPartnerDto");
> >
> > if (((Long) event.getNewValue()).compareTo(new Long(1)) == 0
> > && editDto.getEndDate() == null
> > &&
> > event.getComponent().getId().equalsIgnoreCase("status")) {
> > editDto.setEndDate(new Date());
> > editDto.setEndPerson(sessionDto.getUserName());
> >
> > String viewId = "/edit.jsp";
> > FacesContext context =
> > FacesContext.getCurrentInstance();
> > UIViewRoot view =
> > context.getApplication().getViewHandler()
> > .createView(context, viewId);
> >
> > view.setViewId(viewId);
> > context.setViewRoot(view);
> > context.renderResponse();
> > }
> >
> > }
> >
> > THX for help,
> > Regards
> > Andy
> > __
> > This email and any files transmitted with it are confidential and intended
> > solely for the use of the individual or entity to whom they are addressed.
> > If you have received this email in error please notify your system manager.
> > This footnote also confirms that this email message has been swept for the
> > presence of computer viruses.
> > __
> >
>
>
> --
>
> http://www.irian.at
>
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
> __
>
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error please notify
> your system manager.
>
> This footnote also confirms that this email message has been swept
> for the presence of computer viruses.
> __
>


--

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces


AW: Problems with ValueChangeListener and FacesMessages

2005-12-05 Thread andreas.mitter
No it's the same page, but in the ValueChangeListener some values for inputtext 
Tags are set and I have to refresh the page to display them.
This works fine, but is there another method to refresh the page?

Regards,
Andy


-Ursprüngliche Nachricht-
Von: Martin Marinschek [mailto:[EMAIL PROTECTED]
Gesendet: Montag, 5. Dezember 2005 10:14
An: MyFaces Discussion
Betreff: Re: Problems with ValueChangeListener and FacesMessages


Hmmm...

Let me try to understand what you are doing here - you want to head
off to a new page, right?

regards,

Martin

On 12/5/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
> Hi All!
>
> I have problems with a ValueChangeListener and FacesMessages.
> In my JSP Site there is a Selectbox with a ValueChangeListener. Although I
> have set the immediate=True Attribute at this Selectbox, messages are shown
> after the ValueChangeListener has been executed..
>
> Can you tell me why this happens??Is it perhaps the Context.setViewRoot?
>
> Here is my code:(JSP)
>
>  id="newPartnerstatus" styleClass="mustfield"
> value="#{newPartnerDto.statusId}" required="true"
> valueChangeListener="#{linker.setEndDate}"
> onchange="submit()">
> 
> 
>
>
> Here is my code:(ValueChangeListener Method:)
>
> public void setEndDate(ValueChangeEvent event) {
> editDto = (EditDto) FacesUtil.getManagedBean("editDto");
> sessionDto = (SessionDto)
> FacesUtil.getManagedBean("sessionDto");
> newPartnerDto = (NewPartnerDto) FacesUtil
>
> .getManagedBean("newPartnerDto");
>
> if (((Long) event.getNewValue()).compareTo(new Long(1)) == 0
> && editDto.getEndDate() == null
> &&
> event.getComponent().getId().equalsIgnoreCase("status")) {
> editDto.setEndDate(new Date());
> editDto.setEndPerson(sessionDto.getUserName());
>
> String viewId = "/edit.jsp";
> FacesContext context =
> FacesContext.getCurrentInstance();
> UIViewRoot view =
> context.getApplication().getViewHandler()
> .createView(context, viewId);
>
> view.setViewId(viewId);
> context.setViewRoot(view);
> context.renderResponse();
> }
>
> }
>
> THX for help,
> Regards
> Andy
> __
> This email and any files transmitted with it are confidential and intended
> solely for the use of the individual or entity to whom they are addressed.
> If you have received this email in error please notify your system manager.
> This footnote also confirms that this email message has been swept for the
> presence of computer viruses.
> __
>


--

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces


__

This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
your system manager.

This footnote also confirms that this email message has been swept
for the presence of computer viruses.
__


Re: Problems with ValueChangeListener and FacesMessages

2005-12-05 Thread Martin Marinschek
Hmmm...

Let me try to understand what you are doing here - you want to head
off to a new page, right?

regards,

Martin

On 12/5/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
> Hi All!
>
> I have problems with a ValueChangeListener and FacesMessages.
> In my JSP Site there is a Selectbox with a ValueChangeListener. Although I
> have set the immediate=True Attribute at this Selectbox, messages are shown
> after the ValueChangeListener has been executed..
>
> Can you tell me why this happens??Is it perhaps the Context.setViewRoot?
>
> Here is my code:(JSP)
>
>  id="newPartnerstatus" styleClass="mustfield"
> value="#{newPartnerDto.statusId}" required="true"
> valueChangeListener="#{linker.setEndDate}"
> onchange="submit()">
> 
> 
>
>
> Here is my code:(ValueChangeListener Method:)
>
> public void setEndDate(ValueChangeEvent event) {
> editDto = (EditDto) FacesUtil.getManagedBean("editDto");
> sessionDto = (SessionDto)
> FacesUtil.getManagedBean("sessionDto");
> newPartnerDto = (NewPartnerDto) FacesUtil
>
> .getManagedBean("newPartnerDto");
>
> if (((Long) event.getNewValue()).compareTo(new Long(1)) == 0
> && editDto.getEndDate() == null
> &&
> event.getComponent().getId().equalsIgnoreCase("status")) {
> editDto.setEndDate(new Date());
> editDto.setEndPerson(sessionDto.getUserName());
>
> String viewId = "/edit.jsp";
> FacesContext context =
> FacesContext.getCurrentInstance();
> UIViewRoot view =
> context.getApplication().getViewHandler()
> .createView(context, viewId);
>
> view.setViewId(viewId);
> context.setViewRoot(view);
> context.renderResponse();
> }
>
> }
>
> THX for help,
> Regards
> Andy
> __
> This email and any files transmitted with it are confidential and intended
> solely for the use of the individual or entity to whom they are addressed.
> If you have received this email in error please notify your system manager.
> This footnote also confirms that this email message has been swept for the
> presence of computer viruses.
> __
>


--

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces


Re: selectOneRadio / f:selectItem in different table cells.

2005-12-05 Thread Martin Marinschek
Have you looked at the t:radio component of MyFaces?

Might be helpful in your case - with this component you can layout the
radio components where you really want them to be.

regards,

Martin

On 12/5/05, Jeffrey Porter <[EMAIL PROTECTED]> wrote:
>
>
>
> So has anyone used a selectOneRadio with the selectItem in different HTML
> table cells?
>
>
>
> JP
>
>
>
> -Original Message-
>  From: Jeffrey Porter [mailto:[EMAIL PROTECTED]
>  Sent: 02 December 2005 15:56
>  To: MyFaces Discussion
>  Subject: h:selectOneRadio / f:selectItem in different table cells.
>
>
>
> I'm trying to put radio buttons in different cells of a table, but they
> don't appear.
>
>
>
> Do I have to use a selectOneRadio for each radio button? Even though I want
> the buttons to be part of the same group.
>
>
>
> Does anyone have an example?
>
>
>
> Thanks
>
> Jeff.
>
> (almost home time J  )
>
>
>
>
>
> Code..
>
>
>
> 
>
> 
>
> 
>
> 


--

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces


Problems with ValueChangeListener and FacesMessages

2005-12-05 Thread andreas.mitter
Title: Problems with ValueChangeListener and FacesMessages






Hi All!


I have problems with a ValueChangeListener and FacesMessages.

In my JSP Site there is a Selectbox with a ValueChangeListener. Although I have set the immediate=True Attribute at this Selectbox, messages are shown after the ValueChangeListener has been executed..

Can you tell me why this happens??Is it perhaps the Context.setViewRoot?


Here is my code:(JSP)




    

h:selectOneMenu>



Here is my code:(ValueChangeListener Method:)


public void setEndDate(ValueChangeEvent event) {

        editDto = (EditDto) FacesUtil.getManagedBean("editDto");

        sessionDto = (SessionDto) FacesUtil.getManagedBean("sessionDto");

        newPartnerDto = (NewPartnerDto) FacesUtil

                .getManagedBean("newPartnerDto");

        

        if (((Long) event.getNewValue()).compareTo(new Long(1)) == 0

                && editDto.getEndDate() == null

                && event.getComponent().getId().equalsIgnoreCase("status")) {

            editDto.setEndDate(new Date());

            editDto.setEndPerson(sessionDto.getUserName());


            String viewId = "/edit.jsp";

            FacesContext context = FacesContext.getCurrentInstance();

            UIViewRoot view = context.getApplication().getViewHandler()

                    .createView(context, viewId);

            

            view.setViewId(viewId);

            context.setViewRoot(view);

            context.renderResponse();

        }


}


THX for help, 

Regards

Andy



__

This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
your system manager.

This footnote also confirms that this email message has been swept
for the presence of computer viruses.
__



RE: selectOneRadio / f:selectItem in different table cells.

2005-12-05 Thread Jeffrey Porter








So has anyone used a selectOneRadio with
the selectItem in different HTML table cells?

 

JP

 

-Original Message-
From: Jeffrey Porter
[mailto:[EMAIL PROTECTED] 
Sent: 02 December 2005 15:56
To: MyFaces Discussion
Subject: h:selectOneRadio /
f:selectItem in different table cells.

 

I’m trying to put radio
buttons in different cells of a table, but they don’t appear.

 

Do I have to use a selectOneRadio for each
radio button? Even though I want the buttons to be part of the same group.

 

Does anyone have an example?

 

Thanks

Jeff.

(almost home time J  )

 

 

Code..

 

 id="Radio1">

 itemLabel="Value1" itemValue="Value1"/>

 itemLabel="Value2" itemValue="Value2"/>

h:selectOneRadio>








RE: Serialization problem with nightly builds

2005-12-05 Thread Lefevre, Daniel
Here it is!


javax.faces.FacesException: java.io.NotSerializableException:
org.springframework.beans.factory.support.DefaultListableBeanFactory
at
org.apache.myfaces.util.StateUtils.getAsByteArray(StateUtils.java:161)
at
org.apache.myfaces.util.StateUtils.construct(StateUtils.java:137)
at
org.apache.myfaces.renderkit.html.HtmlResponseStateManager.writeState(Ht
mlResponseStateManager.java:101)
at
org.apache.myfaces.application.jsp.JspStateManagerImpl.writeState(JspSta
teManagerImpl.java:362)
at
org.apache.myfaces.taglib.core.ViewTag.doAfterBody(ViewTag.java:160)
at
org.apache.jsp.protected_.manageProductsRedirector_jsp._jspx_meth_f_view
_0(manageProductsRedirector_jsp.java:178)
at
org.apache.jsp.protected_.manageProductsRedirector_jsp._jspService(manag
eProductsRedirector_jsp.java:91)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:324)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:237)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:157)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatc
her.java:704)
at
org.apache.catalina.core.ApplicationDispatcher.processRequest(Applicatio
nDispatcher.java:474)
at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDisp
atcher.java:409)
at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispat
cher.java:312)
at
org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(S
ervletExternalContextImpl.java:416)
at
org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspView
HandlerImpl.java:234)
at
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:372
)
at
javax.faces.webapp.FacesServlet.service(FacesServlet.java:107)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:237)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:157)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatc
her.java:704)
at
org.apache.catalina.core.ApplicationDispatcher.processRequest(Applicatio
nDispatcher.java:474)
at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDisp
atcher.java:409)
at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispat
cher.java:312)
at
org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(S
ervletExternalContextImpl.java:416)
at
org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspView
HandlerImpl.java:234)
at
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:372
)
at
javax.faces.webapp.FacesServlet.service(FacesServlet.java:107)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:237)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:157)
at
com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.
java:118)
at
com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.j
ava:52)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:186)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:157)
at
org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(Extensi
onsFilter.java:123)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:186)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:157)
at
eu.cec.trade.sigl2.filters.GacaAuthenticationFilter.doFilter(GacaAuthent
icationFilter.java:97)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:186)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:157)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:214)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
ntext.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
20)
at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCon
textValve.java:198)
at
org.apache.catalina.core

Re: Can't parse configuration file

2005-12-05 Thread Juan Medín Piñeiro
Unfortunately putting the file in the WEB-INF dir doesn't work for me
(other people have the same problem:
http://forum.java.sun.com/thread.jspa?threadID=676326).

Isn't writing your own EntityResolver a bit too much for this problem?

Regards,

- Juan

On 11/29/05, Mike Kienenberger <[EMAIL PROTECTED]> wrote:
> What works for me is to add the dtd files to the WEB-INF directory,
> and the xml parser searches there before trying the URL.
> I think the solution to this problem depends on your xml parser, though.
> I've also seen others suggest writing your own EntityResolver.


Re: Serialization problem with nightly builds

2005-12-05 Thread Dennis Byrne
Can you please post the full stack trace?

 Original message 
>Date: Mon, 5 Dec 2005 09:46:31 +0100
>From: "Lefevre, Daniel" <[EMAIL PROTECTED]>  
>Subject: Serialization problem with nightly builds  
>To: 
>
>   Hello,
>
>   sorry, but it does'nt seem to solve the problem.
>   I tried the new setting by adding the following in
>   the web.xml:
>
>
> org.apache.myfaces.SERIALIZE_STATE_IN_SESSION
> false
>
>
>   but it does not change anything.
>
>   I also tried client side state saving, but I still
>   got the problem.
>
>   Of course, I could initialize the concerned fields
>   in my backing bean, but I think I lose a JSF feature
>   then!
>
>   Bye, Dan
>
>

Dennis Byrne


Re: best approach for SelectItems inside a datatables

2005-12-05 Thread Mario Ivankovits

Hi!

rowStyleClass="row#{(idx%2==0)?'0':'1'}"

rowStyleClass="row0,row1"  should do the trick too

But this approach has a big disadvantage : the method 'selectItemList' 
is called in every rendered row  even though the list themself isn't 
change.
So why dont you cache the list in your bean? Or even better do not 
create the list in your getter method.
AFAIK you should never do time consuming tasks in your getter as you 
dont know if one of the components call the method multiple times.


I know there is no init method which will be called to setup your bean, 
but there are solutions for this.


1) Use Shale
2) workaround using dependency injection. eg in your faces-config 
configure a managed-property which calls a method "init"- I've seen this 
mutliple times, though I dont like it.


Personally, as long as JSF doesnt provide such a function, I'll stick 
with Shale. Or later burden this on JBoss Seam.


---
Mario



Serialization problem with nightly builds

2005-12-05 Thread Lefevre, Daniel



Hello,
 
sorry, but it 
does'nt seem to solve the problem.
I tried the new 
setting by adding the following in the web.xml:
 
   org.apache.myfaces.SERIALIZE_STATE_IN_SESSION  false 
 
but it does not 
change anything.
 
I also tried client 
side state saving, but I still got the problem.
 
Of course, I could 
initialize the concerned fields in my backing bean, but I think I lose a JSF 
feature then!
 
Bye, Dan

 
 


best approach for SelectItems inside a datatables

2005-12-05 Thread R. Müller

hi group,

it is common usecase for web-application to be able to select items 
(rows) of datatable and choosing desired action from a choice.


to solve this issue, i personally using often the following construct :
(the 'adapter' backing bean serves all necessary data)





   

 
  

   
  


	valueChangeListener="#{adapter.processValueChange}"

id="rowSelector" forceId="true" forceIdIndex="false"
layout="spread" value="select">






[...]

But this approach has a big disadvantage : the method 'selectItemList' 
is called in every rendered row  even though the list themself isn't 
change. So if method has to build up a list-object, it takes long time 
to render especially large table.


By the way, there is another thing i want to mentioned here : the 
SelectItem-class, which you have to use, when using 
selection-components. IMHO this has to be a interface, since we are all 
aware of the multiple inheritance issue with java.
Its often the case that the objects, you going display inside the table 
already have their inheritance tree. And it is difficult and timewasting 
to implement method for just serving SelectItem-lists.

Particularly there is 'nothing' to do to implement this interface.

so far, comments appreciate, thank you in advance

ronald