Re: DataScroller Not Working in Some Browsers

2008-12-03 Thread nxdp72

I think I might have found the cause. I was using Sun's JSF implementation
with Tomahawk. When I replaced it with MyFaces implementation, the problem
went away. Does that make sense?



Leonardo Uribe wrote:
> 
> On Tue, Dec 2, 2008 at 10:26 PM, nxdp72 <[EMAIL PROTECTED]> wrote:
> 
>> Hi I am having some problems with a datascroller I am using on a page.
>> The
>> scroller seems to work on Firefox on Mac and IE on Windows. However, it
>> doesn't work on Safari on Mac and it doesn't work on Firefox on Windows.
>> On
>> Safari on Mac, I get this error: *This page contains the following
>> errors:
>> * error on line 151 at column 1853: xmlParseEntityRef: no name On Firefox
>> on Windows, I get the following error: XML Parsing Error: not well-formed
>> Location ... Line Number 121, Column 47: if(typeof form.elements[name] !=
>> 'undefined' && form.elements[name].nodeName = 'INPUT') In both cases, the
>> error seems to point to the "&&" in the above line of JavaScript inside
>> the
>> scroller. It looks like it's related to the encoding of &. However, I
>> cannot
>> see why. I am very new to JSF and Facelet. I must be missing something
>> since
>> I don't see anyone else posting the same problem. I am using Tomahawk
>> 1.1.8. Your help will be greatly appreciated. Here is my code (it's a
>> facelet):
>>
> 
> Hi
> 
> I don't think this is a problem related with datascroller (this javascript
> is not part of datascroller, is part of the javascript submit of myfaces
> core). It seem to be a problem with the encoding you are using (I tested a
> example with facelets and datascroller and everything is fine).
> 
> regards
> 
> Leonardo Uribe
> 
> 
>>
>> --
>> View this message in context: DataScroller Not Working in Some
>> Browsers
>> Sent from the MyFaces - Users mailing list
>> archiveat Nabble.com.
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/DataScroller-Not-Working-in-Some-Browsers-tp20806028p20828136.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Re: DataScroller Not Working in Some Browsers

2008-12-03 Thread Leonardo Uribe
On Tue, Dec 2, 2008 at 10:26 PM, nxdp72 <[EMAIL PROTECTED]> wrote:

> Hi I am having some problems with a datascroller I am using on a page. The
> scroller seems to work on Firefox on Mac and IE on Windows. However, it
> doesn't work on Safari on Mac and it doesn't work on Firefox on Windows. On
> Safari on Mac, I get this error: *This page contains the following errors:
> * error on line 151 at column 1853: xmlParseEntityRef: no name On Firefox
> on Windows, I get the following error: XML Parsing Error: not well-formed
> Location ... Line Number 121, Column 47: if(typeof form.elements[name] !=
> 'undefined' && form.elements[name].nodeName = 'INPUT') In both cases, the
> error seems to point to the "&&" in the above line of JavaScript inside the
> scroller. It looks like it's related to the encoding of &. However, I cannot
> see why. I am very new to JSF and Facelet. I must be missing something since
> I don't see anyone else posting the same problem. I am using Tomahawk
> 1.1.8. Your help will be greatly appreciated. Here is my code (it's a
> facelet):
>

Hi

I don't think this is a problem related with datascroller (this javascript
is not part of datascroller, is part of the javascript submit of myfaces
core). It seem to be a problem with the encoding you are using (I tested a
example with facelets and datascroller and everything is fine).

regards

Leonardo Uribe


>
> --
> View this message in context: DataScroller Not Working in Some 
> Browsers
> Sent from the MyFaces - Users mailing list 
> archiveat Nabble.com.
>


Re: [trinidad]help extendind selectmanycheckbox

2008-12-03 Thread Andrew Robinson
No idea, something wrong with your classpath or using the wrong JDK?
That methods exists, so I can only assume that it is a build
environment problem.

