Re: dynamic c:import

2007-05-03 Thread Simon Kitching

[EMAIL PROTECTED] wrote:

[EMAIL PROTECTED] wrote:

In some cases, I want to dynamically import fragment of page. Such as:


I used  to test
masterBean.action returns correct value, for instance, main.jsp.

But it seem it could not be imported in this way, I was told:
The requested resource (/myproject-name/#{masterBean.action}) is not
available.

Could anyone give me any clue how to deal with this? Or an alternate
solution.

When using jsp1.1:
* the #{..} syntax is only processed within an attribute of a JSF tag.
* the ${..} syntax is not permitted within an attribute of a JSF tag

You can probably change to using:
  
The only difference is that the masterBean object must already exist, as
the JSP ${...} stuff won't create a bean from the JSF "managed beans"
definitions in the faces config file. As long as there is a reference to
#{masterBean} somewhere earlier in the same page the bean will exist so
that should be ok.

Note by the way that JSTL tags generally don't work well with JSF1.1. In
particular, c:forEach and c:if are a bad idea. However I *think*
c:import would be ok as it doesn't have any conditional behaviour.


Thank you very much, Simon,

I found another solution on BalusC's
http://balusc.xs4all.nl/srv/dev-jep-djs.html . It works good.

I also tried to replace # with $. But didn't get luck.



That article appears flawed to me. It depends on calling
   new MyBean();
rather than creating it via the managed bean mechanism.

This means that
(a) it's never placed into any scope so other references using #{..} or 
${..} syntax will end up returning a *different* instance.
(b) the instance doesn't get any of the injected values defined in the 
managed bean declaration in the faces config file.
(c) the page needs to know what the concrete type of name masterBean is. 
That's not fatal, but is not very clean - that info is then present in 
two totally different locations; the jsp page and the faces config file.


I think using
  
is much nicer. If it's not working for you then I presume that the 
masterBean object has not yet been created. That can probably be fixed 
by putting this before the c:import tag:


  

This is forcing a lookup of the masterBean object, which will force it 
to be created if it doesn't exist (and inserted into the appropriate 
scope where the JSP expression can then find it). Unfortunately there is 
no tag (AFAIK) that can cause a read of a property without generating 
*some* output, but outputting some text marked as display:none is 
effectively the same.


Regards,

Simon


Re: dynamic c:import

2007-05-03 Thread chenli
> [EMAIL PROTECTED] wrote:
>> In some cases, I want to dynamically import fragment of page. Such as:
>> 
>>
>> I used  to test
>> masterBean.action returns correct value, for instance, main.jsp.
>>
>> But it seem it could not be imported in this way, I was told:
>> The requested resource (/myproject-name/#{masterBean.action}) is not
>> available.
>>
>> Could anyone give me any clue how to deal with this? Or an alternate
>> solution.
>
> When using jsp1.1:
> * the #{..} syntax is only processed within an attribute of a JSF tag.
> * the ${..} syntax is not permitted within an attribute of a JSF tag
>
> You can probably change to using:
>   
> The only difference is that the masterBean object must already exist, as
> the JSP ${...} stuff won't create a bean from the JSF "managed beans"
> definitions in the faces config file. As long as there is a reference to
> #{masterBean} somewhere earlier in the same page the bean will exist so
> that should be ok.
>
> Note by the way that JSTL tags generally don't work well with JSF1.1. In
> particular, c:forEach and c:if are a bad idea. However I *think*
> c:import would be ok as it doesn't have any conditional behaviour.

Thank you very much, Simon,

I found another solution on BalusC's
http://balusc.xs4all.nl/srv/dev-jep-djs.html . It works good.

I also tried to replace # with $. But didn't get luck.



Re: Problem with duplicated client-ids

2007-05-03 Thread Simon Kitching

Sertic Mirko, Bedag wrote:

Hi there

I am having problems with the following exception :

Caused by:_ org.apache.jasper.JasperException_: Client-id : _id9 is 
duplicated in the faces tree. Component : _idJsp3:_id9, path: 
{Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: 
/createevn.jsp][Class: oracle.adf.view.faces.component.html.HtmlHtml,Id: 
_idJsp0][Class: oracle.adf.view.faces.component.html.HtmlBody,Id: 
_idJsp2][Class: javax.faces.component.html.HtmlForm,Id: _idJsp3][Class: 
ch.bedag.common.web.component.cdbund.CDBundPageComponent,Id: 
_idJsp4][Class: 
ch.bedag.common.web.component.layout.GridbagLayoutComponent,Id: 
_idJsp26][Class: 
ch.bedag.common.web.component.layout.GridbagLayoutCellComponent,Id: 
_idJsp58][Class: 
ch.bedag.common.web.component.layout.TitledBoxComponent,Id: 
_idJsp59][Class: 
ch.bedag.common.web.component.layout.GridbagLayoutComponent,Id: 
_idJsp60][Class: 
ch.bedag.common.web.component.layout.GridbagLayoutCellComponent,Id: 
_idJsp62][Class: 
ch.bedag.common.web.component.input.InputfieldComponent,Id: 
_idJsp63][Class: javax.faces.component.UICommand,Id: _id9]}


This happens when i navigate to the page, navigate to another page and 
finally when i come back to the origin, the above


exception is generated. The question is now : why is there a duplicate 
id? I thought that the whole component tree would 
be rebuild when a new page is accessed. It is a custom component, but it 
worked very well in prior projects. The only
Difference is here that is use a binding for the component to access it 
from a backing bean. Am i missing something?


Is your binding stored in a bean that is session-scoped, ie still exists 
when you come to re-render the page?


When using JSF1.1+JSP, the first render goes like this:

For each JSF tag in the page, if the tag has a binding attribute then:
 * Read from the specified property.
 * If that returns non-null then attach the returned component to the 
view tree and at skip any further processing of that JSF tag.


If no binding exists, or binding returns null then create a new 
component instance, set properties from tag. If no explicit id is 
defined on the tag then create a dynamic one.


So yes binding can be related to this "duplicate id" problem. However it 
normally doesn't cause any problem because the id computed the first 
time it was created should be the same as on the next time. Do you 
perhaps have a  or  tag in the page so that on 
different renders there are different numbers of components actually 
created for the page? That would definitely cause problems when combined 
with bindings...


I would suggest firstly to avoid using c:if or c:forEach if you are 
currently doing so. These tags interact very badly with JSF1.1.


Secondly, having session-scoped beans with bindings that are still valid 
when a page is re-rendered after being somewhere else is not very nice. 
This is very memory-inefficient for a start; because each component has 
references to its parent and children this effectively holds the entire 
component tree for that view in memory for the length of the http 
session. You might want to look into using t:saveState + request-scoped 
backing beans instead.


Regards,

Simon


Re: dynamic c:import

2007-05-03 Thread Andrew Robinson

In case you are using facelets or ajax4jsf or could consider using them:

If you are using facelets, use ui:import
If you are using ajax4jsf, use a4j:import

-Andrew

On 5/3/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

In some cases, I want to dynamically import fragment of page. Such as:


I used  to test
masterBean.action returns correct value, for instance, main.jsp.