On Wed, Dec 3, 2008 at 11:23 AM, alvaro tovar <[EMAIL PROTECTED]> wrote:
> hello
>
> /home/alvaro/NetBeansProjects/proyectoNuevo/redi5e/redi5E-war/src/java/com/redi5/components/SelectManyCheckBoxRedi5Tag.java:29:
> cannot find symbol
> symbol  : method
> setIntegerProperty(org.apache.myfaces.trinidad.bean.FacesBean,org.apache.myfaces.trinidad.bean.PropertyKey,java.lang.String)
> location: class com.redi5.components.SelectManyCheckBoxRedi5Tag
> setIntegerProperty(bean, CoreSelectManyCheckBoxRedi5.LAYOUT_WIDTH,
> _layoutWidth);
>
>
> i prove with trinidad-1.2.11-SNAPSHOT
> regards
>
>
> 2008/12/2 Andrew Robinson <[EMAIL PROTECTED]>
>>
>> Can't see the problem. Can you post the full compiler error?
>>
>> On Mon, Dec 1, 2008 at 9:40 AM, alvaro tovar <[EMAIL PROTECTED]>
>> wrote:
>> > hello thanks for your answers look my code
>> >
>> > package com.redi5.components;
>> >
>> > import org.apache.myfaces.trinidad.bean.FacesBean;
>> >
>> >
>> > import
>> >
>> > org.apache.myfaces.trinidadinternal.taglib.core.input.CoreSelectManyCheckboxTag;
>> >
>> > /**
>> >  *
>> >  * @author alvaro
>> >  */
>> > public class SelectManyCheckBoxRedi5Tag extends
>> > CoreSelectManyCheckboxTag
>> > {
>> >   private String _layoutWidth;
>> >   final public void setReadOnly(String layoutWidth)
>> >   {
>> > _layoutWidth = layoutWidth;
>> >   }
>> > @Override
>> >   protected void setProperties(
>> > FacesBean bean)
>> >   {
>> > super.setProperties(bean);
>> > setIntegerProperty(bean, CoreSelectManyCheckBoxRedi5.LAYOUT_WIDTH,
>> > _layoutWidth);
>> >
>> >   }
>> >
>> >   @Override
>> >   public void release()
>> >   {
>> > super.release();
>> >_layoutWidth=null;
>> >   }
>> >
>> > @Override
>> > public String getComponentType() {
>> > throw new UnsupportedOperationException("Not supported yet.");
>> > }
>> >
>> > @Override
>> > public String getRendererType() {
>> > throw new UnsupportedOperationException("Not supported yet.");
>> > }
>> > }
>> >
>> > this is the hierarchy tree
>> > CoreSelectBooleanCheckboxTag
>> > UIXSelectBooleanTag
>> > UIXEditableValueTag
>> > UIXValueTag
>> > UIXComponentTag
>> >
>> > but my class not compile, maybe is that the source that i have not
>> > correspond with the jar of trinidad
>> > trinidad-impl-1.2.11-SNAPSHOT.jar
>> > trinidad-api-1.2.11-SNAPSHOT.jar
>> >
>> >
>> >
>> > 2008/11/30 Andrew Robinson <[EMAIL PROTECTED]>
>> >>
>> >> Sub classes are allowed to call protected methods, what is the issue?
>> >>
>> >> On Sat, Nov 29, 2008 at 9:42 AM, alvaro tovar <[EMAIL PROTECTED]>
>> >> wrote:
>> >> > hello
>> >> >
>> >> > i am trying of add a parameter layoutWidth,
>> >> >
>> >> > y do this
>> >> >
>> >> > create a class that extends CoreSelectManyCheckboxTag
>> >> >
>> >> > public class SelectManyCheckBoxRedi5Tag extends
>> >> > CoreSelectManyCheckboxTag{
>> >> >   private String _layoutWidth;
>> >> >   final public void setReadOnly(String layoutWidth)
>> >> >   {
>> >> > _layoutWidth = layoutWidth;
>> >> >   }
>> >> > @Override
>> >> >   protected void setProperties(
>> >> > FacesBean bean)
>> >> >   {
>> >> > super.setProperties(bean);
>> >> > super.setIntegerProperty(bean,
>> >> > CoreSelectManyCheckBoxRedi5.LAYOUT_WIDTH,
>> >> > _layoutWidth);
>> >> >
>> >> >   }
>> >> >
>> >> >   @Override
>> >> >   public void release()
>> >> >   {
>> >> > super.release();
>> >> >_layoutWidth=null;
>> >> >   }
>> >> > }
>> >> >
>> >> > but the method setIntegerProperty is in UIComponentTag and is
>> >> > protected.
>> >> >
>> >> > some one can tell me some thing
>> >> >
>> >
>> >
>
>


Re: [trinidad]help extendind selectmanycheckbox

2008-12-03 Thread alvaro tovar
hello

/home/alvaro/NetBeansProjects/proyectoNuevo/redi5e/redi5E-war/src/java/com/redi5/components/SelectManyCheckBoxRedi5Tag.java:29:
cannot find symbol
symbol  : method
setIntegerProperty(org.apache.myfaces.trinidad.bean.FacesBean,org.apache.myfaces.trinidad.bean.PropertyKey,java.lang.String)
location: class com.redi5.components.SelectManyCheckBoxRedi5Tag
setIntegerProperty(bean, CoreSelectManyCheckBoxRedi5.LAYOUT_WIDTH,
_layoutWidth);


i prove with trinidad-1.2.11-SNAPSHOT
regards


2008/12/2 Andrew Robinson <[EMAIL PROTECTED]>

> Can't see the problem. Can you post the full compiler error?
>
> On Mon, Dec 1, 2008 at 9:40 AM, alvaro tovar <[EMAIL PROTECTED]>
> wrote:
> > hello thanks for your answers look my code
> >
> > package com.redi5.components;
> >
> > import org.apache.myfaces.trinidad.bean.FacesBean;
> >
> >
> > import
> >
> org.apache.myfaces.trinidadinternal.taglib.core.input.CoreSelectManyCheckboxTag;
> >
> > /**
> >  *
> >  * @author alvaro
> >  */
> > public class SelectManyCheckBoxRedi5Tag extends CoreSelectManyCheckboxTag
> > {
> >   private String _layoutWidth;
> >   final public void setReadOnly(String layoutWidth)
> >   {
> > _layoutWidth = layoutWidth;
> >   }
> > @Override
> >   protected void setProperties(
> > FacesBean bean)
> >   {
> > super.setProperties(bean);
> > setIntegerProperty(bean, CoreSelectManyCheckBoxRedi5.LAYOUT_WIDTH,
> > _layoutWidth);
> >
> >   }
> >
> >   @Override
> >   public void release()
> >   {
> > super.release();
> >_layoutWidth=null;
> >   }
> >
> > @Override
> > public String getComponentType() {
> > throw new UnsupportedOperationException("Not supported yet.");
> > }
> >
> > @Override
> > public String getRendererType() {
> > throw new UnsupportedOperationException("Not supported yet.");
> > }
> > }
> >
> > this is the hierarchy tree
> > CoreSelectBooleanCheckboxTag
> > UIXSelectBooleanTag
> > UIXEditableValueTag
> > UIXValueTag
> > UIXComponentTag
> >
> > but my class not compile, maybe is that the source that i have not
> > correspond with the jar of trinidad
> > trinidad-impl-1.2.11-SNAPSHOT.jar
> > trinidad-api-1.2.11-SNAPSHOT.jar
> >
> >
> >
> > 2008/11/30 Andrew Robinson <[EMAIL PROTECTED]>
> >>
> >> Sub classes are allowed to call protected methods, what is the issue?
> >>
> >> On Sat, Nov 29, 2008 at 9:42 AM, alvaro tovar <[EMAIL PROTECTED]>
> >> wrote:
> >> > hello
> >> >
> >> > i am trying of add a parameter layoutWidth,
> >> >
> >> > y do this
> >> >
> >> > create a class that extends CoreSelectManyCheckboxTag
> >> >
> >> > public class SelectManyCheckBoxRedi5Tag extends
> >> > CoreSelectManyCheckboxTag{
> >> >   private String _layoutWidth;
> >> >   final public void setReadOnly(String layoutWidth)
> >> >   {
> >> > _layoutWidth = layoutWidth;
> >> >   }
> >> > @Override
> >> >   protected void setProperties(
> >> > FacesBean bean)
> >> >   {
> >> > super.setProperties(bean);
> >> > super.setIntegerProperty(bean,
> >> > CoreSelectManyCheckBoxRedi5.LAYOUT_WIDTH,
> >> > _layoutWidth);
> >> >
> >> >   }
> >> >
> >> >   @Override
> >> >   public void release()
> >> >   {
> >> > super.release();
> >> >_layoutWidth=null;
> >> >   }
> >> > }
> >> >
> >> > but the method setIntegerProperty is in UIComponentTag and is
> protected.
> >> >
> >> > some one can tell me some thing
> >> >
> >
> >
>