But it seem it could not be imported in this way, I was told:
The requested resource (/myproject-name/#{masterBean.action}) is not
available.

Could anyone give me any clue how to deal with this? Or an alternate
solution.

Appreciate.




Re: dynamic c:import

2007-05-03 Thread Simon Kitching

[EMAIL PROTECTED] wrote:

In some cases, I want to dynamically import fragment of page. Such as:


I used  to test
masterBean.action returns correct value, for instance, main.jsp.

But it seem it could not be imported in this way, I was told:
The requested resource (/myproject-name/#{masterBean.action}) is not
available.

Could anyone give me any clue how to deal with this? Or an alternate
solution.


When using jsp1.1:
* the #{..} syntax is only processed within an attribute of a JSF tag.
* the ${..} syntax is not permitted within an attribute of a JSF tag

You can probably change to using:
 
The only difference is that the masterBean object must already exist, as 
the JSP ${...} stuff won't create a bean from the JSF "managed beans" 
definitions in the faces config file. As long as there is a reference to 
#{masterBean} somewhere earlier in the same page the bean will exist so 
that should be ok.


Note by the way that JSTL tags generally don't work well with JSF1.1. In 
particular, c:forEach and c:if are a bad idea. However I *think* 
c:import would be ok as it doesn't have any conditional behaviour.


Regards,

Simon


Re: double click issue in Firefox...

2007-05-03 Thread Adrian Mitev

To prevent the double submit you could use a server side solution like the
token synchronizer pattern implemented as a shale component called s:token
from shale-core lib that you can get from here [1] or to implement it
yourself [2]

[1] http://shale.apache.org/
[2] http://jroller.com/page/mert?entry=jsf_preventing_double_form_submit

2007/5/3, Jorge Vásquez <[EMAIL PROTECTED]>:


 Regards to all,

During some testing I found that some unpredictable errors occur with
Firefox whenever a user clicks twice rapidly either on a commandLink or on a
commandButton.  What happens is that the respective method modifies some
internal state the first time but then when it gets executed again it founds
inconsistencies that cause an exception to be thrown.  Adding exception
controls to each method for this very specific scenario would result
terribly cumbersome, so I am writing to see if somebody out there has had a
similar problem and how have you managed to solve it.  I played the other
day for a while with JavaScript events but unfortunately those double click
events are uncontrollable when there's also the presence of onclick events,
since most of the time double clicks are also interpreted as simple clicks
and that turns out to be a huge chaos.

I also tested this behaviour in IE7 (for which I must say that at last
Microsoft launched a descent browser) and there's no problem.  Apparently
this browser blocks double clicks.

Thanks in advance to anybody that could give me some advice…

JV





double click issue in Firefox...

2007-05-03 Thread Jorge Vásquez
Regards to all,

During some testing I found that some unpredictable errors occur with
Firefox whenever a user clicks twice rapidly either on a commandLink or on a
commandButton.  What happens is that the respective method modifies some
internal state the first time but then when it gets executed again it founds
inconsistencies that cause an exception to be thrown.  Adding exception
controls to each method for this very specific scenario would result
terribly cumbersome, so I am writing to see if somebody out there has had a
similar problem and how have you managed to solve it.  I played the other
day for a while with JavaScript events but unfortunately those double click
events are uncontrollable when there’s also the presence of onclick events,
since most of the time double clicks are also interpreted as simple clicks
and that turns out to be a huge chaos.  

I also tested this behaviour in IE7 (for which I must say that at last
Microsoft launched a descent browser) and there’s no problem.  Apparently
this browser blocks double clicks.

Thanks in advance to anybody that could give me some advice…

JV

 



Re: JSCookMenu and passing value to manged-bean

2007-05-03 Thread syllepsa


Adrian Mitev-2 wrote:
> 
> In this form JSCookMenu can't do that. I've created a patch where you can
> invoke javascript code and invoke action method when the menu is clicked.
> In
> the javascript code i set the id of the selected item in a hidden field.
> See
> here [1] for more info.
> 
> [1] http://issues.apache.org/jira/browse/TOMAHAWK-965
> 
> 2007/4/30, syllepsa <[EMAIL PROTECTED]>:
>>
>>
>> Hi
>>
>> Is it possible to pass a value to a managed-bean after clicking menu item
>> of
>> the JSCookMenu? The problem is that I have to pass an id (related with
>> selected menu item) to a managed-bean . The id is necessary to retrieve
>> data
>> on the next page.
>>
>> I'm using MyFaces 1.1.4.
>>
>> Regards,
>>
>> Mariusz
>> --
>> View this message in context:
>> http://www.nabble.com/JSCookMenu-and-passing-value-to-manged-bean-tf3671115.html#a10258114
>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>>
>>
> 
> 

Hi,

Thanks for the reply. However, I used different solution which is presented
here:
http://forum.java.sun.com/thread.jspa?messageID=9646800
http://forum.java.sun.com/thread.jspa?messageID=9646800 

Regards,

Mariusz 
-- 
View this message in context: 
http://www.nabble.com/JSCookMenu-and-passing-value-to-manged-bean-tf3671115.html#a10312376
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Re: SEVERE: Exception ... class org.apache.myfaces.webapp.StartupServletContextListener

2007-05-03 Thread Erik Kron
Thanks for the response.

I have a listener entry like this one in the web.xml file:



org.apache.myfaces.webapp.StartupServletContextListener
 

 Below is a dump of the web.xml file ///


xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";
version="2.4">
NCC Copyright Notification


org.apache.myfaces.CHECK_EXTENSIONS_FILTER

true


javax.faces.CONFIG_FILES

/WEB-INF/faces-config.xml




javax.faces.STATE_SAVING_METHOD
client




org.apache.myfaces.ALLOW_JAVASCRIPT
true
   



org.apache.myfaces.PRETTY_HTML
true




org.apache.myfaces.DETECT_JAVASCRIPT
false



org.apache.myfaces.AUTO_SCROLL
true





MyFacesExtensionsFilter

org.apache.myfaces.webapp.filter.ExtensionsFilter

maxFileSize
20m






MyFacesExtensionsFilter

Faces Servlet




MyFacesExtensionsFilter
/faces/myFacesExtensionResource/*




org.apache.myfaces.webapp.StartupServletContextListener


Faces Servlet
javax.faces.webapp.FacesServlet
1



Faces Servlet
*.faces



index.jsp
index.faces





- Original Message 
From: "Nebinger, David" <[EMAIL PROTECTED]>
To: MyFaces Discussion 
Sent: Thursday, May 3, 2007 2:51:33 PM
Subject: RE: SEVERE: Exception ... class 
org.apache.myfaces.webapp.StartupServletContextListener

> I am getting the following error when I attempt to deploy my 
> application in tomcat 5.5.15
> 
> SEVERE: Exception sending context initialized event to 
> listener instance of class 
> org.apache.myfaces.webapp.StartupServletContextListener
> 
> I see the above error in /var/log/tomcat5/catalina.out

Do you have the listener defined in your web.xml file?




__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


[Trinidad] Dialog auto sizing problem/request

2007-05-03 Thread Bertrand, Shawn R
We use a fair amount of dialogs displayed via the dialog framework (i.e.
summoned through "dialog:" navigation rules and launchDialog API calls
alike), and a nice feature is the auto sizing that occurs once the DOM
is populated with all of the UI components.  The sizing is occurring,
but all of the dialogs seem to be just a tad smaller than what they
should be *in IE only* (FireFox is fine), which results in the display
of both horizontal and vertical scroll bars.  I'm wondering if there is
a common cause for this.

 

Also, is it possible to have the dialog resize after it is initially
resized?  I'm guessing this logic is built into some of the
Javascript/DOM manipulation and would hope to leverage it in response to
action events or the like, since PPR could (and in our case often)
introduce new UI and, as a result, scrollbars for the dialog.

 

Thanks,

 

Shawn Bertrand

Tyco Electronics

 

 

 

 



RE: SEVERE: Exception ... class org.apache.myfaces.webapp.StartupServletContextListener

2007-05-03 Thread Nebinger, David
> I am getting the following error when I attempt to deploy my 
> application in tomcat 5.5.15
> 
> SEVERE: Exception sending context initialized event to 
> listener instance of class 
> org.apache.myfaces.webapp.StartupServletContextListener
> 
> I see the above error in /var/log/tomcat5/catalina.out

Do you have the listener defined in your web.xml file?


Re: inputSuggestAjax - no backing-bean method called

2007-05-03 Thread Gary VanMatre
>Got it.
>
>Actually, my Renderer gots wrapped - the Wrapper itself however does not
>implement AjaxRenderer (renderere instanceof AjaxRenderer), so the Ajax
>Request is stopped silently - no warning or error message.
>

Ahh, good catch.  That wrapper renderer has to do with shales validator.
If it's wrapping a renderer, then the render supports the standard interface.
This was done long before tomahawk created the AjaxRenderer interface. 

We should only do this if the component uses the common validator but
we'll have to look into that.

>Would be nice, if some Log Message would be there which tell that.
>

I'm not sure how we would do that without locking into the specifics of
the tomahawk component library?  Shale validator doesn't want a compile
time dependency with tomahawk so we would have to look at using the
reflection API.  

What would we report on?



>Torsten

Gary--- Begin Message ---
Got it.

Actually, my Renderer gots wrapped - the Wrapper itself however does not
implement AjaxRenderer (renderere instanceof AjaxRenderer), so the Ajax
Request is stopped silently - no warning or error message.

Would be nice, if some Log Message would be there which tell that.

Torsten

Am Donnerstag, den 03.05.2007, 17:58 +0200 schrieb Torsten Krah:
> I've taken the sandbox example and use it 1:1 - but with a different
> view handler, shouldn't matter in theory.
> But i get no suggests, i can click the arrow or enter something, the
> method on my bean is never called, nothing happens - although a request
> is made (firebug), but is pending "forever".
> 
> Are there any JSP dependencies on this component - or what could cause
> this?
> Ajax in general does work, using Shales Remoting and Prototype library
> does work, so it might be the components fault, however i don't know
> where to look for, any hints?
> 
> Torsten


smime.p7s
Description: S/MIME cryptographic signature
--- End Message ---


Re: Navigation to and from an HTTPS URL

2007-05-03 Thread Andrew Robinson

Staying in HTTPS is required to ensure that the user who logged in is
the user accessing the HttpSession.

Downside to staying in HTTPS is that it is slower as both ends have to
handle encryption and decryption.

On 5/3/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

Andrew & Bill,

So is it common form to stay in HTTPS once the user estasblishes a
secure connection and authentication?  Because if this is the case, then
I don't have to really do anything special for navigation handling.  Are
there any downsides to continuing to use HTTPS?  I am not sure I could
gaurantee that the user (benign or malicious) wouldn't start from my
HTTPS login URL rather than from the HTTP main page URL.

Thanks again for your valuable input.



- Original Message -
From: Andrew Robinson <[EMAIL PROTECTED]>
Date: Thursday, May 3, 2007 10:22 am
Subject: Re: Navigation to and from an HTTPS URL
To: MyFaces Discussion 

> For the custom navigation handler, I don't have an example, but you
> could just setup some kind of pattern that you could parse via regex.
> Something like
>
> secure:/myview.xhtml
>
> Then in the navigation handler, see:
> private final static String SECURE = "secure:";
> ...
> if (viewId.startsWith(SECURE))
> {
>  viewId = viewId.substring(SECURE.length());
>  // see if the HttpServletRequest.isSecure() returns false
>  // if so then:
>  // get the faces external context
>  // build the full URL including "https"
>  // call external context.redirect
>  // call context.responseComplete();
> }
> else ...
>
> You have to use a redirect one way or another, so it being in a
> navigation handler just makes it available to all action responses.
>
> Also, make sure you remember once you redirect the user, they may lose
> their session, and they definitely will if you redirect from HTTPS to
> HTTP. Servlets use a in-memory cookie to store the session ID. Since
> it is a cookie, it falls under the W3C specification for cookie
> handling. So for example, if the cookie is marked as secure, it cannot
> be seen from HTTP.
>
> Make sure you are not planning on authenticating them under HTTPS, and
> then redirecting them to HTTP and trying to retain an insecure session
> ID. If so, impersonation attacks would be a piece of cake against your
> code.
>
>
> On 5/3/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > Andrew,
> >
> > Thanks for the tips.  I think that method (1) can work for me in
> some> situations, but not in general.  Would you happen to know or
> have any
> > examples for the method (2) [custom navigation handler]?  I
> appreciate> your help *very* much!
> >
> >
> > - Original Message -
> > From: Andrew Robinson <[EMAIL PROTECTED]>
> > Date: Wednesday, May 2, 2007 3:50 pm
> > Subject: Re: Navigation to and from an HTTPS URL
> > To: MyFaces Discussion 
> >
> > > Two methods:
> > >
> > > 1) In your action or actionListener use the external context to
> > > send a
> > > redirect or
> > > 2) Use a custom navigation handler that builds a URL then changes
> > > the protocol
> > >
> > > On 5/2/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > > > Does anyone have any tips how you can implement navigating to
> and> > from> an HTTPS URL from a commandLink or commandButton?
> > > >
> > >
> >
>



Re: Navigation to and from an HTTPS URL

2007-05-03 Thread SOSELLA
Andrew & Bill,

So is it common form to stay in HTTPS once the user estasblishes a
secure connection and authentication?  Because if this is the case, then
I don't have to really do anything special for navigation handling.  Are
there any downsides to continuing to use HTTPS?  I am not sure I could
gaurantee that the user (benign or malicious) wouldn't start from my
HTTPS login URL rather than from the HTTP main page URL.

Thanks again for your valuable input.



- Original Message -
From: Andrew Robinson <[EMAIL PROTECTED]>
Date: Thursday, May 3, 2007 10:22 am
Subject: Re: Navigation to and from an HTTPS URL
To: MyFaces Discussion 

> For the custom navigation handler, I don't have an example, but you
> could just setup some kind of pattern that you could parse via regex.
> Something like
> 
> secure:/myview.xhtml
> 
> Then in the navigation handler, see:
> private final static String SECURE = "secure:";
> ...
> if (viewId.startsWith(SECURE))
> {
>  viewId = viewId.substring(SECURE.length());
>  // see if the HttpServletRequest.isSecure() returns false
>  // if so then:
>  // get the faces external context
>  // build the full URL including "https"
>  // call external context.redirect
>  // call context.responseComplete();
> }
> else ...
> 
> You have to use a redirect one way or another, so it being in a
> navigation handler just makes it available to all action responses.
> 
> Also, make sure you remember once you redirect the user, they may lose
> their session, and they definitely will if you redirect from HTTPS to
> HTTP. Servlets use a in-memory cookie to store the session ID. Since
> it is a cookie, it falls under the W3C specification for cookie
> handling. So for example, if the cookie is marked as secure, it cannot
> be seen from HTTP.
> 
> Make sure you are not planning on authenticating them under HTTPS, and
> then redirecting them to HTTP and trying to retain an insecure session
> ID. If so, impersonation attacks would be a piece of cake against your
> code.
> 
> 
> On 5/3/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > Andrew,
> >
> > Thanks for the tips.  I think that method (1) can work for me in 
> some> situations, but not in general.  Would you happen to know or 
> have any
> > examples for the method (2) [custom navigation handler]?  I 
> appreciate> your help *very* much!
> >
> >
> > - Original Message -
> > From: Andrew Robinson <[EMAIL PROTECTED]>
> > Date: Wednesday, May 2, 2007 3:50 pm
> > Subject: Re: Navigation to and from an HTTPS URL
> > To: MyFaces Discussion 
> >
> > > Two methods:
> > >
> > > 1) In your action or actionListener use the external context to
> > > send a
> > > redirect or
> > > 2) Use a custom navigation handler that builds a URL then changes
> > > the protocol
> > >
> > > On 5/2/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > > > Does anyone have any tips how you can implement navigating to 
> and> > from> an HTTPS URL from a commandLink or commandButton?
> > > >
> > >
> >
> 


Re: inputSuggestAjax - no backing-bean method called

2007-05-03 Thread Torsten Krah
Got it.

Actually, my Renderer gots wrapped - the Wrapper itself however does not
implement AjaxRenderer (renderere instanceof AjaxRenderer), so the Ajax
Request is stopped silently - no warning or error message.

Would be nice, if some Log Message would be there which tell that.

Torsten

Am Donnerstag, den 03.05.2007, 17:58 +0200 schrieb Torsten Krah:
> I've taken the sandbox example and use it 1:1 - but with a different
> view handler, shouldn't matter in theory.
> But i get no suggests, i can click the arrow or enter something, the
> method on my bean is never called, nothing happens - although a request
> is made (firebug), but is pending "forever".
> 
> Are there any JSP dependencies on this component - or what could cause
> this?
> Ajax in general does work, using Shales Remoting and Prototype library
> does work, so it might be the components fault, however i don't know
> where to look for, any hints?
> 
> Torsten


smime.p7s
Description: S/MIME cryptographic signature


Re: Navigation to and from an HTTPS URL

2007-05-03 Thread William Keicher

Hi Andrew,

Another approach is to use a PhaseListener to cause the redirects.  See the
following link for an example:
http://fr.sys-con.com/read/250254_2.htm

As for losing your session when transitioning from https to http, that helps
prevent session hijacking of a secure session.  Depending on your use case,
you could first establish the session over an http request.  Then it should
be maintained across subsequent jumps between http and https.

Bill


On 5/3/07, Andrew Robinson <[EMAIL PROTECTED]> wrote:


For the custom navigation handler, I don't have an example, but you
could just setup some kind of pattern that you could parse via regex.
Something like

secure:/myview.xhtml

Then in the navigation handler, see:
private final static String SECURE = "secure:";
...
if (viewId.startsWith(SECURE))
{
  viewId = viewId.substring(SECURE.length());
  // see if the HttpServletRequest.isSecure() returns false
  // if so then:
  // get the faces external context
  // build the full URL including "https"
  // call external context.redirect
  // call context.responseComplete();
}
else ...

You have to use a redirect one way or another, so it being in a
navigation handler just makes it available to all action responses.

Also, make sure you remember once you redirect the user, they may lose
their session, and they definitely will if you redirect from HTTPS to
HTTP. Servlets use a in-memory cookie to store the session ID. Since
it is a cookie, it falls under the W3C specification for cookie
handling. So for example, if the cookie is marked as secure, it cannot
be seen from HTTP.

Make sure you are not planning on authenticating them under HTTPS, and
then redirecting them to HTTP and trying to retain an insecure session
ID. If so, impersonation attacks would be a piece of cake against your
code.


On 5/3/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Andrew,
>
> Thanks for the tips.  I think that method (1) can work for me in some
> situations, but not in general.  Would you happen to know or have any
> examples for the method (2) [custom navigation handler]?  I appreciate
> your help *very* much!
>
>
> - Original Message -
> From: Andrew Robinson <[EMAIL PROTECTED]>
> Date: Wednesday, May 2, 2007 3:50 pm
> Subject: Re: Navigation to and from an HTTPS URL
> To: MyFaces Discussion 
>
> > Two methods:
> >
> > 1) In your action or actionListener use the external context to
> > send a
> > redirect or
> > 2) Use a custom navigation handler that builds a URL then changes
> > the protocol
> >
> > On 5/2/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > > Does anyone have any tips how you can implement navigating to and
> > from> an HTTPS URL from a commandLink or commandButton?
> > >
> >
>



how to get the active tab

2007-05-03 Thread Dave
Hi,
   
   inside a form,  client-side switch, when user submit the 
form, how to determine which tab is active?  
   
  Thanks. 
  Dave

   
-
Ahhh...imagining that irresistible "new car" smell?
 Check outnew cars at Yahoo! Autos.

dynamic c:import

2007-05-03 Thread chenli
In some cases, I want to dynamically import fragment of page. Such as:


I used  to test
masterBean.action returns correct value, for instance, main.jsp.

But it seem it could not be imported in this way, I was told:
The requested resource (/myproject-name/#{masterBean.action}) is not
available.

Could anyone give me any clue how to deal with this? Or an alternate
solution.

Appreciate.



Session and javax.faces.request.charset

2007-05-03 Thread Dfr

Hello,

It is 3 questions.
1. As i understood afer reading t:saveState guide JSF dont sessions at 
all to operate correctly.
Being curious i checked out my current app - all backing beans are in 
"request" scope, i also cleaned all cookies out from browser, but any 
JSF page still sending Set-Cookie header and holds session.

2. Also that strange that session contain single attribute:
"javax.faces.request.charset"
What even stranger is its value: ISO-8859-5, while  i set UTF-8 in every 
possible place in my pages.

So the question is: how gracefully change its value to UTF-8
(because charset sometimes broke while form submit) and why it lives in 
session but not in application scope.
3. somtimes while form submit and if validation errors occur, inputs 
fields charset get broken, it happen not every time, maybe 1 of 20 submits.




inputSuggestAjax - no backing-bean method called

2007-05-03 Thread Torsten Krah
I've taken the sandbox example and use it 1:1 - but with a different
view handler, shouldn't matter in theory.
But i get no suggests, i can click the arrow or enter something, the
method on my bean is never called, nothing happens - although a request
is made (firebug), but is pending "forever".

Are there any JSP dependencies on this component - or what could cause
this?
Ajax in general does work, using Shales Remoting and Prototype library
does work, so it might be the components fault, however i don't know
where to look for, any hints?

Torsten


smime.p7s
Description: S/MIME cryptographic signature


Re: Navigation to and from an HTTPS URL

2007-05-03 Thread Andrew Robinson

For the custom navigation handler, I don't have an example, but you
could just setup some kind of pattern that you could parse via regex.
Something like

secure:/myview.xhtml

Then in the navigation handler, see:
private final static String SECURE = "secure:";
...
if (viewId.startsWith(SECURE))
{
 viewId = viewId.substring(SECURE.length());
 // see if the HttpServletRequest.isSecure() returns false
 // if so then:
 // get the faces external context
 // build the full URL including "https"
 // call external context.redirect
 // call context.responseComplete();
}
else ...

You have to use a redirect one way or another, so it being in a
navigation handler just makes it available to all action responses.

Also, make sure you remember once you redirect the user, they may lose
their session, and they definitely will if you redirect from HTTPS to
HTTP. Servlets use a in-memory cookie to store the session ID. Since
it is a cookie, it falls under the W3C specification for cookie
handling. So for example, if the cookie is marked as secure, it cannot
be seen from HTTP.

Make sure you are not planning on authenticating them under HTTPS, and
then redirecting them to HTTP and trying to retain an insecure session
ID. If so, impersonation attacks would be a piece of cake against your
code.


On 5/3/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

Andrew,

Thanks for the tips.  I think that method (1) can work for me in some
situations, but not in general.  Would you happen to know or have any
examples for the method (2) [custom navigation handler]?  I appreciate
your help *very* much!


- Original Message -
From: Andrew Robinson <[EMAIL PROTECTED]>
Date: Wednesday, May 2, 2007 3:50 pm
Subject: Re: Navigation to and from an HTTPS URL
To: MyFaces Discussion 

> Two methods:
>
> 1) In your action or actionListener use the external context to
> send a
> redirect or
> 2) Use a custom navigation handler that builds a URL then changes
> the protocol
>
> On 5/2/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > Does anyone have any tips how you can implement navigating to and
> from> an HTTPS URL from a commandLink or commandButton?
> >
>



SEVERE: Exception ... class org.apache.myfaces.webapp.StartupServletContextListener

2007-05-03 Thread Erik Kron
I am getting the following error when I attempt to deploy my application in 
tomcat 5.5.15

SEVERE: Exception sending context initialized event to listener instance of 
class org.apache.myfaces.webapp.StartupServletContextListener

I see the above error in /var/log/tomcat5/catalina.out

My environment:

fedora core 5
apache 2.2.2
tomcat 5.5.15

I have the following libraries in WEB-INF/lib

tomahawk-1.1.3.jar
commons-el-1.0.jar 
myfaces-api-1.1.4.jar 
myfaces-impl-1.1.4.jar 
beanaction.jar   
commons-fileupload-1.1.1.jar  
jstl-1.1.0.jar
commons-beanutils-1.7.0.jar  
commons-lang-2.1.jar  
commons-codec-1.3.jar
commons-logging-1.0.4.jar 
commons-collections-3.1.jar  
ibatis-common-2.jar   
mysql-connector-java-5.0.4-bin.jar
commons-digester-1.6.jar 
ibatis-dao-2.jar   
ibatis-sqlmap-2.jar

Any help on how to resolve this problem will be appreciated.

Regards,
Erik



__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


RE: JSF and JSTL

2007-05-03 Thread Thai Dang Vu
Why don't you use ?

-Original Message-
From: Peter Dahm [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 03, 2007 9:56 AM
To: users@myfaces.apache.org
Subject: JSF and JSTL

Hi,

I try to combine JSF and JSTL. 

In my case I just tried to show a grid if a condition is true.

Like this



... here goes a panel grid with 2 columns 


If I do this and the condition is true the panel grid does not display
the
result in 2 columns. The complete content is shown in one col.

Is it just a problem with grid's or isn't recommended to mix both
taglib's.


Thanks

Peter





NOTICE: This message (including any attachments) from Momentum Systems, Inc. 
contains information that is PRIVILEGED and CONFIDENTIAL.  If you are not an 
intended recipient, you are hereby notified that any dissemination of this 
message is strictly prohibited.  If you have received this message in error, 
please do not read, copy or forward this message.  Please permanently delete 
all copies and any attachments and notify the sender immediately by reply email 
or by calling our Office at 703.740.9300.


JSF and JSTL

2007-05-03 Thread Peter Dahm
Hi,

I try to combine JSF and JSTL. 

In my case I just tried to show a grid if a condition is true.

Like this



... here goes a panel grid with 2 columns 


If I do this and the condition is true the panel grid does not display the
result in 2 columns. The complete content is shown in one col.

Is it just a problem with grid's or isn't recommended to mix both taglib's.


Thanks

Peter




Re: Navigation to and from an HTTPS URL

2007-05-03 Thread SOSELLA
Andrew,

Thanks for the tips.  I think that method (1) can work for me in some
situations, but not in general.  Would you happen to know or have any
examples for the method (2) [custom navigation handler]?  I appreciate
your help *very* much!


- Original Message -
From: Andrew Robinson <[EMAIL PROTECTED]>
Date: Wednesday, May 2, 2007 3:50 pm
Subject: Re: Navigation to and from an HTTPS URL
To: MyFaces Discussion 

> Two methods:
> 
> 1) In your action or actionListener use the external context to 
> send a
> redirect or
> 2) Use a custom navigation handler that builds a URL then changes 
> the protocol
> 
> On 5/2/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > Does anyone have any tips how you can implement navigating to and 
> from> an HTTPS URL from a commandLink or commandButton?
> >
> 


Problem with duplicated client-ids

2007-05-03 Thread Sertic Mirko, Bedag
Hi there

I am having problems with the following exception :

Caused by: org.apache.jasper.JasperException: Client-id : _id9 is
duplicated in the faces tree. Component : _idJsp3:_id9, path:
{Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId:
/createevn.jsp][Class: oracle.adf.view.faces.component.html.HtmlHtml,Id:
_idJsp0][Class: oracle.adf.view.faces.component.html.HtmlBody,Id:
_idJsp2][Class: javax.faces.component.html.HtmlForm,Id: _idJsp3][Class:
ch.bedag.common.web.component.cdbund.CDBundPageComponent,Id:
_idJsp4][Class:
ch.bedag.common.web.component.layout.GridbagLayoutComponent,Id:
_idJsp26][Class:
ch.bedag.common.web.component.layout.GridbagLayoutCellComponent,Id:
_idJsp58][Class:
ch.bedag.common.web.component.layout.TitledBoxComponent,Id:
_idJsp59][Class:
ch.bedag.common.web.component.layout.GridbagLayoutComponent,Id:
_idJsp60][Class:
ch.bedag.common.web.component.layout.GridbagLayoutCellComponent,Id:
_idJsp62][Class:
ch.bedag.common.web.component.input.InputfieldComponent,Id:
_idJsp63][Class: javax.faces.component.UICommand,Id: _id9]}

This happens when i navigate to the page, navigate to another page and
finally when i come back to the origin, the above
exception is generated. The question is now : why is there a duplicate
id? I thought that the whole component tree would
be rebuild when a new page is accessed. It is a custom component, but it
worked very well in prior projects. The only
Difference is here that is use a binding for the component to access it
from a backing bean. Am i missing something?

Thanks a lot for your help

Mirko





Re: [Tobago] Problem with immediate="true"

2007-05-03 Thread Udo Schnurpfeil

Hello Helmut,

immediate means, that the values will not validated and will not update 
the model.

But the submitted values are still in the component.

To fix your problem your reset() should return the correct outcome != 
null. In this case you will get a brand new UI-component-tree.


Hope that helps

Udo

Helmut Swaczinna schrieb:

Hi,

I have a page with a reset button with immediate="true" to reset the 
input fields of the page to standard values without submitting and 
validating entered values. But this doesn't work. The fields remains 
unschanchend.


Here's a simple example:

test.jsp


   
 


Controller.java

private Integer value;

public String reset() {
   LOG.debug("reset");
   value = null;
   return null;
 }

 public Integer getValue() {
   LOG.debug("getValue: " + value);
   return value;
 }

 public void setValue(Integer value) {
   this.value = value;
 }

When you click the reset button the reset action is called but not the 
getValue method. I think this is a bug.

I'm using Tobago 1.0.11.

Regards
Helmut










[Tobago] Problem with immediate="true"

2007-05-03 Thread Helmut Swaczinna

Hi,

I have a page with a reset button with immediate="true" to reset the input 
fields of the page to standard values without submitting and validating 
entered values. But this doesn't work. The fields remains unschanchend.


Here's a simple example:

test.jsp


   
 


Controller.java

private Integer value;

public String reset() {
   LOG.debug("reset");
   value = null;
   return null;
 }

 public Integer getValue() {
   LOG.debug("getValue: " + value);
   return value;
 }

 public void setValue(Integer value) {
   this.value = value;
 }

When you click the reset button the reset action is called but not the 
getValue method. I think this is a bug.

I'm using Tobago 1.0.11.

Regards
Helmut







[Trinidad] PPR detection algorithm - Opera 8.5 on Nokia N800

2007-05-03 Thread Safurudin Mahic
Hi,

I am using trunk builds of Trinidad, it seems as the framework isn't
capable of detecting the Opera browser (mobile edition, 8.5) on the 
Nokia N800 device as capable of doing PPR, page refreshs that were
supposed to be PPR are actually full page refreshs.

The framework is able to detect a regular desktop Opera 8.5 browser 
as PPR-capable.

I believe it should be able to detect the Opera mobile as 
PPR-capable also, because both the mobile and the desktop browsers 
support the XmlHttpRequest JS object model, and I've found the N800 device 
to be working on several AJAX-enabled sites.


Hope someone  could  provide an answer, or even better, a possible
workaround for correct detection.


Best regards,
Safurudin Mahic



[Trinidad] Trinidad + Tomahawk (schedule component) + Facelets: Rendering problem ???

2007-05-03 Thread Frederic . Visticot
I'm using :
Trinidad 1.0.0-incubating
Facelets 1.1.6
Tomahawk 1.1.5
MyFaces 1.1.5

I want to display the schedule component from Tomahawk.

If i don't use facelets, the schedule is displayed correctly.

When i add facelets support, the schedule is partialy rendered (it seems 
no css is read...). 
The column for month or days are displayed but no colors are rendered as 
without the facelets.. The mouse listener is not working as well.

Is it a bug ? it seems a .css include pb...

My web.xml seems correctly configured with:


http://www.w3.org/2001/XMLSchema-instance";;
 xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";;
 version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee";;>
  Empty web.xml file for Web Application
  
  
facelets.LIBRARIES
/WEB-INF/tomahawk.taglib.xml

  
 
org.apache.myfaces.trinidad.ALTERNATE_VIEW_HANDLER
com.sun.facelets.FaceletViewHandler
  
  
  
javax.faces.DEFAULT_SUFFIX
.xhtml
  
  
  
javax.faces.STATE_SAVING_METHOD
client

  
  
  
  
  
 
org.apache.myfaces.trinidad.USE_APPLICATION_VIEW_CACHE
false
  
  
  
 
org.apache.myfaces.trinidad.CHECK_FILE_MODIFICATION
true
  
  
  
 org.apache.myfaces.trinidad.CHANGE_PERSISTENCE
session
  
  
org.apache.myfaces.trinidad.resource.DEBUG
false
  
  
MyFacesExtensionsFilter
 
org.apache.myfaces.webapp.filter.ExtensionsFilter

  maxFileSize
  20m

  
  
  
MyFacesExtensionsFilter

Faces Servlet
  
  
  
MyFacesExtensionsFilter
/faces/myFacesExtensionResource/*
  
  
MyFacesExtensionsFilter
*.xhtml
  
  
trinidad
 
org.apache.myfaces.trinidad.webapp.TrinidadFilter
  
  
trinidad
faces
  
  
  
faces
javax.faces.webapp.FacesServlet
  
  
  
resources
 
org.apache.myfaces.trinidad.webapp.ResourceServlet
  
  
  
faces
/faces/*
  
  
resources
/adf/*
  
  
35
  
  
html
text/html
  
  
txt
text/plain
  


My tomahawk.taglib.xml contains

 
schedule

org.apache.myfaces.Schedule
org.apache.myfaces.Schedule
 trinidad10.ScheduleComponentHandler



and the ScheduleComponentHandler is:

package trinidad10;

import com.sun.facelets.FaceletContext;
import com.sun.facelets.tag.MetaRuleset;
import com.sun.facelets.tag.MethodRule;


import com.sun.facelets.tag.jsf.ComponentConfig;
import com.sun.facelets.tag.jsf.html.HtmlComponentHandler;

import javax.faces.component.UIComponent;

import org.apache.myfaces.custom.schedule.ScheduleMouseEvent;


public class ScheduleComponentHandler extends HtmlComponentHandler {
private static final String RENDER_ZERO_LENGTH_ENTRIES_ATTRIBUTE_NAME 
= 
"renderZeroLengthEntries";
private static final String MOUSE_LISTENER_METHOD_ATTRIBUTE_NAME = 
"mouseListener";
private static final String EXPAND_TO_FIT_ENTRIES_ATTRIBUTE_NAME = 
"expandToFitEntries";

public ScheduleComponentHandler(ComponentConfig tagConfig) {
super(tagConfig);
}

protected MetaRuleset createMetaRuleset(Class type) {
MetaRuleset m = super.createMetaRuleset(type);
m.addRule(new MethodRule(MOUSE_LISTENER_METHOD_ATTRIBUTE_NAME, 
null, 
 new Class[] { ScheduleMouseEvent.class 
}));
return m;
}

@Override
protected void onComponentCreated(FaceletContext context, 
  UIComponent component, 
  UIComponent parent) {
if (getAttribute(RENDER_ZERO_LENGTH_ENTRIES_ATTRIBUTE_NAME) != 
null) {
 component.getAttributes().put(RENDER_ZERO_LENGTH_ENTRIES_ATTRIBUTE_NAME, 
 
getAttribute(RENDER_ZERO_LENGTH_ENTRIES_ATTRIBUTE_NAME).getObject(context));
}
if (getAttribute(EXPAND_TO_FIT_ENTRIES_ATTRIBUTE_NAME) != null) {
 component.getAttributes().put(EXPAND_TO_FIT_ENTRIES_ATTRIBUTE_NAME, 
 getAttribute(EXPAND_TO_FIT_ENTRIES_ATTRIBUTE_NAME).getObject(context));
}
}
}

[Trinidad] with facelets not working: missing tag in tr.tag.xml ?

2007-05-03 Thread Frederic . Visticot
I'm using :
Trinidad 1.0.0-incubating
Facelets 1.1.6
MyFaces 1.1.5

1)When using facelets with the tr:componentRef, the following tag 
exception occurs:

com.sun.facelets.tag.TagException: /templates/page1.xhtml @30,103 
 Tag Library supports namespace: 
http://myfaces.apache.org/trinidad, but no tag was defined for name: 
componentRef

It seems that the tr.tag.xml from trinidad does not include the 
componentDef and componentRef tags description. Is it normal ?

2)In the Trinidad tag documenation  and  are 
discribed instead of< tr:componentRef> and . 
The tag documentation has to be updated.




[Trinidad]Trinidad + facelets tr:componentRef

2007-05-03 Thread Frederic . Visticot
I'm using Trinidad 1.0 + faceletes

Re: is there any marqueue like jsf component arounf?

2007-05-03 Thread Adrian Mitev

If you want i could send you the jar.

2007/5/3, Adrian Mitev <[EMAIL PROTECTED]>:


Looks like the jenia4faces site is down.

2007/5/3, Dave <[EMAIL PROTECTED]>:
>
> Hi,
> The link did not work.
>
> I am trying to put  tag around a JSF component like 
> using ,  and , none of them work.
>
> For example,
>
> 
> (JSF component)
> 
>
>
> 
> (JSF component)
> 
>
>
> " escape="false/>
>
> the generated HTML is
> (HTML for JSF component)
>
>  Thanks for help!
>
> *Christopher Cudennec <[EMAIL PROTECTED]>* wrote:
>
> Hi,
>
> you could also simply use a html "marquee"-tag. This is how the example
> from jenia4faces works anyway. See
> http://en.selfhtml.org/html/text/proprietaer.htm#marquee for an example
> (unfortunately only in German).
>
> Cheers,
>
> Christopher
>
>
> Adrian Mitev schrieb:
> > There is in jenia4faces: http://www.jenia.org/TestDynamic/
> >
> > 2007/1/5, legolas >:
> >
> >
> > Hi
> > thank you for reading my post
> > I ma looking for a marqueue like component in JSF, is there any
> > component
> > with this ability around?
> > indeed i am looking for a something like a new ticker component
> > that can
> > scroll some text.
> >
> > thanks
> > --
> > View this message in context:
> > 
http://www.nabble.com/is-there-any-marqueue-like-jsf-component-arounf--tf2925389.html#a8177571
>
> > Sent from the MyFaces - Users mailing list archive at Nabble.com
> > .
> >
> >
> >
> 
> >
> > No virus found in this incoming message.
> > Checked by AVG Free Edition.
> > Version: 7.5.432 / Virus Database: 268.16.5/616 - Release Date:
> 04.01.2007 13:34
> >
>
>
> --
> Ahhh...imagining that irresistible "new car" smell?
> Check out new cars at Yahoo! 
Autos.
>
>



Re: is there any marqueue like jsf component arounf?

2007-05-03 Thread Adrian Mitev

Looks like the jenia4faces site is down.

2007/5/3, Dave <[EMAIL PROTECTED]>:


Hi,
The link did not work.

I am trying to put  tag around a JSF component like 
using ,  and , none of them work.

For example,


(JSF component)




(JSF component)



" escape="false/>

the generated HTML is
(HTML for JSF component)

Thanks for help!

*Christopher Cudennec <[EMAIL PROTECTED]>* wrote:

Hi,

you could also simply use a html "marquee"-tag. This is how the example
from jenia4faces works anyway. See
http://en.selfhtml.org/html/text/proprietaer.htm#marquee for an example
(unfortunately only in German).

Cheers,

Christopher


Adrian Mitev schrieb:
> There is in jenia4faces: http://www.jenia.org/TestDynamic/
>
> 2007/1/5, legolas >:
>
>
> Hi
> thank you for reading my post
> I ma looking for a marqueue like component in JSF, is there any
> component
> with this ability around?
> indeed i am looking for a something like a new ticker component
> that can
> scroll some text.
>
> thanks
> --
> View this message in context:
>
http://www.nabble.com/is-there-any-marqueue-like-jsf-component-arounf--tf2925389.html#a8177571
> Sent from the MyFaces - Users mailing list archive at Nabble.com
> .
>
>
> 
>
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.432 / Virus Database: 268.16.5/616 - Release Date:
04.01.2007 13:34
>


--
Ahhh...imagining that irresistible "new car" smell?
Check out new cars at Yahoo! 
Autos.




Re: for commandButton

2007-05-03 Thread Matthias Wessendorf

that is a bug,

there is a issue:
https://issues.apache.org/jira/browse/TOMAHAWK-969

Ernst is working on it

-M


On 5/3/07, Dave <[EMAIL PROTECTED]> wrote:








In javascript,  call the button.click().
The form is submitted using normal submit, not ajax.

Thanks for help.
Dave

 
Ahhh...imagining that irresistible "new car" smell?
 Check out new cars at Yahoo! Autos.





--
Matthias Wessendorf
http://tinyurl.com/fmywh

further stuff:
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com


Re: panelGrid scroll as frames!

2007-05-03 Thread Angel Miralles Arevalo
Thanks a lot, that was the solution, use a t:div and apply style on it. It 
works!!


- Mensaje original 
De: Brummeline Braathen <[EMAIL PROTECTED]>
Para: users@myfaces.apache.org
Enviado: jueves, 3 de mayo, 2007 12:15:51
Asunto: Re: panelGrid scroll as frames!


Angel Miralles Arevalo  yahoo.es> writes:

> 
> 
> 
> Thanks for your help, I had tried your solution but it doesn't work!! I will
try with a iFrame but I don't know if it`s possible than the iframe will be
handler like an independient page...
>  
> Thanks...
> 
> - Mensaje original De: Brummeline Braathen 
gmail.com>Para: users  myfaces.apache.orgEnviado: jueves, 3 de mayo, 2007
11:31:11Asunto: Re: panelGrid scroll as frames!Angel Miralles Arevalo
 yahoo.es> writes:> > > > Hi everyone, is there any way of
applaying scroll to a panelGroup or aPanelGrid? I'm trying to make the same as
working with frames.>  > Thanks a lot.> > LLama Gratis a cualquier PC del
Mundo.Llamadas a fijos y móviles desde 1céntimo por
minuto.http://es.voice.yahoo.com> I dont know if this works, but you can try to
add the style attribute like this:
> 
> 
> 
> LLama Gratis a cualquier PC del Mundo.Llamadas a fijos y móviles desde 1
céntimo por minuto.http://es.voice.yahoo.com
> 

Scrolling on div tags works, so if you add a div around the panelgrid, that
could perhaps work.


   

LLama Gratis a cualquier PC del Mundo. 
Llamadas a fijos y móviles desde 1 céntimo por minuto. 
http://es.voice.yahoo.com

for commandButton

2007-05-03 Thread Dave
  
  
  
   
   
   
  In javascript,  call the button.click().
  The form is submitted using normal submit, not ajax.
   
  Thanks for help. 
  Dave

   
-
Ahhh...imagining that irresistible "new car" smell?
 Check outnew cars at Yahoo! Autos.

Re: panelGrid scroll as frames!

2007-05-03 Thread Brummeline Braathen
Angel Miralles Arevalo  yahoo.es> writes:

> 
> 
> 
> Thanks for your help, I had tried your solution but it doesn't work!! I will
try with a iFrame but I don't know if it`s possible than the iframe will be
handler like an independient page...
>  
> Thanks...
> 
> - Mensaje original De: Brummeline Braathen 
gmail.com>Para: users  myfaces.apache.orgEnviado: jueves, 3 de mayo, 2007
11:31:11Asunto: Re: panelGrid scroll as frames!Angel Miralles Arevalo
 yahoo.es> writes:> > > > Hi everyone, is there any way of
applaying scroll to a panelGroup or aPanelGrid? I'm trying to make the same as
working with frames.>  > Thanks a lot.> > LLama Gratis a cualquier PC del
Mundo.Llamadas a fijos y móviles desde 1céntimo por
minuto.http://es.voice.yahoo.com> I dont know if this works, but you can try to
add the style attribute like this:
> 
> 
> 
> LLama Gratis a cualquier PC del Mundo.Llamadas a fijos y móviles desde 1
céntimo por minuto.http://es.voice.yahoo.com
> 

Scrolling on div tags works, so if you add a div around the panelgrid, that
could perhaps work.




Re: panelGrid scroll as frames!

2007-05-03 Thread Angel Miralles Arevalo
Thanks for your help, I had tried your solution but it doesn't work!! I will 
try with a iFrame but I don't know if it`s possible than the iframe will be 
handler like an independient page...

Thanks...


- Mensaje original 
De: Brummeline Braathen <[EMAIL PROTECTED]>
Para: users@myfaces.apache.org
Enviado: jueves, 3 de mayo, 2007 11:31:11
Asunto: Re: panelGrid scroll as frames!


Angel Miralles Arevalo  yahoo.es> writes:

> 
> 
> 
> Hi everyone, is there any way of applaying scroll to a panelGroup or a
PanelGrid? I'm trying to make the same as working with frames.
>  
> Thanks a lot.
> 
> LLama Gratis a cualquier PC del Mundo.Llamadas a fijos y móviles desde 1
céntimo por minuto.http://es.voice.yahoo.com
> 


I dont know if this works, but you can try to add the 
style attribute like this:




   

LLama Gratis a cualquier PC del Mundo. 
Llamadas a fijos y móviles desde 1 céntimo por minuto. 
http://es.voice.yahoo.com

Re: is there any marqueue like jsf component arounf?

2007-05-03 Thread Dave
Hi,
  The link did not work.
   
  I am trying to put  tag around a JSF component like  
using ,  and , none of them work.
   
  For example,
   
  
  (JSF component)

   
   
  
  (JSF component)

   
   
  " escape="false/>
   
  the generated HTML is
  (HTML for JSF component)
   
  Thanks for help!
  
Christopher Cudennec <[EMAIL PROTECTED]> wrote:
  Hi,

you could also simply use a html "marquee"-tag. This is how the example 
from jenia4faces works anyway. See 
http://en.selfhtml.org/html/text/proprietaer.htm#marquee for an example 
(unfortunately only in German).

Cheers,

Christopher


Adrian Mitev schrieb:
> There is in jenia4faces: http://www.jenia.org/TestDynamic/
>
> 2007/1/5, legolas >:
>
>
> Hi
> thank you for reading my post
> I ma looking for a marqueue like component in JSF, is there any
> component
> with this ability around?
> indeed i am looking for a something like a new ticker component
> that can
> scroll some text.
>
> thanks
> --
> View this message in context:
> http://www.nabble.com/is-there-any-marqueue-like-jsf-component-arounf--tf2925389.html#a8177571
> Sent from the MyFaces - Users mailing list archive at Nabble.com
> .
>
>
> 
>
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.432 / Virus Database: 268.16.5/616 - Release Date: 04.01.2007 
> 13:34
> 



   
-
Ahhh...imagining that irresistible "new car" smell?
 Check outnew cars at Yahoo! Autos.

Re: Modifying XHTML through a filter

2007-05-03 Thread Rudi Steiner

Hi David,

thanks for the hint. I think for my case it is better to make the
modification manually because there is not much to do. But generally
it would be a big help to use a framework like htmltidy.

Best regards,
Rudi

On 5/2/07, David Delbecq <[EMAIL PROTECTED]> wrote:

Correct me if i am wrong, but ajax4jsf already has a filter that
corrects html responses to make them xhtml compliant (and then parseable
by xmlHttpRequest client side)

http://labs.jboss.com/file-access/default/members/jbossajax4jsf/freezone/docs/devguide/FAQ.html#FilterUsageDamagesAnApplicationLayout

En l'instant précis du 02/05/07 10:53, Rudi Steiner s'exprimait en ces
termes:
> Hi Jonathan,
>
> thank you for your answer. This is exactly the way to resolve the
> problem. A howto can be found here:
> 
http://www.javaworld.com/javaworld/jw-08-2003/jw-0829-designpatterns.html?page=2
>
>
> I know that modifying the generated markup this way is not recommended
> by software engineers ;) but I lost a lot of time on this topic and I
> think this is the fastest way. After this discussion:
> http://www.nabble.com/XHTML-Strict-tf3582852.html, i decided to do
> this.
>
> I'm not a developer, so I hope that someone is reading this mailings
> and take this discussion as an input for further improvements. I think
> that one of the primary objectives  of a web framework like myFaces
> should be, to generate standard conform markup. No component should be
> integrated in a official release, if it dosn't generate clean markup.
> At the moment, myFaces is neither XHTML nor HTML 4.01 conform.
>
> Best regards,
> Rudi
>
> On 4/27/07, Jonathan Harley <[EMAIL PROTECTED]> wrote:
>> Rudi Steiner wrote:
>> > I have still the problem with the generated XHTML from myFaces. I
>> > reduced my app to a few basic mechanisms, but this basic mechanisms
>> > must produce XHTML strict. To achieve this, i would like to wirte a
>> > filter, which makes light modifications of the generated markup, just
>> > to  satisfy the validator. For example, I would surround a hidden
>> > field, generated by myFaces with a -Tag.
>> >
>> > Could anyone please give me a hint how to achieve this. I tried it
>> > with regular expressions but I think, it is not possible to work with
>> > RE on OutputStreams.
>>
>> You'd have to buffer the output and work on that - I think this is
>> what the MyFaces Extensions filter does too.
>>
>> This is easily done in servlet filters, because each filter passes
>> the request and response objects down the chain, which are then
>> used by everything downstream of your filter. If instead of passing
>> on the same response that you received, you pass on a "decorated"
>> (enhanced) response, which overrides getOutputStream() and
>> getWriter(), you can give everyone else something which looks like
>> an OutputStream or PrintWriter but actually just captures everything
>> to a buffer. You can then manipulate the buffer as you wish.
>>
>> Fixing MyFaces to generate compliant XHTML in the first place would
>> be a much better solution though, because otherwise you'll probably
>> have to update this filter every time MyFaces or Tomahawk are
>> updated.
>>
>> MyFaces may have to generate HTML 4 to pass the TCK, but what
>> about a context-param setting to switch on strict XHTML markup
>> generation? It presumably wouldn't affect very many things anyway.
>>
>>
>> Jonathan.
>> --
>> .
>>Dr Jonathan Harley   .
>> .   Email: [EMAIL PROTECTED]
>> Zac Parkplatz Ltd   .   Office Telephone: 024 7633 1375
>> www.parkplatz.net   .   Mobile: 079 4116 0423
>>




Re: panelGrid scroll as frames!

2007-05-03 Thread Brummeline Braathen
Angel Miralles Arevalo  yahoo.es> writes:

> 
> 
> 
> Hi everyone, is there any way of applaying scroll to a panelGroup or a
PanelGrid? I'm trying to make the same as working with frames.
>  
> Thanks a lot.
> 
> LLama Gratis a cualquier PC del Mundo.Llamadas a fijos y móviles desde 1
céntimo por minuto.http://es.voice.yahoo.com
> 


I dont know if this works, but you can try to add the 
style attribute like this:





Re: [Tobago] validator error message as tooltip?

2007-05-03 Thread David Steinkopff

Hello,
I like display only the message and don´t something else.
tobago debug inline window say me
value="#{input.current['field2']}": Feldwert muss gesetzt
sein//file:/C:/Dokumente%20und%20Einstellungen/SteinkD/Tobago/build/web/WEB-INF/lib/tobago-
facelets-1.0.10.jar!/META-INF/in.xml
and real display see screenshot.

regards
David

2007/5/3, Arvid Hülsebus <[EMAIL PROTECTED]>:


 Hello,

If you press 'Submit' on the demo:


http://tobago.atanion.net/tobago-example-demo/faces/overview/validation.jsp

you get:



The error message is displayed as a tooltip for the red framed input box.
If you provide a speaking id, it becomes somewhat readable. Is this
sufficient?

Regards,
Arvid

David Steinkopff wrote:

Hi,

it´s possible to add the validator error message in the label
componenten as tooltip in ?

regards
David


<><>

Re: [Tobago] validator error message as tooltip?

2007-05-03 Thread Boris Kovalenko

Hello!

What about NLS? May id be in NL (Russian for example)?

Hello,

If you press 'Submit' on the demo:

http://tobago.atanion.net/tobago-example-demo/faces/overview/validation.jsp

you get:



The error message is displayed as a tooltip for the red framed input 
box. If you provide a speaking id, it becomes somewhat readable. Is 
this sufficient?


Regards,
Arvid

David Steinkopff wrote:

Hi,

it´s possible to add the validator error message in the label
componenten as tooltip in ?

regards
David

With respect,
Boris



Re: [Tobago] validator error message as tooltip?

2007-05-03 Thread Arvid Hülsebus




Hello,

If you press 'Submit' on the demo:

 
http://tobago.atanion.net/tobago-example-demo/faces/overview/validation.jsp

you get:



The error message is displayed as a tooltip for the red framed input
box. If you provide a speaking id, it becomes somewhat readable. Is
this sufficient?

Regards,
Arvid

David Steinkopff wrote:
Hi,
  
  
it´s possible to add the validator error message in the label
  
componenten as tooltip in ?
  
  
regards
  
David
  





[Tobago] validator error message as tooltip?

2007-05-03 Thread David Steinkopff

Hi,

it´s possible to add the validator error message in the label
componenten as tooltip in ?

regards
David


Re: DataTable with filtering option - presentation-wise

2007-05-03 Thread Gerald Müllan

Which version of tomahawk are you using?

On 5/3/07, Shane Petroff <[EMAIL PROTECTED]> wrote:

Gerald Müllan wrote:
>
> have you considered to use s:filterTable from sandbox?
> ...
> http://example.irian.at/example-sandbox-20070502/filterTable.jsf
(derailing the thread slightly)

Thanks for the reference, but I would love some help to get FilterTable
working. I've copied/pasted the example code into a page of mine, and
the java code into the backing bean. Everything renders fine, and the
table is sortable, but the function dojo.widget.byId returns null, so
the filter functions do not work. I've tried using dojo.widget.byId on
other named components, but it always seems to fail. Is there something
that needs to be configured or initialized before byId can work? I'm
using tomahawk sandbox 1.1.6 snapshot jar alongside the 1.1.5 release.
The only difference I can see in the page is that I've nested the
FilterTable inside a form. The page is attached below.




<%@ taglib uri="http://java.sun.com/jsf/core"; prefix="f"%>
<%@ taglib uri="http://java.sun.com/jsf/html"; prefix="h"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk"; prefix="t"%>
<%@ taglib uri="http://myfaces.apache.org/sandbox"; prefix="s"%>





  


  





  function manufacturerFilter(name){
return (name.charAt(0) >= 'M' && name.charAt(0) <= 'Z');
  }

  






  


  


<%-- Header --%>

  






















  






--
Shane







--
http://www.irian.at

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

Professional Support for Apache MyFaces