RE: Attach the current JSF View as an attachment

2008-12-03 Thread Matt.Rossner-prest
Hi Madhav,

 

This is an interesting requirement. Off the top of my head I'd say you could 
probably make a custom component to wrap the section you want to capture. Then 
in that components renderer, in the encodeBegin method you switch the 
responseWriter to a StringWriter or some other writer. Then in encodeEnd you 
save the contents of the StringWriter somewhere you can use it later and set 
back the correct responseWriter, and if you still want to write the response 
you can do so. Also you need to override rendersChildren and have it return 
true. The code would look something like this.

 

private ResponseWriter oldWriter;

private StringWriter sWriter;

// encodeBegin

 

sWriter = new StringWriter();

HtmlResponseWriterImpl writer = new HtmlResponseWriterImpl(sWriter, 
"text/html","utf-8");

 

oldWriter = context.getResponseWriter();

context.setResponseWriter(writer);

 

 

//encodeEnd

StringBuffer sb = sWriter.getBuffer();

// do what you want with the sb

context.setResponseWriter(oldWriter);

// if you want to output it as well...

oldWriter.write(sb.toString());

 

I think this may work for what you want to do.

 

Matt

 



From: Madhav Bhargava [mailto:[EMAIL PROTECTED] 
Sent: mercredi 3 décembre 2008 11:51
To: MyFaces Discussion
Subject: Attach the current JSF View as an attachment

 

Hi All,

 

I have a rather unique requirement - On a JSF page I have a command button. On 
click of this button I want to capture the generated HTML for the current view 
I am on, truncate the left navigation, header and the footer. Extract the body 
HTML and open a save dialog box to save this HTML page with only body as 
attachment.

 

Any ideas of how it could be done using JSF?

 

Thanks,

Madhav

 CAUTION - Disclaimer *
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely 
for the use of the addressee(s). If you are not the intended recipient, please 
notify the sender by e-mail and delete the original message. Further, you are 
not 
to copy, disclose, or distribute this e-mail or its contents to any other 
person and 
any such actions are unlawful. This e-mail may contain viruses. Infosys has 
taken 
every reasonable precaution to minimize this risk, but is not liable for any 
damage 
you may sustain as a result of any virus in this e-mail. You should carry out 
your 
own virus checks before opening the e-mail or attachment. Infosys reserves the 
right to monitor and review the content of all messages sent to or from this 
e-mail 
address. Messages sent to or from this e-mail address may be stored on the 
Infosys e-mail system.
***INFOSYS End of Disclaimer INFOSYS***


Attach the current JSF View as an attachment

2008-12-03 Thread Madhav Bhargava
Hi All,

I have a rather unique requirement - On a JSF page I have a command button. On 
click of this button I want to capture the generated HTML for the current view 
I am on, truncate the left navigation, header and the footer. Extract the body 
HTML and open a save dialog box to save this HTML page with only body as 
attachment.

Any ideas of how it could be done using JSF?

Thanks,
Madhav

 CAUTION - Disclaimer *
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely 
for the use of the addressee(s). If you are not the intended recipient, please 
notify the sender by e-mail and delete the original message. Further, you are 
not 
to copy, disclose, or distribute this e-mail or its contents to any other 
person and 
any such actions are unlawful. This e-mail may contain viruses. Infosys has 
taken 
every reasonable precaution to minimize this risk, but is not liable for any 
damage 
you may sustain as a result of any virus in this e-mail. You should carry out 
your 
own virus checks before opening the e-mail or attachment. Infosys reserves the 
right to monitor and review the content of all messages sent to or from this 
e-mail 
address. Messages sent to or from this e-mail address may be stored on the 
Infosys e-mail system.
***INFOSYS End of Disclaimer INFOSYS***


[Tobago] navigation issue

2008-12-03 Thread Mario Schröder
Hi,

I wrote a simple app whith a single bean and two pages, one to enter some text 
and another page to display the result. I used MyFaces 1.1.5 and Tobago 1.0.12 
and 1.0.20. My sample works with myfaces but not with Tobago. Tobago displays 
always the same page. I thought the cause is that my bean returns the wrong 
navigation rule, so I tried a static rule, unfortunetly it doesn't help. The 
same navigation rule applies to the myfaces sample, and there it works.
I'm getting slightly mad. Who can help me and show me what am I doing wrong?

Here are the important pieces of my code:

faces-config.xml:
...

bean
test.TextBean
session

text
Test





show
/result.jsp


...

The myfaces page:
...







...

The Tobago page:
...










...

And the nextAction()-Method of my bean:
...
public String nextAction(){
return "show";
}
...

I appreciate any hints or help.

Pt! Schon vom neuen WEB.DE MultiMessenger gehört? 
Der kann`s mit allen: http://www.produkte.web.de/messenger/?did=3123



Re: Tree2 and selectBooleanCheckbox status processing

2008-12-03 Thread Andreas Niemeyer

Hi,

I got it solved in a more common without iterating through the HTMLTree 
(this seems to be buggy since the node address information is null/ unset)


The checkbox status is saved, a mistake happened by using the 
clientSideToggle first.

The checkbox status is hold about the Hashmap reference in the backing bean.


Regards,
Andreas


Andreas Niemeyer schrieb:

Hi,

I need to iterate through the HtmlTree and / or the TreeModelBase to get 
 the expanded nodes and the selections of the nested 
selectBooleanCheckboxes.


Could someone be so kind and give me some pointers?

- how to get each item/node address
- how to get the selection status of the selectBooleanCheckboxes


Right now the expanded nodes stays fine between requests, but then the 
checkbox selections get lost.


I need this to re-create the tree between sessions, so the extracted 
informations will saved persistent and applied again.



Thank you in advance,
Andreas





varNodeToggler="t" showRootNode="true" binding="#{backbean.tree}" 
clientSideToggle="false">




value="/images/yellow-folder-open.png" alt=" " 
rendered="#{t.nodeExpanded}" border="0"/>
value="/images/yellow-folder-closed.png"  alt=" " 
rendered="#{!t.nodeExpanded}" border="0"/>
styleClass="nodeFolder" />
styleClass="childCount" rendered="#{!empty node.children}"/>






value="/images/yellow-folder-open.png"  alt=" " 
rendered="#{t.nodeExpanded}" border="0"/>
value="/images/yellow-folder-closed.png"  alt=" " 
rendered="#{!t.nodeExpanded}" border="0"/>
styleClass="nodeFolder" />
styleClass="childCount" rendered="#{!empty node.children}"/>






value="/images/yellow-folder-open.png"  alt=" " 
rendered="#{t.nodeExpanded}" border="0"/>
value="/images/yellow-folder-closed.png"  alt=" " 
rendered="#{!t.nodeExpanded}" border="0"/>
styleClass="nodeFolder" />
styleClass="childCount" rendered="#{!empty node.children}"/>






value="#{backbean.selectedIds[node.identifier]}" />







  
 actionListener="#{backbean.saveSettings}"/>