RE: breadcrumb design

2007-02-21 Thread AMIR-TAHMASSEB Marc
 
Hi Madhav,
 
I'm also planning to create a Breadcrumb component.
My philosophie about breadcrumb is the it shows the position of the page
in the site map and note the position of the page in the user navigation
history. According to this you eliminate the problem of the browser back
button.
 
For me there is two possibilities :
 - each page know where it is.
 - only an object defined as a Site Map Manager, know where is a page.
 
Using the second possibility, you can imagine that each page give its
name to the Site Map Manager and then this one give back a list
representing labels and actions for the breadcrumb.
 
This is what I want to do but my biggest probleme is that I don't know
how to pass an attribute from a jsp to a Bean, before rendering the
jsp...
 
regards,
 
Marc Amir-Tahmasseb
 
 


  _  

From: Madhav Bhargava [mailto:[EMAIL PROTECTED] 
Sent: 21 February 2007 10:44
To: MyFaces Discussion
Subject: breadcrumb design



Hi All,

 

I am in the process of creating a component for breadcrumb
generation for my project.

 

I have following in mind:

 

1.  Create a custom component for breadcrumb, with a
renderer and a tag class. 
2.  Create a model bean that will back this component and
will contain the latest breadcrumb links and their navigation outcomes.
This bean will be at the session level 
3.  Create a breadcrumb event and queue that event in the
decode method of the renderer. This event will then be broadcasted to
all the interested listeners. In my case it will be the left menu which
will have to reflect where the user is. 

 

Every page which requires a breadcrumb will have a breadcrumb
tag defined in the page.

There will be a hidden field on every page that will store the
depth (or the index of the last link) of the breadcrumb. Using this
value the list of links in the model will be updated.

 

Following are some problems that I am currently facing:

 

1.  There can be many links present all over the place which
can result in the page control going to some page else which means that
there will be a change in the breadcrumb as well. How do you capture
such events and make the breadcrumb change? 
2.  How do you take care of the browser back button? 

 

Regards,

Madhav



Re: Multiple Form submissions

2007-02-21 Thread Adrian Mitev

Possible solution is the Synchronizer Token pattern. Shale got such
component called s:token [1]. More info about it you can find here [2].
There is also blog about this implemented as PhaseListener [3].

[1] http://shale.apache.org/shale-core/tagreference.html#token
[2] http://wiki.apache.org/shale/Token
[3] http://jroller.com/page/mert?entry=jsf_preventing_double_form_submit

2007/2/22, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:


 Hi,



If same form is submitted multiple times (by double clicking submit
twice), my application is hanging. I need to restart the app server for it
to work.

Please let me know if there is any solution. I am using MyFaces1.1.1 with
Tomahawk.



Thanks & Regards,

Kiran

The information contained in this electronic message and any attachments
to this message are intended for the exclusive use of the addressee(s) and
may contain proprietary, confidential or privileged information. If you are
not the intended recipient, you should not disseminate, distribute or copy
this e-mail. Please notify the sender immediately and destroy all copies of
this message and any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient
should check this email and any attachments for the presence of viruses. The
company accepts no liability for any damage caused by any virus transmitted
by this email.

www.wipro.com



Re: MyFaces and valueChangeListener??

2007-02-21 Thread Julien Martin

Try sending them here: [EMAIL PROTECTED]

2007/2/22, wang suya <[EMAIL PROTECTED]>:


Hi Julien Martin

  I tryed to send my war file but it returned to me I could not send it.

Wang suya

Julien Martin さんは書きました:
>try your basic example with the Sun RI or please send me your war here:
>[EMAIL PROTECTED]
>Julien.
>
>2007/2/22, wang suya <[EMAIL PROTECTED]>:
>>
>> Hello Julien Martin
>>
>>Thank you for your hlep. Maybe it is the problem of version of
MyFaces.
>> Hope somebody can hlep me.
>>
>> Wang suya
>>
>>
>> Julien Martin さんは書きました:
>> >Hello Wang,
>> >I tried to recreate your bug by deploying the artifacts you gave me
but
>> was
>> >not able to reproduce the bug. In other words it WORKS fine and there
is
>> >nothing wrong with your code. Can someone bear me out on this please?
>>
>> wang suya
>>

wang suya



Re: How to make Reusable JSP

2007-02-21 Thread Matthias Wessendorf

Here is a brandnew tutorial on Clay

http://wiki.apache.org/shale/ShaleAndClayTutorial

-M

On 2/21/07, Gary VanMatre <[EMAIL PROTECTED]> wrote:


>From: [EMAIL PROTECTED]
>Hi All,
>
>A) I have a common address JSP which i want to use it in several other
Jsps.
>Having the content below and i want to set this address value in a common
AddressVO object(POJO).
>
>
>
>
>B) I want to use this data in another jsp in the following manner.
>
> 
> Enter Name : 
> Enter Profession : 
> 
> 
> 
> Enter TCN : 
> Enter Status : 
> 
> 
> 
> 
> 
>
>
>C) In my ClaimsManageBean I want to set the data in my ClaimsDataBean in
the follwoing manner
>
>ValueBinding bind1 =
fc.getApplication().createValueBinding("#{pc_ClaimsDataBean}");
>ClaimsDataBean iniVO = (ClaimsDataBean)bind1.getValue(fc);
>ValueBinding bind2 =
fc.getApplication().createValueBinding("#{pc_AddressVO}");
>AddressVO initVO = (AddressVO)bind2.getValue(fc);
>iniVO.setAddVO(initVO);
>
>But this will give a problem , the last value set in the AddressVO will be
set in the DataBean i lose the previous value.
>Is there a way i can make a reusable jsp which can be used in other JSPs
several times.
> What a re the other possible design strategies.
>

You can use Shale Clay to achieve this level of reuse [1].  Clay is an
alternative templating solution that allows you to form JSF page composition
using something other than JSP.
Clay can also be used within a JSP.  Clay has something called "symbols"
that are a string substitution layer that is evaluated before a binding
expression is created.
There is a similar address example in the shale-clay-usecases [2].
Consider a fragment from the JSP page [3]:


 


   


The managedBeanName JSP tag attribute is a symbol.  Its value will be
replaced within the binding expression.

For example:

 
  
   
   
  
 
 
  
   
   
  
 
 
  
   
  

Within this set of component definitions, "@managed-bean-name" will be
replaced with "rolodex.selectedContact.residentialAddress"
or "rolodex.selectedContact.businessAddress".

Besides the symbol substitution layer, you also have visual inheritance
similar to tiles.
In the JSP example above, the first use of Clay will include the
addressPanel.  The second includes the foreignAddressPanel.

Lets first look at the addressPanel.

 
 
  
   
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
 

Next, the "foreignAddressPanel" extends the "addressPanel" adding the
province and country data elements.

 
 
  
  
  
  
  
  
 


[1] http://shale.apache.org/shale-clay/index.html
[2]
http://people.apache.org/builds/shale/nightly/examples/shale-clay-usecases-20070221.zip
[3]
http://svn.apache.org/viewvc/shale/framework/trunk/shale-apps/shale-clay-usecases/src/main/webapp/rolodex/jsprolodex.jsp?view=markup

>Best Regards,
>Pallavi

Gary




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

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


Multiple Form submissions

2007-02-21 Thread kiran.gutta

Hi,

 

If same form is submitted multiple times (by double clicking submit
twice), my application is hanging. I need to restart the app server for
it to work.

Please let me know if there is any solution. I am using MyFaces1.1.1
with Tomahawk.

 

Thanks & Regards,

Kiran




The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should 
check this email and any attachments for the presence of viruses. The company 
accepts no liability for any damage caused by any virus transmitted by this 
email.
 
www.wipro.com

Re: MyFaces and valueChangeListener??

2007-02-21 Thread wang suya
Hi Julien Martin

  I tryed to send my war file but it returned to me I could not send it.

Wang suya

Julien Martin さんは書きました:
>try your basic example with the Sun RI or please send me your war here:
>[EMAIL PROTECTED]
>Julien.
>
>2007/2/22, wang suya <[EMAIL PROTECTED]>:
>>
>> Hello Julien Martin
>>
>>Thank you for your hlep. Maybe it is the problem of version of MyFaces.
>> Hope somebody can hlep me.
>>
>> Wang suya
>>
>>
>> Julien Martin さんは書きました:
>> >Hello Wang,
>> >I tried to recreate your bug by deploying the artifacts you gave me but
>> was
>> >not able to reproduce the bug. In other words it WORKS fine and there is
>> >nothing wrong with your code. Can someone bear me out on this please?
>>
>> wang suya
>>

wang suya


Re: MyFaces and valueChangeListener??

2007-02-21 Thread Julien Martin

try your basic example with the Sun RI or please send me your war here:
[EMAIL PROTECTED]
Julien.

2007/2/22, wang suya <[EMAIL PROTECTED]>:


Hello Julien Martin

   Thank you for your hlep. Maybe it is the problem of version of MyFaces.
Hope somebody can hlep me.

Wang suya


Julien Martin さんは書きました:
>Hello Wang,
>I tried to recreate your bug by deploying the artifacts you gave me but
was
>not able to reproduce the bug. In other words it WORKS fine and there is
>nothing wrong with your code. Can someone bear me out on this please?

wang suya



Re: MyFaces and valueChangeListener??

2007-02-21 Thread wang suya
Hello Julien Martin

   Thank you for your hlep. Maybe it is the problem of version of MyFaces.
Hope somebody can hlep me.

Wang suya


Julien Martin さんは書きました:
>Hello Wang,
>I tried to recreate your bug by deploying the artifacts you gave me but was
>not able to reproduce the bug. In other words it WORKS fine and there is
>nothing wrong with your code. Can someone bear me out on this please?

wang suya


Re: MyFaces and valueChangeListener??

2007-02-21 Thread Julien Martin

Hello Wang,
I tried to recreate your bug by deploying the artifacts you gave me but was
not able to reproduce the bug. In other words it WORKS fine and there is
nothing wrong with your code. Can someone bear me out on this please?


Re: MyFaces and valueChangeListener??

2007-02-21 Thread wang suya
Hi Julien Martin

   Thank you for your replay. I used both MyFaces1.1.5 and 
MyFaces1.1.5-SNAPSHOT but
it did not work. My code is as below:

<[EMAIL PROTECTED] contentType="text/html; charset=Shift_JIS" %>
<[EMAIL PROTECTED] uri="http://java.sun.com/jsf/core"; prefix="f" %>
<[EMAIL PROTECTED] uri="http://java.sun.com/jsf/html"; prefix="h" %>
<[EMAIL PROTECTED] uri="http://myfaces.apache.org/tomahawk"; prefix="t" %>



jsfsample1


JSF sample













package jp.tuyano.eclipsebook3;

import javax.faces.component.html.HtmlOutputText;
import javax.faces.component.html.HtmlSelectBooleanCheckbox;
import javax.faces.event.ValueChangeEvent;

/**
 * @author 王
 *
 */
public class SampleJsfBean {
private HtmlOutputText text1;
private HtmlSelectBooleanCheckbox check1;

/**
 * @return check1 を戻します。
 */
public HtmlSelectBooleanCheckbox getCheck1() {
return check1;
}
/**
 * @param check1 設定する check1。
 */
public void setCheck1(HtmlSelectBooleanCheckbox check1) {
this.check1 = check1;
}
/**
/**
 * @return text1 を戻します。
 */
public HtmlOutputText getText1() {
return text1;
}
/**
 * @param text1 設定する text1。
 */
public void setText1(HtmlOutputText text1) {
this.text1 = text1;
}


public void check1_valueChanged(ValueChangeEvent valueChangeEvent){
Boolean neu =(Boolean)valueChangeEvent.getNewValue();
text1.setValue("check is " + neu.toString());
}
}

http://java.sun.com/xml/ns/j2ee"; 
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">
JSFSample 

Faces Servlet 

javax.faces.webapp.FacesServlet 
1 


Faces Servlet 
*.jsf 



I don't know why it is not work. Hope you can help me. Thank you very much.

wang suya




Julien Martin さんは書きました:
>Hello,
>
>Thank you all for your feedback. I realized after posting this email that
>the internet is replete with posts of people having had the same problem as
>me i.e. multiple components trying to trigger each its value change listener
>and that no one has got the solution...
>
>Wang, for you info, I use MyFaces 1.1.4.
>
>Post your code and I'll tell you how to get it working.
>
>Best regards,
>
>Julien.
>
>2007/2/22, wang suya <[EMAIL PROTECTED]>:
>>
>>
>> Hello Julien Martin
>>
>>Why your valueChangeListener worked and my valueChangeListener does not
>> work?
>> Which version of myfaces and tomahawk and tomahawk-sandbox do you use and
>> which
>> OS do you use?
>>
>> Wang suya
>>
>>
>> Julien Martin さんは書きました:
>> >Hello,
>> >
>> >I have several components in my jsf page each having a
>> valuechangelistener
>> >attribute and each attribute having a corresponding  methods in my
>> backing
>> >bean.
>> >
>> >public void attributeAChanged(ValueChangeEvent evt){
>> >public void attributeBChanged(ValueChangeEvent evt){
>> >
>> >in the jsp:
>> >
>> >valueChangeListener="#{PopulateListsBean.attributeAChanged}"
>> >valueChangeListener="#{PopulateListsBean.attributeBChanged}"
>> >
>> >Does anyone know why the first declared method is always called even if
>> >attributeB is changed??
>> >
>> >I was not able to find anywhere in the spec anything related to that.
>> >
>> >Can anyone help?
>> >
>> >Thanks in advance,
>> >
>> >Julien.
>>
>> wang suya
>>

wang suya


Upgrading from MyFaces 1.1.4 to 1.1.5

2007-02-21 Thread mraible

I recently tried upgrading MyFaces 1.1.4 to the latest 1.1.5 version.  When I
do this, my tests start failing because I have a couple pages that use
JavaScript to call an managed bean's method. Here's my password hint page:



#{text['user.passwordHint']}

Looking up password hint for ${param.username}...










var f = document.forms['passwordForm'];
f.elements['passwordForm:_link_hidden_'].value='passwordForm:execute';
f.elements['username'].value='${param.username}';
f.submit();




In PasswordForm.execute(), I have:

public String execute() {

// ensure that the username has been sent
if (username == null || "".equals(username)) {
log.warn("Username not specified, notifying user that it's a
required field.");

addError("errors.required", getText("user.username"));
return null;
}

if (log.isDebugEnabled()) {
log.debug("Processing Password Hint...");
}

// look up the user's information
try {
User user = userManager.getUserByUsername(username);

StringBuffer msg = new StringBuffer();
msg.append("Your password hint is: " + user.getPasswordHint());
msg.append("\n\nLogin at: " +
RequestUtil.getAppURL(getRequest()));

message.setTo(user.getEmail());
String subject = '[' + getText("webapp.name") + "] " +
getText("user.passwordHint");
message.setSubject(subject);
message.setText(msg.toString());
mailEngine.send(message);

addMessage("login.passwordHint.sent", 
   new Object[] { username, user.getEmail() });

} catch (Exception e) {
e.printStackTrace();
// If exception is expected do not rethrow
addError("login.passwordHint.error", username);
}

return "success";
}

This worked fine in 1.1.4, but for some reason - 1.1.5 keeps redirecting
back to the same page.  Any ideas?

Thanks,

Matt
-- 
View this message in context: 
http://www.nabble.com/Upgrading-from-MyFaces-1.1.4-to-1.1.5-tf3271040.html#a9094577
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Re: [ Tobago ] [ Solved ]Help regarding Input Suggest

2007-02-21 Thread madan chowdary
Hi Volker,

Tested the suggestMethod in both FireFox and IE, its working fine now.

The listbox thats gets displayed is expanded accordingly.

But found a strange thing happening in IE.

The list thats gets shown up contains a ' 0 ' at last.When scrolled the arrow 
up and down, only the items are selected but not the ' 0 '.

This tailing ' 0 ' is not shown in FireFox, but it does in IE for what ever 
suggest i receive.

Regards,
Madan

- Original Message 
From: Volker Weber <[EMAIL PROTECTED]>
To: MyFaces Discussion 
Sent: Tuesday, 20 February, 2007 2:25:21 PM
Subject: Re: [ Tobago ] [ Solved ]Help regarding Input Suggest

Hi Madan,

there was something like a timing issue when setting the size of
suggested items,
should be fixed in the last nightly (>= 20-Feb-2007 04:59).
Please test this one, also on IE (i can't test on windows during the
week (and i don't like it on weekend, but all my requests to remove
the IE from the list of supported Browsers are regulary rejected ;-)
)).

Regards,

  Volker

2007/2/19, madan chowdary <[EMAIL PROTECTED]>:
>
> Hi Volker,
>
> Tried with y'days nightly build, but its failing again in IE.
>
> Was not able to see the the suggest in IE.
>
> I have one more request. When ever i click a key in textbox, i was getting
> suggest words, but the dropdown in which they are shown are limited to the
> width of the text box.
>
> The words i enter may be present in text which are more lengthier then the
> width of 
>
> So, the whole text is not being displayed in the suggest dropdown.
>
> Is there any possible way to increase the width of the dropdown even if the
> text is small or big
>
> Thnx in Advance
>
> madan
>
> - Original Message 
> From: Volker Weber <[EMAIL PROTECTED]>
> To: MyFaces Discussion 
> Sent: Monday, 19 February, 2007 3:54:54 AM
> Subject: Re: [ Tobago ] [ Solved ]Help regarding Input Suggest
>
> Hi Madan,
>
> just fixed the IE issue with inputSuggest.
>
> The exception is another problem, but this don't break the inputSuggest.
>
> Regards,
>   Volker
>
> 2007/2/17, madan chowdary <[EMAIL PROTECTED]>:
> >
> > Hi Volker,
> >
> > Think u didn't go through my previous post.
> >
> > Does the inputSuggest work well with Internet Explorer ?
> >
> > And why does error occures( as posted in previous mail) when ever i type
> in
> > any thing in  for both Firefox and IE.
> >
> > Is this a bug?
> >
> > Regards,
> > Madan
> >
> >
> > - Original Message 
> > From: madan chowdary <[EMAIL PROTECTED]>
> > To: MyFaces Discussion 
> > Sent: Wednesday, 14 February, 2007 4:40:07 PM
> > Subject: Re: [ Tobago ] [ Solved ]Help regarding Input Suggest
> >
> >
> > Hi Volker,
> >
> > Solved the InputSuggest for 
> >
> > used the below code as in JSP and Java
> >
> >  > value="#{inventorySearch.searchCriteria}"
> > suggestMethod =
> > "#{inventorySearch.suggestSearchCriteria}"
> > />
> >
> > public List suggestSearchCriteria(String msg){
> > System.out.println("*** Inside getSuggestMethod *** " + msg);
> > List suggestions = new ArrayList();
> > suggestions.add("Madan");
> > suggestions.add("Varma");
> > suggestions.add("Prasad");
> > return suggestions;
> > }
> >
> > Am able to see the list of available items when i type any key in
> .
> >
> > I am using both FireFox 2.0 and IE 7 for development.
> >
> > But the above code works only for Firefox but not IE.
> >
> > And was getting an error immediatly when i enter sometext in  in
> > both firefox and IE
> >
> > The log is as such,
> >
> > 2007-02-14 16:38:24,546 INFO  [STDOUT] *** Inside getSuggestMethod *** a
> > 2007-02-14 16:38:24,640 INFO  [STDOUT] 16:38:24,609 ERROR [[FacesServlet]]
> > Servlet.service() for servlet FacesServlet threw exception
> > java.lang.NullPointerException
> > at
> >
> org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.FormRenderer.decode(FormRenderer.java:40)
> > at
> >
> javax.faces.component.UIComponentBase.decode(UIComponentBase.java:500)
> > at
> >
> org.apache.myfaces.tobago.component.UIForm.processDecodes(UIForm.java:39)
> > at
> >
> javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:602)
> > at
> >
> javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:602)
> > at
> >
> javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:602)
> > at
> >
> javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:602)
> > at
> >
> org.apache.myfaces.tobago.component.UIPage.processDecodes(UIPage.java:137)
> > at
> >
> javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:602)
> > at
> >
> javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:135)
> > at
> >
> org.apache.myfaces.tobago.component.UIViewRoot.processDecodes(UIViewRoot.java:164)
> > at
> >
> org.apache.myfaces.lifecycle.LifecycleImpl

ERROR: Value is not a valid option

2007-02-21 Thread Srinivas V

Hi All,
Please help me!!
I am having an issue with SelectOneMenu.

I have installed JSF 1.1.5-SNAPSHOT,Tomahawk1.1.5- SNAPSHOT and
tomahawk-sandbox-1.1.5-SNAPSHOT.

Previously i had myfaces1.1 jar
I dint have issue with selectOneMenu before.

Now when I submit the page, I am getting this jsf validation error:
*Container:"Value is not a valid option"*
for a selectOneMenu even if i select some option.

code:

  
  
  
   
   
  
 

Can anybody tell me why it is happening?

regards
srinivas


Re: MyFaces and valueChangeListener??

2007-02-21 Thread Julien Martin

Hello,

Thank you all for your feedback. I realized after posting this email that
the internet is replete with posts of people having had the same problem as
me i.e. multiple components trying to trigger each its value change listener
and that no one has got the solution...

Wang, for you info, I use MyFaces 1.1.4.

Post your code and I'll tell you how to get it working.

Best regards,

Julien.

2007/2/22, wang suya <[EMAIL PROTECTED]>:



Hello Julien Martin

   Why your valueChangeListener worked and my valueChangeListener does not
work?
Which version of myfaces and tomahawk and tomahawk-sandbox do you use and
which
OS do you use?

Wang suya


Julien Martin さんは書きました:
>Hello,
>
>I have several components in my jsf page each having a
valuechangelistener
>attribute and each attribute having a corresponding  methods in my
backing
>bean.
>
>public void attributeAChanged(ValueChangeEvent evt){
>public void attributeBChanged(ValueChangeEvent evt){
>
>in the jsp:
>
>valueChangeListener="#{PopulateListsBean.attributeAChanged}"
>valueChangeListener="#{PopulateListsBean.attributeBChanged}"
>
>Does anyone know why the first declared method is always called even if
>attributeB is changed??
>
>I was not able to find anywhere in the spec anything related to that.
>
>Can anyone help?
>
>Thanks in advance,
>
>Julien.

wang suya



Re: How to make Reusable JSP

2007-02-21 Thread Jay Balunas

I'll throw my opinion to the Facelets approach.  I have been very happy with
it, and it certainly allows this type of reuse.

It is covered in the Wiki link that Cagatay provided.

-Jay

On 2/21/07, Gary VanMatre <[EMAIL PROTECTED]> wrote:


>From: [EMAIL PROTECTED]
>Hi All,
>
>A) I have a common address JSP which i want to use it in several other
Jsps.
>Having the content below and i want to set this address value in a common
AddressVO object(POJO).
>
>
>
>
>B) I want to use this data in another jsp in the following manner.
>
> 
> Enter Name : 
> Enter Profession : 
> 
> 
> 
> Enter TCN : 
> Enter Status : 
> 
> 
> 
> 
> 
>
>
>C) In my ClaimsManageBean I want to set the data in my ClaimsDataBean in
the follwoing manner
>
>ValueBinding bind1 = fc.getApplication
().createValueBinding("#{pc_ClaimsDataBean}");
>ClaimsDataBean iniVO = (ClaimsDataBean)bind1.getValue(fc);
>ValueBinding bind2 = fc.getApplication
().createValueBinding("#{pc_AddressVO}");
>AddressVO initVO = (AddressVO)bind2.getValue(fc);
>iniVO.setAddVO(initVO);
>
>But this will give a problem , the last value set in the AddressVO will
be set in the DataBean i lose the previous value.
>Is there a way i can make a reusable jsp which can be used in other JSPs
several times.
> What a re the other possible design strategies.
>

You can use Shale Clay to achieve this level of reuse [1].  Clay is an
alternative templating solution that allows you to form JSF page composition
using something other than JSP.
Clay can also be used within a JSP.  Clay has something called "symbols"
that are a string substitution layer that is evaluated before a binding
expression is created.
There is a similar address example in the shale-clay-usecases [2].
Consider a fragment from the JSP page [3]:


 


   


The managedBeanName JSP tag attribute is a symbol.  Its value will be
replaced within the binding expression.

For example:

 
  
   
   
  
 
 
  
   
   
  
 
 
  
   
  

Within this set of component definitions, "@managed-bean-name" will be
replaced with "rolodex.selectedContact.residentialAddress" or "
rolodex.selectedContact.businessAddress".

Besides the symbol substitution layer, you also have visual inheritance
similar to tiles.
In the JSP example above, the first use of Clay will include the
addressPanel.  The second includes the foreignAddressPanel.

Lets first look at the addressPanel.

 
 
  
   
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
 

Next, the "foreignAddressPanel" extends the "addressPanel" adding the
province and country data elements.

 
 
  
  
  
  
  
  
 


[1] http://shale.apache.org/shale-clay/index.html
[2]
http://people.apache.org/builds/shale/nightly/examples/shale-clay-usecases-20070221.zip
[3]
http://svn.apache.org/viewvc/shale/framework/trunk/shale-apps/shale-clay-usecases/src/main/webapp/rolodex/jsprolodex.jsp?view=markup

>Best Regards,
>Pallavi

Gary



Re: Do the MyFaces support Mousedrag motion?

2007-02-21 Thread wang suya

 Hello

   I mean that I want to make a server side GUI application that draw
senveral Rectanges and when mouse drag the bottom of Rectange, the rectange
extends. Do anybody know how I can realize this appication.

  Thank you at advance.

 Wang suya


>
>  Hello
>
>Do anybody know the myfaces support mouse drag motion?
>
>
>   Wang suya
>
>wang suya
>

wang suya


Re: MyFaces and valueChangeListener??

2007-02-21 Thread wang suya

Hello Julien Martin

   Why your valueChangeListener worked and my valueChangeListener does not work?
Which version of myfaces and tomahawk and tomahawk-sandbox do you use and which
OS do you use?

Wang suya


Julien Martin さんは書きました:
>Hello,
>
>I have several components in my jsf page each having a valuechangelistener
>attribute and each attribute having a corresponding  methods in my backing
>bean.
>
>public void attributeAChanged(ValueChangeEvent evt){
>public void attributeBChanged(ValueChangeEvent evt){
>
>in the jsp:
>
>valueChangeListener="#{PopulateListsBean.attributeAChanged}"
>valueChangeListener="#{PopulateListsBean.attributeBChanged}"
>
>Does anyone know why the first declared method is always called even if
>attributeB is changed??
>
>I was not able to find anywhere in the spec anything related to that.
>
>Can anyone help?
>
>Thanks in advance,
>
>Julien.

wang suya


Do the MyFaces support Mousedrag motion?

2007-02-21 Thread wang suya

  Hello

Do anybody know the myfaces support mouse drag motion?


   Wang suya

wang suya


Navigation issue with acegi/jsf

2007-02-21 Thread Mick Knutson

I have the following rule:

   
   
   Logon Navigation
   Logon functions...
   /views/common/logon.xhtml

   
   success
   /views/secure/index.xhtml
   
   
   
   failure
   /views/secure/index.xhtml
   
   


My issue is that I want to have any request, keep the requested to-view-id

For example. If I click /views/secure/index.jsf, I expect to go to my
logon.xhtml page, then to /views/secure/index.xhtml

If I logout, then click /views/admin/admin.jsf I expect to go to my
logon.xhmtl page, then to /views/admin/admin.xhtml

Right now, no matter what the request (like admin.jsf), I keep getting sent
to secured/index.xhtml

--
---
Thanks,
Mick Knutson

http://www.baselogic.com
http://www.blincmagazine.com
http://www.djmick.com
http://www.myspace.com/djmick_dot_com
http://www.thumpradio.com
---


Re: Pagination of large database tables

2007-02-21 Thread Paul Iov




The DataScroller itself knows NOTHING about
how data are fetched. It
just looks for the bound UIData component in tree (i.e. DataTable) and
gets two values from the underlying instance of DataModel: datasetSize
and getFirst() + pageSize
from component. To 'know', which page is currently displayed, it
calculates this from getFirst. To perform pagination, it calculates
row index of first item at requested page and sets it to the DataModel
with setFirst().

So, first of all we need to implement some derived from DataModel
class, which handles our custom fetching method since all of UIData
components (i.e. DataTable etc. and, indirectly DataScroller) are
expecting an instance of such class as value. How to do this (and how
to delegate the fetching of particular page of data to own MBean) is
described in the Wiki. The advantage of this approach is that such
DataModel don't need to hold ALL records in memory, but only the
current page of data, which is currently displayed. But any way, we DO
need to perform some kind of SELECT Count(*) at least once to know, how
many records are available. Without to know this it's not possible to
generate neither correct page list (1 2 3 4 5)  nor to decide, whether
the "More" link sould be displayed. (You wish to display some kind of
search results with 50 records per page - what if result dataset
cosists of less than (5x50=)250 records but just of few or even 150
records? The scroller needs then to generate '<<1 2 3>>',
not '<<1 2 3 4 5 More>>' :) ) 

It is exactly what the PagedListDataModel from Wiki does! It must to
'know' the total record count, to report it to DataScroller, so
DataScroller cann generate the correct list of page numbers, but
DataModel fetchs only the records, which should be currently rendered.
Of course, it cann be extended to fetch more records at once (i.e. 250)
and to store it internally in some kind of cache. One more reason to
'know' total record count (and probably, to preserve at least the list
of record IDs after first query) is the sorting order. Let's say, we
have 'found' only 100 records, the first page is rendered and the
scroller looks like <<1 2>>. User clicks on '2', but the
database has changed since page rendering - one record was inserted at
first position. The last item from page 1 is then displayed as first on
page 2 and the scroller looks like <<1 2 3>> I don't think,
it's exactly what user expects from good designed GUI :)

In my case I'm doing no SELECT Count(*) but SELECT ID, hovever just
once! That IDs are then stored in private ArrayList, so every time when
the next portion is requested (i.e. one page of data must be rendered)
I can get a corresponding sublist of IDs and fetch exactly this portion
(i.e. with WHERE ID IN(...), what should be very fast if ID field is
indexed in DB). In fact I don't have to care about "More", since EVERY
page of data is fetched on demand. (If sorting order is not matter, we
can rely on i.e. ROWNUM in Oracle or LIMIT in MySQL without to store
initially any list but only the number or records, retrived with SELECT
Count(*) or somehow else. Disadvantage in this case is, that we have
then to perform SELECT with complete WHERE part (eventuely, with
complex and time consuming conditions) for every page! Alternatively,
we cann let EJB/Hybernate/whatever do the job, but any way it means, we
will have large list of object instances in memory (eventually, extra
session overhead too) or perform complex (and slow) querie for each
page or portion of pages. To obtain some subset of data, the wohl set
must be known => temporary stored in memory or defined by query
conditions. I've found, that to store IDs in array of integer is the
less possible overhead.

To implenemt "More" link, we need to extend the DataScroller, i.e. with
new facet, which sould be rendered if at least one page more is
available, and to know this, again, we need to know total record count
(what about rendered="condition"? How should we define this condition,
if total record count is unknown? :)  So, why not just let our extended
scroller decide, whether facet should be rendered? ) May be, you cann
use "fast step" of existing scroller... such click on "more" means
nothing, but navigation to page 6 if possible (= [last displayed page
number] + 1) and the fetching/cache works 'automaticly' in our
DataModel.

The steps to implement own PagedListDataModel are exactly described in
Wiki. The trick is to provide own derivat of DataModel, that 'looks'
exactly like DataModel (it means, cann 'report', how many records it
hase etc.) but every time, when getRowData() asks for record, which is
not currently fetched (not in cache), it calls the fetchPage() method,
which must be implemented in your MBean. You can get the code from Wiki
1:1. Just put the private class into your MBean and implement your
fetchPage method, i.e.
public MyBean{
  ...
  private class LocalDataModel extends PagedListDataModel {
public LocalDataModel(int pageSize) {
 

Re: Need to know which values have changed?

2007-02-21 Thread Adrian Mitev

You can use valueChangeListener on all components related to that bean,
rewrite your setter methods or use dynamic proxy to intercept the bean's
setters.

2007/2/21, Bjørn T Johansen <[EMAIL PROTECTED]>:


I have a small "problem" I am not sure what is the best way to solve..
After a submit, I need to know which submitted fields have changed since
it was first displayed on a web page...

Comparing every fields feels like an overkill...?


Regards,

BTJ

--

---
Bjørn T Johansen

[EMAIL PROTECTED]

---
Someone wrote:
"I understand that if you play a Windows CD backwards you hear strange
Satanic messages"
To which someone replied:
"It's even worse than that; play it forwards and it installs Windows"

---



Re: f:validateDoubleRange

2007-02-21 Thread Michał 'Gandalf' Stawicki

Thanks for help,

I ended up writting my own converter, which was quite easy and I can
do all the validation and calculations in it, so it's good solution
for me.

If anyone needs a quick tutorial for this, here is direct link:

http://java.sun.com/javaee/5/docs/tutorial/doc/JSFConfigure7.html


On 21/02/07, Mike Kienenberger <[EMAIL PROTECTED]> wrote:

There is a numberConverter in either tomahawk or the sandbox which
will give you far greater control over what data type is returned.
I'd recommend using that converter instead.



http://example.irian.at/example-sandbox-20070221/typedNumberConvert.jsf

http://example.irian.at/example-sandbox-20070221/typedNumberConvert.jsp.source

On 2/21/07, Michał 'Gandalf' Stawicki <[EMAIL PROTECTED]> wrote:
> Thanks for idea, I've came up with
>
>  minIntegerDigits="1" pattern="###.0#"/>
>
> Now, the problem is, that when I enter for. ex. 0,11 it returns
> Double, but when i enter 0,0 it returns Long. Is there a way of making
> it return Double in all cases, or should I create setters for both
> Double and Long?
>
> best regards,
> michael
>
> On 21/02/07, Matthias Wessendorf <[EMAIL PROTECTED]> wrote:
> > use a numberConverter
> >
> > the buildin doubleConverter does
> > (javax.faces.convert.DoubleCoinverte)
> >
> > Double.valueOf(string)
> >
> > the string needs to contain a "." instead of ","
> >
> > -M
> >
> > On 2/21/07, Michał 'Gandalf' Stawicki <[EMAIL PROTECTED]> wrote:
> > > Hello,
> > >
> > > is there a way to make f:validateDoubleRange validate ',' (comma)
> > > instead of '.' (dot) as decimal separator? I have already set f:view
> > > locale and did
> > >
> > > FacesContext fc = FacesContext.getCurrentInstance();
> > > fc.getViewRoot().setLocale(new Locale("pl", "PL"));
> > >
> > > am I missing something, or does validator only accept '.'?
> > >
> > > Regards,
> > > michael
> > >
> > > --
> > > [EMAIL PROTECTED]
> > > http://stawicki.jasliska.pl
> > > GG: 369
> > > JID: [EMAIL PROTECTED]
> > >
> >
> >
> > --
> > Matthias Wessendorf
> > http://tinyurl.com/fmywh
> >
> > further stuff:
> > blog: http://jroller.com/page/mwessendorf
> > mail: mwessendorf-at-gmail-dot-com
> >
>
>
> --
> [EMAIL PROTECTED]
> http://stawicki.jasliska.pl
> GG: 369
> JID: [EMAIL PROTECTED]
>




--
[EMAIL PROTECTED]
http://stawicki.jasliska.pl
GG: 369
JID: [EMAIL PROTECTED]


Re: Problem using PPR together with a tabbedPanel client side

2007-02-21 Thread Ernst Fastl

Hi,

Sorry for my really long delay to respond to this issue, but I have
been in bed with fever up until tuesday...

I looked into your pasted code again and also reviewed the ppr.js
accordingly. I think what Gerald suspects, that it has something
to do with the interception of the submit. I suspect the
button onClick handlers in particular.

If I understood it correctly the client side tabbedPane renders buttons
which are not intended to submit the mainform but instead have
onclick-Handlers which call some javascript and then return false
to prevent a submit - right?

If that is the case and later on the PPRCtrl initialization method replaces
the onclick-handlers of all buttons (regardless of specific partialTriggers)
with the following:

//PointCutAdvisor which invokes the AJAX Submit Method of the PPR
Controller after custom
//onclick-handlers for submit-buttons and submit-images

org.apache.myfaces.PPRCtrl.prototype.buttonOnClickHandler = function (_event)
{
   if(this.onclick_orig.type != "undefined")
   {
   this.onclick_orig();
   }
   return this.myFacesPPRCtrl.ajaxSubmitFunction(this);
}

where onclick_orig is the original onclick-handler of the button. The
ajaxSubmitFunction then checks for triggers and submits normally
if none are found.

A return
value of false from the original onclick handler which would normally
prevent a form submission would in this case be ignored.

If you know of the venkman plugin for firefox (also known
as JavaScript debugger) you could set a breakpoint in this method
and see if that is the problem.

In case you are not familiar or have troubles with the javascript debugger
just drop a line and I'll try to recronstruct the  problem and see for myself.

If that indeed proves to be the problem i think we could solve it by
just checking
for the return value in the onclick handler which would probably be cleaner
anyway.

regards

Ernst

On 2/21/07, Gerald Müllan <[EMAIL PROTECTED]> wrote:

Hi,

the responded markup seems to be ok, PanelTabbedPane renders a hidden
input-submit, and on onclick-event it tries to change the tab to
another one on client side.

Normally, if ppr is activated on an element, it hooks into a click and
before doing the form-post it does its own ajax-submit. It seems that
in this case ppr also anticipating in any way, and activates a regular
form-post.

How do you have specified the "partialTriggers" attribute (or
partialTriggerPattern )?
Maybe it also aims the hidden tab-button.

cheers,

Gerald

On 2/21/07, Laurentiu Trica <[EMAIL PROTECTED]> wrote:
> Hi Ernst
>
> Sorry for not responding faster, but I had to switch from using tableSuggest
> to inputSuggest and I hoped that won't be the same problem.
>
> Unfortunately it is.
> I checked the generated HTML and I found this for the tabbed panel.
>
> 
>  name="ofamMainForm:_id115_indexSubmit" style="display:none"
> /> ="0" class="myFaces_panelTabbedPane tabbedPanel">
> <
> tr class="myFaces_pannelTabbedPane_HeaderRow">
>   "ofamMainForm:tab1_headerCell"
> class="myFaces_panelTabbedPane_activeHeaderCell"><
> input type="submit" name="ofamMainForm:_id115.0"
> value="Details" onclick="return
> 
myFaces_showPanelTab(0,'ofamMainForm:_id115_indexSubmit','ofamMainForm:tab1_headerCell','ofamMainForm:tab1',panelTabbedPane_5FofamMainForm_3A_5Fid115_5FHeadersIDs,panelTabbedPane_5FofamMainForm_3A_5Fid115_5FIDs,null,null,null,null);"
> />
>   class="myFaces_panelTabbedPane_inactiveHeaderCell"> type
> ="submit" name="ofamMainForm:_id115.1" value=
> "Transport" onclick="return
> 
myFaces_showPanelTab(1,'ofamMainForm:_id115_indexSubmit','ofamMainForm:tab2_headerCell','ofamMainForm:tab2',panelTabbedPane_5FofamMainForm_3A_5Fid115_5FHeadersIDs,panelTabbedPane_5FofamMainForm_3A_5Fid115_5FIDs,null,null,null,null);"
> />
>
>
>   "myFaces_panelTabbedPane_emptyHeaderCell"> 
> 
>   class="myFaces_pannelTabbedPane_subHeaderRow">
>   "ofamMainForm:tab1_headerCell_sub"
> class="myFaces_panelTabbedPane_subHeaderCell
> myFaces_panelTabbedPane_subHeaderCell_first
> myFaces_panelTabbedPane_subHeaderCell_active"
> > 
>   class="myFaces_panelTabbedPane_subHeaderCell
> myFaces_panelTabbedPane_subHeaderCell_inactive"> 
> 
>   class="myFaces_panelTabbedPane_subHeaderCell
> myFaces_panelTabbedPane_subHeaderCell_inactive">  >
>
>   class="myFaces_panelTabbedPane_subHeaderCell
> myFaces_panelTabbedPane_subHeaderCell_inactive">  >
>   "myFaces_panelTabbedPane_subHeaderCell
> myFaces_panelTabbedPane_subHeaderCell_inactive"> 
>id

Need to know which values have changed?

2007-02-21 Thread Bjørn T Johansen
I have a small "problem" I am not sure what is the best way to solve..
After a submit, I need to know which submitted fields have changed since it was 
first displayed on a web page...

Comparing every fields feels like an overkill...?


Regards,

BTJ

-- 
---
Bjørn T Johansen

[EMAIL PROTECTED]
---
Someone wrote:
"I understand that if you play a Windows CD backwards you hear strange Satanic 
messages"
To which someone replied:
"It's even worse than that; play it forwards and it installs Windows"
---


Re: f:validateDoubleRange

2007-02-21 Thread Mike Kienenberger

There is a numberConverter in either tomahawk or the sandbox which
will give you far greater control over what data type is returned.
I'd recommend using that converter instead.



http://example.irian.at/example-sandbox-20070221/typedNumberConvert.jsf

http://example.irian.at/example-sandbox-20070221/typedNumberConvert.jsp.source

On 2/21/07, Michał 'Gandalf' Stawicki <[EMAIL PROTECTED]> wrote:

Thanks for idea, I've came up with



Now, the problem is, that when I enter for. ex. 0,11 it returns
Double, but when i enter 0,0 it returns Long. Is there a way of making
it return Double in all cases, or should I create setters for both
Double and Long?

best regards,
michael

On 21/02/07, Matthias Wessendorf <[EMAIL PROTECTED]> wrote:
> use a numberConverter
>
> the buildin doubleConverter does
> (javax.faces.convert.DoubleCoinverte)
>
> Double.valueOf(string)
>
> the string needs to contain a "." instead of ","
>
> -M
>
> On 2/21/07, Michał 'Gandalf' Stawicki <[EMAIL PROTECTED]> wrote:
> > Hello,
> >
> > is there a way to make f:validateDoubleRange validate ',' (comma)
> > instead of '.' (dot) as decimal separator? I have already set f:view
> > locale and did
> >
> > FacesContext fc = FacesContext.getCurrentInstance();
> > fc.getViewRoot().setLocale(new Locale("pl", "PL"));
> >
> > am I missing something, or does validator only accept '.'?
> >
> > Regards,
> > michael
> >
> > --
> > [EMAIL PROTECTED]
> > http://stawicki.jasliska.pl
> > GG: 369
> > JID: [EMAIL PROTECTED]
> >
>
>
> --
> Matthias Wessendorf
> http://tinyurl.com/fmywh
>
> further stuff:
> blog: http://jroller.com/page/mwessendorf
> mail: mwessendorf-at-gmail-dot-com
>


--
[EMAIL PROTECTED]
http://stawicki.jasliska.pl
GG: 369
JID: [EMAIL PROTECTED]



Re: MyFaces and valueChangeListener??

2007-02-21 Thread Simon Kitching
While most people fail to trim irrelevant info from emails, 
unfortunately Julien has trimmed a little too vigorously :).


The original posting on this subject showed that he was using two 
separate h:selectOneMenu tags each with one valueChangeListener 
attribute, which looks ok to me.


http://www.nabble.com/Several-value-change-listener-methods-in-a-backing-bean--tf3266143.html



Mike Kienenberger wrote:

You can have multiple valueChangeListener components as children of a
UIInput.   You can have one-and-only one valueChangeListener attribute
on a UIInput.

It looks like Julien is trying to use multiple attributes, not
multiple components.




Re: MyFaces and valueChangeListener??

2007-02-21 Thread Mike Kienenberger

You can have multiple valueChangeListener components as children of a
UIInput.   You can have one-and-only one valueChangeListener attribute
on a UIInput.

It looks like Julien is trying to use multiple attributes, not
multiple components.

On 2/21/07, Simon Kitching <[EMAIL PROTECTED]> wrote:

Julien Martin wrote:
> Hello,
>
> I have several components in my jsf page each having a valuechangelistener
> attribute and each attribute having a corresponding  methods in my backing
> bean.
>
> public void attributeAChanged(ValueChangeEvent evt){
>
> public void attributeBChanged(ValueChangeEvent evt){
>
> in the jsp:
>
> valueChangeListener="#{PopulateListsBean.attributeAChanged}"
> valueChangeListener="#{PopulateListsBean.attributeBChanged}"
>
>
> Does anyone know why the first declared method is always called even if
> attributeB is changed??
>
> I was not able to find anywhere in the spec anything related to that.
>
> Can anyone help?

This sure looks like a bug to me; I can't see anything wrong with your
code. Multiple valueChangeListener methods should be supported AFAIK. I
presume you are checking which methods are called by logging output in
each one, or using breakpoints?

By the way, in a later email you give this code:
 > ***
 >  public void contractCodeChanged(ValueChangeEvent evt){
 > log.info("contractCodeChanged");
 > this.contractCode = (String) evt.getNewValue();
 > }

Updating the model from a value-changed-event is probably not a good
idea. These callbacks get executed at the end of the validation phase,
and are run even if validation failures have occurred on other
components. Therefore if a validation failure has occurred then the
value-change-listener method is called but the model is never updated
from other components.

Note also that you have:


Re: Why does JSF submit through JavaScript?

2007-02-21 Thread Simon Kitching
Replacing all commandLinks with commandButtons seems the best solution 
to me. After all, if you were using some other tech like CGI or PHP or 
whatever you still couldn't submit a form using an  tag without 
javascript. It's just not possible with HTML.


The h:commandLink tag is really an optional feature over and above 
normal html, which is why javascript is needed to implement it on the 
client side.


Note that this only applies where the link *submits a form*. Ordinary 
links can be output using h:outputLink - but they won't submit the form.



lightbulb432 wrote:

I see, so what do developers of JSF applications generally do - replace all
commandLinks with commandButtons, or only users with JavaScript enabled to
access their site? What strategy do some of you use with regards to users
out there who don't enable JavaScript (which isn't as small a number as I
would've thought)



craigmcc wrote:

On 12/21/06, lightbulb432 <[EMAIL PROTECTED]> wrote:


Why does JSF always use JavaScript to submit a form rather than through
the
regular method of form submission?


That only happens for a commandLink component (i.e. a hyperlink that is to
submit a form).  If you use a commandButton component, no JavaScript is
needed.

Is your entire JSF web application useless for clients that have
JavaScript

turned off?


Only for hyperlinks.  If you can describe a way to have a hyperlink submit
a
form, without Javascript being enabled, we would love to hear it.

Craig








Re: f:validateDoubleRange

2007-02-21 Thread Michał 'Gandalf' Stawicki

Thanks for idea, I've came up with



Now, the problem is, that when I enter for. ex. 0,11 it returns
Double, but when i enter 0,0 it returns Long. Is there a way of making
it return Double in all cases, or should I create setters for both
Double and Long?

best regards,
michael

On 21/02/07, Matthias Wessendorf <[EMAIL PROTECTED]> wrote:

use a numberConverter

the buildin doubleConverter does
(javax.faces.convert.DoubleCoinverte)

Double.valueOf(string)

the string needs to contain a "." instead of ","

-M

On 2/21/07, Michał 'Gandalf' Stawicki <[EMAIL PROTECTED]> wrote:
> Hello,
>
> is there a way to make f:validateDoubleRange validate ',' (comma)
> instead of '.' (dot) as decimal separator? I have already set f:view
> locale and did
>
> FacesContext fc = FacesContext.getCurrentInstance();
> fc.getViewRoot().setLocale(new Locale("pl", "PL"));
>
> am I missing something, or does validator only accept '.'?
>
> Regards,
> michael
>
> --
> [EMAIL PROTECTED]
> http://stawicki.jasliska.pl
> GG: 369
> JID: [EMAIL PROTECTED]
>


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

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




--
[EMAIL PROTECTED]
http://stawicki.jasliska.pl
GG: 369
JID: [EMAIL PROTECTED]


Re: Facelets support for a Tomahawk dataTable trick?

2007-02-21 Thread Jeff Bischoff

Alright Mike, I'll give it a shot.

Mike Kienenberger wrote:

No, you can fix the jsp tag handler (and/or JSFAttr constants) without
changing backwards compatibility.

What would break is facelets code workarounds like the following.


org.apache.myfaces.dataTable.ROW_STYLECLASS="#{dataTableBacking.selectedRowIndex 


==  rowIndex ? 'highlightRow' : null}"
rowIndexVar="rowIndex" .../>

The fix to insure backward compatibility would be to check if
"org.apache.myfaces.dataTable.ROW_STYLECLASS" was defined as a generic
attribute and to use that if no "rowStyleClass" value is present.

So a complete fix is to change JSFAttr.ROW_STYLECLASS to
"rowStyleClass" and then to add in Tomahawk-47-esque backward
compatiblity fallback/warning.

On 2/21/07, Jeff Bischoff <[EMAIL PROTECTED]> wrote:

Ooh... I see now how the tag handler is placing the value there and
Facelets is not. Its not the renderer itself that expects the value to
be there, but the HtmlDataTable class itself. (Which is called during
rendering, so equivalent).

Thanks, Mike.

So, in order to fix but still maintain backwards compatibility, I need
to have the JSP tag handler place the value in both locations, right?
And then have HtmlDataTable check both locations? Your comment on
TOMAHAWK-47 has code for doing the latter (for showNav). Is that all I
need, or both? I don't want to break anything with this "fix".

Regards,

Jeff Bischoff
Kenneth L Kurz & Associates, Inc.

Mike Kienenberger wrote:
> Yes, the problem is that JSFAttr.ROW_STYLECLASS_ATTR =
> "org.apache.myfaces.dataTable.ROW_STYLECLASS" instead of
> "rowStyleClass"
>
> Thus, jsp saves "rowStyleClass" tag values under
> "org.apache.myfaces.dataTable.ROW_STYLECLASS" while facelets stores
> them under "rowStyleClass".
>
> http://issues.apache.org/jira/browse/TOMAHAWK-523
> http://issues.apache.org/jira/browse/TOMAHAWK-35
>
> Again, if the tag file were calling the concrete getters and setters,
> there'd be no problem.  But it's storing this value as a generic
> attribute.
>
> Note also that your patch will have to provide backward compatiblity
> as per my comment at the end of this issue:
>
> http://issues.apache.org/jira/browse/TOMAHAWK-47
>
> This does show what the workaround is, though.
> Use this in your page code:
>
> > 
org.apache.myfaces.dataTable.ROW_STYLECLASS="#{tableData.selectedRowIndex

> == rowIndex ? 'highlightRow' : null}" value=>
>
> It'd probably be good to get this in the facelets wiki for all of the
> fully-qualified (or oddly-named) attributes listed in
> org.apache.myfaces.renderkit.JSFAttr.
>
> On 2/21/07, Jeff Bischoff <[EMAIL PROTECTED]> wrote:
>> I have found the difference in behaviour between Facelets and JSP to
>> stem from different results in code from the following class:
>>
>> org.apache.myfaces.component.html.ext.HtmlDataTable
>>
>> In the method getRowStyleClass(), the following line is called:
>>
>> ValueBinding vb = getValueBinding(JSFAttr.ROW_STYLECLASS_ATTR);
>>
>>
>> In JSP, this results in a valuebinding with the String that I set 
(e.g.

>> #{tableData.selectedRowIndex == rowIndex ? 'highlightRow' : null}).
>>
>> In JSP, this valuebinding correctly returns either 'highlightRow' or
>> 'null' as the value.
>>
>> In Facelets, this valuebinding is null.
>>
>> Okay, why would this valuebinding be null in Facelets? I could have
>> understood it failing to properly evaluate the valuebinding due to 
some
>> missing variable like "rowIndex", but to have the entire expression 
null?

>>
>> Anybody got any ideas? I'm guessing this has something to do with
>> Facelets having a different EL implementation?
>>
>> Regards,
>>
>> Jeff Bischoff
>> Kenneth L Kurz & Associates, Inc.
>>
>> Jeff Bischoff wrote:
>> > I'll resume looking at this next week.
>> >
>> > I have some clues from putting debugging output into the source and
>> > building locally. I need more time to assess it.
>> >
>> > So far, I don't see evidence to support your hunch. The tag handler
>> > really isn't doing anything special, just a simple:
>> >
>> > setStringProperty(component, JSFAttr.ROW_STYLECLASS_ATTR,
>> _rowStyleClass);
>> >
>> > We'll see, I need to look at it more. I think though, my problem 
may be

>> > that "rowIndexVar" doesn't get set in time.
>> >
>> > Regards,
>> >
>> > Jeff Bischoff
>> > Kenneth L Kurz & Associates, Inc.
>> >
>> > Jeff Bischoff wrote:
>> >> Thanks for the assessment Mike. Fortunately I did just finish
>> >> converting the last few pages of my application to facelets, so
>> >> hopefully I'll have time to give it a shot next week. I'm going to
>> >> spend the next half hour or so looking into this issue, for 
starters.

>> >>
>> >> This is not a huge thing, but it's really the only thing that 
"broke"

>> >> when switching to facelets. So I'd really like to knock it off.
>> >>
>> >> Mike Kienenberger wrote:
>> >>  > Jeff,
>> >>  >
>> >>  > This is really straight-forward stuff.   Two hours should be
>> more than
>> >>  > sufficient.
>> >>  > I'd gues

Re: MyFaces and valueChangeListener??

2007-02-21 Thread Simon Kitching

Julien Martin wrote:

Hello,

I have several components in my jsf page each having a valuechangelistener
attribute and each attribute having a corresponding  methods in my backing
bean.

public void attributeAChanged(ValueChangeEvent evt){

public void attributeBChanged(ValueChangeEvent evt){

in the jsp:

valueChangeListener="#{PopulateListsBean.attributeAChanged}"
valueChangeListener="#{PopulateListsBean.attributeBChanged}"


Does anyone know why the first declared method is always called even if
attributeB is changed??

I was not able to find anywhere in the spec anything related to that.

Can anyone help?


This sure looks like a bug to me; I can't see anything wrong with your 
code. Multiple valueChangeListener methods should be supported AFAIK. I 
presume you are checking which methods are called by logging output in 
each one, or using breakpoints?


By the way, in a later email you give this code:
> ***
>  public void contractCodeChanged(ValueChangeEvent evt){
> log.info("contractCodeChanged");
> this.contractCode = (String) evt.getNewValue();
> }

Updating the model from a value-changed-event is probably not a good 
idea. These callbacks get executed at the end of the validation phase, 
and are run even if validation failures have occurred on other 
components. Therefore if a validation failure has occurred then the 
value-change-listener method is called but the model is never updated 
from other components.


Note also that you have:
so during the update phase the contractCode field will be updated by the 
component, ie your contractCodeChanged method's change to that property 
will be very brief. Of course in this case you're just assigning the 
final value a bit early (for some reason) so in this case a value X is 
being overwritten with value X.


And finally, if there *is* a validation failure then the selectOneMenu 
component will re-render itself using the value cached in the model 
rather than fetching from the model.


Regards,

Simon



Re: Facelets support for a Tomahawk dataTable trick?

2007-02-21 Thread Mike Kienenberger

No, you can fix the jsp tag handler (and/or JSFAttr constants) without
changing backwards compatibility.

What would break is facelets code workarounds like the following.



The fix to insure backward compatibility would be to check if
"org.apache.myfaces.dataTable.ROW_STYLECLASS" was defined as a generic
attribute and to use that if no "rowStyleClass" value is present.

So a complete fix is to change JSFAttr.ROW_STYLECLASS to
"rowStyleClass" and then to add in Tomahawk-47-esque backward
compatiblity fallback/warning.

On 2/21/07, Jeff Bischoff <[EMAIL PROTECTED]> wrote:

Ooh... I see now how the tag handler is placing the value there and
Facelets is not. Its not the renderer itself that expects the value to
be there, but the HtmlDataTable class itself. (Which is called during
rendering, so equivalent).

Thanks, Mike.

So, in order to fix but still maintain backwards compatibility, I need
to have the JSP tag handler place the value in both locations, right?
And then have HtmlDataTable check both locations? Your comment on
TOMAHAWK-47 has code for doing the latter (for showNav). Is that all I
need, or both? I don't want to break anything with this "fix".

Regards,

Jeff Bischoff
Kenneth L Kurz & Associates, Inc.

Mike Kienenberger wrote:
> Yes, the problem is that JSFAttr.ROW_STYLECLASS_ATTR =
> "org.apache.myfaces.dataTable.ROW_STYLECLASS" instead of
> "rowStyleClass"
>
> Thus, jsp saves "rowStyleClass" tag values under
> "org.apache.myfaces.dataTable.ROW_STYLECLASS" while facelets stores
> them under "rowStyleClass".
>
> http://issues.apache.org/jira/browse/TOMAHAWK-523
> http://issues.apache.org/jira/browse/TOMAHAWK-35
>
> Again, if the tag file were calling the concrete getters and setters,
> there'd be no problem.  But it's storing this value as a generic
> attribute.
>
> Note also that your patch will have to provide backward compatiblity
> as per my comment at the end of this issue:
>
> http://issues.apache.org/jira/browse/TOMAHAWK-47
>
> This does show what the workaround is, though.
> Use this in your page code:
>
>  org.apache.myfaces.dataTable.ROW_STYLECLASS="#{tableData.selectedRowIndex
> == rowIndex ? 'highlightRow' : null}" value=>
>
> It'd probably be good to get this in the facelets wiki for all of the
> fully-qualified (or oddly-named) attributes listed in
> org.apache.myfaces.renderkit.JSFAttr.
>
> On 2/21/07, Jeff Bischoff <[EMAIL PROTECTED]> wrote:
>> I have found the difference in behaviour between Facelets and JSP to
>> stem from different results in code from the following class:
>>
>> org.apache.myfaces.component.html.ext.HtmlDataTable
>>
>> In the method getRowStyleClass(), the following line is called:
>>
>> ValueBinding vb = getValueBinding(JSFAttr.ROW_STYLECLASS_ATTR);
>>
>>
>> In JSP, this results in a valuebinding with the String that I set (e.g.
>> #{tableData.selectedRowIndex == rowIndex ? 'highlightRow' : null}).
>>
>> In JSP, this valuebinding correctly returns either 'highlightRow' or
>> 'null' as the value.
>>
>> In Facelets, this valuebinding is null.
>>
>> Okay, why would this valuebinding be null in Facelets? I could have
>> understood it failing to properly evaluate the valuebinding due to some
>> missing variable like "rowIndex", but to have the entire expression null?
>>
>> Anybody got any ideas? I'm guessing this has something to do with
>> Facelets having a different EL implementation?
>>
>> Regards,
>>
>> Jeff Bischoff
>> Kenneth L Kurz & Associates, Inc.
>>
>> Jeff Bischoff wrote:
>> > I'll resume looking at this next week.
>> >
>> > I have some clues from putting debugging output into the source and
>> > building locally. I need more time to assess it.
>> >
>> > So far, I don't see evidence to support your hunch. The tag handler
>> > really isn't doing anything special, just a simple:
>> >
>> > setStringProperty(component, JSFAttr.ROW_STYLECLASS_ATTR,
>> _rowStyleClass);
>> >
>> > We'll see, I need to look at it more. I think though, my problem may be
>> > that "rowIndexVar" doesn't get set in time.
>> >
>> > Regards,
>> >
>> > Jeff Bischoff
>> > Kenneth L Kurz & Associates, Inc.
>> >
>> > Jeff Bischoff wrote:
>> >> Thanks for the assessment Mike. Fortunately I did just finish
>> >> converting the last few pages of my application to facelets, so
>> >> hopefully I'll have time to give it a shot next week. I'm going to
>> >> spend the next half hour or so looking into this issue, for starters.
>> >>
>> >> This is not a huge thing, but it's really the only thing that "broke"
>> >> when switching to facelets. So I'd really like to knock it off.
>> >>
>> >> Mike Kienenberger wrote:
>> >>  > Jeff,
>> >>  >
>> >>  > This is really straight-forward stuff.   Two hours should be
>> more than
>> >>  > sufficient.
>> >>  > I'd guess it'd take about 5 minutes to cut&paste a similar
>> >>  > getter/setter pair, then replace the attribute name with the new
>> >>  > attribute name.
>> >>  >
>> >>  > The less-obvious part is going to be going into the renderer and
>> 

Re: [Solved] Why does JSF submit through JavaScript?

2007-02-21 Thread lightbulb432

I see, so what do developers of JSF applications generally do - replace all
commandLinks with commandButtons, or only users with JavaScript enabled to
access their site? What strategy do some of you use with regards to users
out there who don't enable JavaScript (which isn't as small a number as I
would've thought)



craigmcc wrote:
> 
> On 12/21/06, lightbulb432 <[EMAIL PROTECTED]> wrote:
>>
>>
>> Why does JSF always use JavaScript to submit a form rather than through
>> the
>> regular method of form submission?
> 
> 
> That only happens for a commandLink component (i.e. a hyperlink that is to
> submit a form).  If you use a commandButton component, no JavaScript is
> needed.
> 
> Is your entire JSF web application useless for clients that have
> JavaScript
>> turned off?
> 
> 
> Only for hyperlinks.  If you can describe a way to have a hyperlink submit
> a
> form, without Javascript being enabled, we would love to hear it.
> 
> Craig
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Why-does-JSF-submit-through-JavaScript--tf2864473.html#a9088641
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Re: Facelets support for a Tomahawk dataTable trick?

2007-02-21 Thread Jeff Bischoff
Ooh... I see now how the tag handler is placing the value there and 
Facelets is not. Its not the renderer itself that expects the value to 
be there, but the HtmlDataTable class itself. (Which is called during 
rendering, so equivalent).


Thanks, Mike.

So, in order to fix but still maintain backwards compatibility, I need 
to have the JSP tag handler place the value in both locations, right? 
And then have HtmlDataTable check both locations? Your comment on 
TOMAHAWK-47 has code for doing the latter (for showNav). Is that all I 
need, or both? I don't want to break anything with this "fix".


Regards,

Jeff Bischoff
Kenneth L Kurz & Associates, Inc.

Mike Kienenberger wrote:

Yes, the problem is that JSFAttr.ROW_STYLECLASS_ATTR =
"org.apache.myfaces.dataTable.ROW_STYLECLASS" instead of
"rowStyleClass"

Thus, jsp saves "rowStyleClass" tag values under
"org.apache.myfaces.dataTable.ROW_STYLECLASS" while facelets stores
them under "rowStyleClass".

http://issues.apache.org/jira/browse/TOMAHAWK-523
http://issues.apache.org/jira/browse/TOMAHAWK-35

Again, if the tag file were calling the concrete getters and setters,
there'd be no problem.  But it's storing this value as a generic
attribute.

Note also that your patch will have to provide backward compatiblity
as per my comment at the end of this issue:

http://issues.apache.org/jira/browse/TOMAHAWK-47

This does show what the workaround is, though.
Use this in your page code:



It'd probably be good to get this in the facelets wiki for all of the
fully-qualified (or oddly-named) attributes listed in
org.apache.myfaces.renderkit.JSFAttr.

On 2/21/07, Jeff Bischoff <[EMAIL PROTECTED]> wrote:

I have found the difference in behaviour between Facelets and JSP to
stem from different results in code from the following class:

org.apache.myfaces.component.html.ext.HtmlDataTable

In the method getRowStyleClass(), the following line is called:

ValueBinding vb = getValueBinding(JSFAttr.ROW_STYLECLASS_ATTR);


In JSP, this results in a valuebinding with the String that I set (e.g.
#{tableData.selectedRowIndex == rowIndex ? 'highlightRow' : null}).

In JSP, this valuebinding correctly returns either 'highlightRow' or
'null' as the value.

In Facelets, this valuebinding is null.

Okay, why would this valuebinding be null in Facelets? I could have
understood it failing to properly evaluate the valuebinding due to some
missing variable like "rowIndex", but to have the entire expression null?

Anybody got any ideas? I'm guessing this has something to do with
Facelets having a different EL implementation?

Regards,

Jeff Bischoff
Kenneth L Kurz & Associates, Inc.

Jeff Bischoff wrote:
> I'll resume looking at this next week.
>
> I have some clues from putting debugging output into the source and
> building locally. I need more time to assess it.
>
> So far, I don't see evidence to support your hunch. The tag handler
> really isn't doing anything special, just a simple:
>
> setStringProperty(component, JSFAttr.ROW_STYLECLASS_ATTR, 
_rowStyleClass);

>
> We'll see, I need to look at it more. I think though, my problem may be
> that "rowIndexVar" doesn't get set in time.
>
> Regards,
>
> Jeff Bischoff
> Kenneth L Kurz & Associates, Inc.
>
> Jeff Bischoff wrote:
>> Thanks for the assessment Mike. Fortunately I did just finish
>> converting the last few pages of my application to facelets, so
>> hopefully I'll have time to give it a shot next week. I'm going to
>> spend the next half hour or so looking into this issue, for starters.
>>
>> This is not a huge thing, but it's really the only thing that "broke"
>> when switching to facelets. So I'd really like to knock it off.
>>
>> Mike Kienenberger wrote:
>>  > Jeff,
>>  >
>>  > This is really straight-forward stuff.   Two hours should be 
more than

>>  > sufficient.
>>  > I'd guess it'd take about 5 minutes to cut&paste a similar
>>  > getter/setter pair, then replace the attribute name with the new
>>  > attribute name.
>>  >
>>  > The less-obvious part is going to be going into the renderer and
>>  > changing the references to the generic attribute (map entry) into a
>>  > concrete method call.
>>  >
>>  > The longest part is going to be testing the changes.
>>  >
>>  > On 2/15/07, Jeff Bischoff <[EMAIL PROTECTED]> wrote:
>>  >> (I've moved this thread to the myfaces-users list, due to it being
>>  >> identified as a Tomahawk bug)
>>  >>
>>  >> Heh, Mike do you ever get tired of answering my questions? ;)
>>  >>
>>  >> I looked through MyFaces JIRA, and the closest issue I found was
>>  >> TOMAHAWK-523. The only difference is that they were trying to 
use EL

>>  >> based off the "var" attribute, whereas I am attempting to use the
>>  >> "rowIndexVar". However, this might be the same issue.
>>  >>
>>  >> That issue is marked "patch available", but there are no files
>> attached.
>>  >> I see that one of your comments on the thread indicates that the
>> patch
>>  >> provided wasn't sufficient... There were also user comme

Re: Facelets support for a Tomahawk dataTable trick?

2007-02-21 Thread Mike Kienenberger

And as usual, the info for dealing with rowStyleClass is already on
http://wiki.apache.org/myfaces/Use_Facelets_with_Tomahawk, courtesy of
Andrew Robinson, complete with a facelets tag handler that works
around the issues without changing the tomahawk code.

But it'd sure be nice if it were fixed in the tomahawk source since we
keep revisiting it.



On 2/21/07, Mike Kienenberger <[EMAIL PROTECTED]> wrote:

Yes, the problem is that JSFAttr.ROW_STYLECLASS_ATTR =
"org.apache.myfaces.dataTable.ROW_STYLECLASS" instead of
"rowStyleClass"

Thus, jsp saves "rowStyleClass" tag values under
"org.apache.myfaces.dataTable.ROW_STYLECLASS" while facelets stores
them under "rowStyleClass".

http://issues.apache.org/jira/browse/TOMAHAWK-523
http://issues.apache.org/jira/browse/TOMAHAWK-35

Again, if the tag file were calling the concrete getters and setters,
there'd be no problem.  But it's storing this value as a generic
attribute.

Note also that your patch will have to provide backward compatiblity
as per my comment at the end of this issue:

http://issues.apache.org/jira/browse/TOMAHAWK-47

This does show what the workaround is, though.
Use this in your page code:



It'd probably be good to get this in the facelets wiki for all of the
fully-qualified (or oddly-named) attributes listed in
org.apache.myfaces.renderkit.JSFAttr.

On 2/21/07, Jeff Bischoff <[EMAIL PROTECTED]> wrote:
> I have found the difference in behaviour between Facelets and JSP to
> stem from different results in code from the following class:
>
> org.apache.myfaces.component.html.ext.HtmlDataTable
>
> In the method getRowStyleClass(), the following line is called:
>
> ValueBinding vb = getValueBinding(JSFAttr.ROW_STYLECLASS_ATTR);
>
>
> In JSP, this results in a valuebinding with the String that I set (e.g.
> #{tableData.selectedRowIndex == rowIndex ? 'highlightRow' : null}).
>
> In JSP, this valuebinding correctly returns either 'highlightRow' or
> 'null' as the value.
>
> In Facelets, this valuebinding is null.
>
> Okay, why would this valuebinding be null in Facelets? I could have
> understood it failing to properly evaluate the valuebinding due to some
> missing variable like "rowIndex", but to have the entire expression null?
>
> Anybody got any ideas? I'm guessing this has something to do with
> Facelets having a different EL implementation?
>
> Regards,
>
> Jeff Bischoff
> Kenneth L Kurz & Associates, Inc.
>
> Jeff Bischoff wrote:
> > I'll resume looking at this next week.
> >
> > I have some clues from putting debugging output into the source and
> > building locally. I need more time to assess it.
> >
> > So far, I don't see evidence to support your hunch. The tag handler
> > really isn't doing anything special, just a simple:
> >
> > setStringProperty(component, JSFAttr.ROW_STYLECLASS_ATTR, _rowStyleClass);
> >
> > We'll see, I need to look at it more. I think though, my problem may be
> > that "rowIndexVar" doesn't get set in time.
> >
> > Regards,
> >
> > Jeff Bischoff
> > Kenneth L Kurz & Associates, Inc.
> >
> > Jeff Bischoff wrote:
> >> Thanks for the assessment Mike. Fortunately I did just finish
> >> converting the last few pages of my application to facelets, so
> >> hopefully I'll have time to give it a shot next week. I'm going to
> >> spend the next half hour or so looking into this issue, for starters.
> >>
> >> This is not a huge thing, but it's really the only thing that "broke"
> >> when switching to facelets. So I'd really like to knock it off.
> >>
> >> Mike Kienenberger wrote:
> >>  > Jeff,
> >>  >
> >>  > This is really straight-forward stuff.   Two hours should be more than
> >>  > sufficient.
> >>  > I'd guess it'd take about 5 minutes to cut&paste a similar
> >>  > getter/setter pair, then replace the attribute name with the new
> >>  > attribute name.
> >>  >
> >>  > The less-obvious part is going to be going into the renderer and
> >>  > changing the references to the generic attribute (map entry) into a
> >>  > concrete method call.
> >>  >
> >>  > The longest part is going to be testing the changes.
> >>  >
> >>  > On 2/15/07, Jeff Bischoff <[EMAIL PROTECTED]> wrote:
> >>  >> (I've moved this thread to the myfaces-users list, due to it being
> >>  >> identified as a Tomahawk bug)
> >>  >>
> >>  >> Heh, Mike do you ever get tired of answering my questions? ;)
> >>  >>
> >>  >> I looked through MyFaces JIRA, and the closest issue I found was
> >>  >> TOMAHAWK-523. The only difference is that they were trying to use EL
> >>  >> based off the "var" attribute, whereas I am attempting to use the
> >>  >> "rowIndexVar". However, this might be the same issue.
> >>  >>
> >>  >> That issue is marked "patch available", but there are no files
> >> attached.
> >>  >> I see that one of your comments on the thread indicates that the
> >> patch
> >>  >> provided wasn't sufficient... There were also user comments there
> >> about
> >>  >> it affecting non-facelets, or being fixed in the trunk - both
> >> statements
> >>  >> whic

Re: Facelets support for a Tomahawk dataTable trick?

2007-02-21 Thread Jeff Bischoff

Ha ha ha, will do

Mike Kienenberger wrote:

Ugh.  Gmail was a little deceptive about whether it was really sending
my message.   In any case, the content got better each try, so read
the 3rd one and ignore the other two :-)





Re: Facelets support for a Tomahawk dataTable trick?

2007-02-21 Thread Mike Kienenberger

Ugh.  Gmail was a little deceptive about whether it was really sending
my message.   In any case, the content got better each try, so read
the 3rd one and ignore the other two :-)

On 2/21/07, Mike Kienenberger <[EMAIL PROTECTED]> wrote:

Yes, the problem is that JSFAttr.ROW_STYLECLASS_ATTR =
"org.apache.myfaces.dataTable.ROW_STYLECLASS" instead of
"rowStyleClass"

Thus, jsp saves "rowStyleClass" tag values under
"org.apache.myfaces.dataTable.ROW_STYLECLASS" while facelets stores
them under "rowStyleClass".

http://issues.apache.org/jira/browse/TOMAHAWK-523
http://issues.apache.org/jira/browse/TOMAHAWK-35

Again, if the tag file were calling the concrete getters and setters,
there'd be no problem.  But it's storing this value as a generic
attribute.

Note also that your patch will have to provide backward compatiblity
as per my comment at the end of this issue:

http://issues.apache.org/jira/browse/TOMAHAWK-47

This does show what the workaround is, though.
Use this in your page code:



It'd probably be good to get this in the facelets wiki for all of the
fully-qualified (or oddly-named) attributes listed in
org.apache.myfaces.renderkit.JSFAttr.

On 2/21/07, Jeff Bischoff <[EMAIL PROTECTED]> wrote:
> I have found the difference in behaviour between Facelets and JSP to
> stem from different results in code from the following class:
>
> org.apache.myfaces.component.html.ext.HtmlDataTable
>
> In the method getRowStyleClass(), the following line is called:
>
> ValueBinding vb = getValueBinding(JSFAttr.ROW_STYLECLASS_ATTR);
>
>
> In JSP, this results in a valuebinding with the String that I set (e.g.
> #{tableData.selectedRowIndex == rowIndex ? 'highlightRow' : null}).
>
> In JSP, this valuebinding correctly returns either 'highlightRow' or
> 'null' as the value.
>
> In Facelets, this valuebinding is null.
>
> Okay, why would this valuebinding be null in Facelets? I could have
> understood it failing to properly evaluate the valuebinding due to some
> missing variable like "rowIndex", but to have the entire expression null?
>
> Anybody got any ideas? I'm guessing this has something to do with
> Facelets having a different EL implementation?
>
> Regards,
>
> Jeff Bischoff
> Kenneth L Kurz & Associates, Inc.
>
> Jeff Bischoff wrote:
> > I'll resume looking at this next week.
> >
> > I have some clues from putting debugging output into the source and
> > building locally. I need more time to assess it.
> >
> > So far, I don't see evidence to support your hunch. The tag handler
> > really isn't doing anything special, just a simple:
> >
> > setStringProperty(component, JSFAttr.ROW_STYLECLASS_ATTR, _rowStyleClass);
> >
> > We'll see, I need to look at it more. I think though, my problem may be
> > that "rowIndexVar" doesn't get set in time.
> >
> > Regards,
> >
> > Jeff Bischoff
> > Kenneth L Kurz & Associates, Inc.
> >
> > Jeff Bischoff wrote:
> >> Thanks for the assessment Mike. Fortunately I did just finish
> >> converting the last few pages of my application to facelets, so
> >> hopefully I'll have time to give it a shot next week. I'm going to
> >> spend the next half hour or so looking into this issue, for starters.
> >>
> >> This is not a huge thing, but it's really the only thing that "broke"
> >> when switching to facelets. So I'd really like to knock it off.
> >>
> >> Mike Kienenberger wrote:
> >>  > Jeff,
> >>  >
> >>  > This is really straight-forward stuff.   Two hours should be more than
> >>  > sufficient.
> >>  > I'd guess it'd take about 5 minutes to cut&paste a similar
> >>  > getter/setter pair, then replace the attribute name with the new
> >>  > attribute name.
> >>  >
> >>  > The less-obvious part is going to be going into the renderer and
> >>  > changing the references to the generic attribute (map entry) into a
> >>  > concrete method call.
> >>  >
> >>  > The longest part is going to be testing the changes.
> >>  >
> >>  > On 2/15/07, Jeff Bischoff <[EMAIL PROTECTED]> wrote:
> >>  >> (I've moved this thread to the myfaces-users list, due to it being
> >>  >> identified as a Tomahawk bug)
> >>  >>
> >>  >> Heh, Mike do you ever get tired of answering my questions? ;)
> >>  >>
> >>  >> I looked through MyFaces JIRA, and the closest issue I found was
> >>  >> TOMAHAWK-523. The only difference is that they were trying to use EL
> >>  >> based off the "var" attribute, whereas I am attempting to use the
> >>  >> "rowIndexVar". However, this might be the same issue.
> >>  >>
> >>  >> That issue is marked "patch available", but there are no files
> >> attached.
> >>  >> I see that one of your comments on the thread indicates that the
> >> patch
> >>  >> provided wasn't sufficient... There were also user comments there
> >> about
> >>  >> it affecting non-facelets, or being fixed in the trunk - both
> >> statements
> >>  >> which are definately not true for my issue.
> >>  >>
> >>  >> How involved do you think the fix for this would be? Could it be
> >> coded
> >>  >> in a couple of hours? Should 

Re: Facelets support for a Tomahawk dataTable trick?

2007-02-21 Thread Mike Kienenberger

Yes, the problem is that JSFAttr.ROW_STYLECLASS_ATTR =
"org.apache.myfaces.dataTable.ROW_STYLECLASS" instead of
"rowStyleClass"

Thus, jsp saves "rowStyleClass" tag values under
"org.apache.myfaces.dataTable.ROW_STYLECLASS" while facelets stores
them under "rowStyleClass".

http://issues.apache.org/jira/browse/TOMAHAWK-523
http://issues.apache.org/jira/browse/TOMAHAWK-35

Again, if the tag file were calling the concrete getters and setters,
there'd be no problem.  But it's storing this value as a generic
attribute.

Note also that your patch will have to provide backward compatiblity
as per my comment at the end of this issue:

http://issues.apache.org/jira/browse/TOMAHAWK-47

This does show what the workaround is, though.
Use this in your page code:



It'd probably be good to get this in the facelets wiki for all of the
fully-qualified (or oddly-named) attributes listed in
org.apache.myfaces.renderkit.JSFAttr.

On 2/21/07, Jeff Bischoff <[EMAIL PROTECTED]> wrote:

I have found the difference in behaviour between Facelets and JSP to
stem from different results in code from the following class:

org.apache.myfaces.component.html.ext.HtmlDataTable

In the method getRowStyleClass(), the following line is called:

ValueBinding vb = getValueBinding(JSFAttr.ROW_STYLECLASS_ATTR);


In JSP, this results in a valuebinding with the String that I set (e.g.
#{tableData.selectedRowIndex == rowIndex ? 'highlightRow' : null}).

In JSP, this valuebinding correctly returns either 'highlightRow' or
'null' as the value.

In Facelets, this valuebinding is null.

Okay, why would this valuebinding be null in Facelets? I could have
understood it failing to properly evaluate the valuebinding due to some
missing variable like "rowIndex", but to have the entire expression null?

Anybody got any ideas? I'm guessing this has something to do with
Facelets having a different EL implementation?

Regards,

Jeff Bischoff
Kenneth L Kurz & Associates, Inc.

Jeff Bischoff wrote:
> I'll resume looking at this next week.
>
> I have some clues from putting debugging output into the source and
> building locally. I need more time to assess it.
>
> So far, I don't see evidence to support your hunch. The tag handler
> really isn't doing anything special, just a simple:
>
> setStringProperty(component, JSFAttr.ROW_STYLECLASS_ATTR, _rowStyleClass);
>
> We'll see, I need to look at it more. I think though, my problem may be
> that "rowIndexVar" doesn't get set in time.
>
> Regards,
>
> Jeff Bischoff
> Kenneth L Kurz & Associates, Inc.
>
> Jeff Bischoff wrote:
>> Thanks for the assessment Mike. Fortunately I did just finish
>> converting the last few pages of my application to facelets, so
>> hopefully I'll have time to give it a shot next week. I'm going to
>> spend the next half hour or so looking into this issue, for starters.
>>
>> This is not a huge thing, but it's really the only thing that "broke"
>> when switching to facelets. So I'd really like to knock it off.
>>
>> Mike Kienenberger wrote:
>>  > Jeff,
>>  >
>>  > This is really straight-forward stuff.   Two hours should be more than
>>  > sufficient.
>>  > I'd guess it'd take about 5 minutes to cut&paste a similar
>>  > getter/setter pair, then replace the attribute name with the new
>>  > attribute name.
>>  >
>>  > The less-obvious part is going to be going into the renderer and
>>  > changing the references to the generic attribute (map entry) into a
>>  > concrete method call.
>>  >
>>  > The longest part is going to be testing the changes.
>>  >
>>  > On 2/15/07, Jeff Bischoff <[EMAIL PROTECTED]> wrote:
>>  >> (I've moved this thread to the myfaces-users list, due to it being
>>  >> identified as a Tomahawk bug)
>>  >>
>>  >> Heh, Mike do you ever get tired of answering my questions? ;)
>>  >>
>>  >> I looked through MyFaces JIRA, and the closest issue I found was
>>  >> TOMAHAWK-523. The only difference is that they were trying to use EL
>>  >> based off the "var" attribute, whereas I am attempting to use the
>>  >> "rowIndexVar". However, this might be the same issue.
>>  >>
>>  >> That issue is marked "patch available", but there are no files
>> attached.
>>  >> I see that one of your comments on the thread indicates that the
>> patch
>>  >> provided wasn't sufficient... There were also user comments there
>> about
>>  >> it affecting non-facelets, or being fixed in the trunk - both
>> statements
>>  >> which are definately not true for my issue.
>>  >>
>>  >> How involved do you think the fix for this would be? Could it be
>> coded
>>  >> in a couple of hours? Should I attempt to write a patch to fix this?
>>  >>
>>  >> [1] http://issues.apache.org/jira/browse/TOMAHAWK-523
>>  >>
>>  >> Mike Kienenberger wrote:
>>  >> > I think there are already bug reports open on this for Tomahawk,
>> but
>>  >> > you should make sure that this is the case, opening one if
>> necessary.
>>  >> >
>>  >> > My guess it that the jsp tag handler for t:dataTable is not using
>>  >> > standard pass-thr

Re: Facelets support for a Tomahawk dataTable trick?

2007-02-21 Thread Mike Kienenberger

Yes, the problem is that JSFAttr.ROW_STYLECLASS_ATTR =
"org.apache.myfaces.dataTable.ROW_STYLECLASS" instead of
"rowStyleClass"

Thus, jsp saves "rowStyleClass" tag values under
"org.apache.myfaces.dataTable.ROW_STYLECLASS" while facelets stores
them under "rowStyleClass".

http://issues.apache.org/jira/browse/TOMAHAWK-523

Again, if the tag file were calling the concrete getters and setters,
there'd be no problem.  But it's storing this value as a generic
attribute.

Note also that your patch will have to provide backward compatiblity
as per my comment at the end of this issue:

http://issues.apache.org/jira/browse/TOMAHAWK-47

This does show what the workaround is, though.
Use this in your page code:



It'd probably be good to get this in the facelets wiki for all of the
fully-qualified (or oddly-named) attributes listed in
org.apache.myfaces.renderkit.JSFAttr.

On 2/21/07, Jeff Bischoff <[EMAIL PROTECTED]> wrote:

I have found the difference in behaviour between Facelets and JSP to
stem from different results in code from the following class:

org.apache.myfaces.component.html.ext.HtmlDataTable

In the method getRowStyleClass(), the following line is called:

ValueBinding vb = getValueBinding(JSFAttr.ROW_STYLECLASS_ATTR);


In JSP, this results in a valuebinding with the String that I set (e.g.
#{tableData.selectedRowIndex == rowIndex ? 'highlightRow' : null}).

In JSP, this valuebinding correctly returns either 'highlightRow' or
'null' as the value.

In Facelets, this valuebinding is null.

Okay, why would this valuebinding be null in Facelets? I could have
understood it failing to properly evaluate the valuebinding due to some
missing variable like "rowIndex", but to have the entire expression null?

Anybody got any ideas? I'm guessing this has something to do with
Facelets having a different EL implementation?

Regards,

Jeff Bischoff
Kenneth L Kurz & Associates, Inc.

Jeff Bischoff wrote:
> I'll resume looking at this next week.
>
> I have some clues from putting debugging output into the source and
> building locally. I need more time to assess it.
>
> So far, I don't see evidence to support your hunch. The tag handler
> really isn't doing anything special, just a simple:
>
> setStringProperty(component, JSFAttr.ROW_STYLECLASS_ATTR, _rowStyleClass);
>
> We'll see, I need to look at it more. I think though, my problem may be
> that "rowIndexVar" doesn't get set in time.
>
> Regards,
>
> Jeff Bischoff
> Kenneth L Kurz & Associates, Inc.
>
> Jeff Bischoff wrote:
>> Thanks for the assessment Mike. Fortunately I did just finish
>> converting the last few pages of my application to facelets, so
>> hopefully I'll have time to give it a shot next week. I'm going to
>> spend the next half hour or so looking into this issue, for starters.
>>
>> This is not a huge thing, but it's really the only thing that "broke"
>> when switching to facelets. So I'd really like to knock it off.
>>
>> Mike Kienenberger wrote:
>>  > Jeff,
>>  >
>>  > This is really straight-forward stuff.   Two hours should be more than
>>  > sufficient.
>>  > I'd guess it'd take about 5 minutes to cut&paste a similar
>>  > getter/setter pair, then replace the attribute name with the new
>>  > attribute name.
>>  >
>>  > The less-obvious part is going to be going into the renderer and
>>  > changing the references to the generic attribute (map entry) into a
>>  > concrete method call.
>>  >
>>  > The longest part is going to be testing the changes.
>>  >
>>  > On 2/15/07, Jeff Bischoff <[EMAIL PROTECTED]> wrote:
>>  >> (I've moved this thread to the myfaces-users list, due to it being
>>  >> identified as a Tomahawk bug)
>>  >>
>>  >> Heh, Mike do you ever get tired of answering my questions? ;)
>>  >>
>>  >> I looked through MyFaces JIRA, and the closest issue I found was
>>  >> TOMAHAWK-523. The only difference is that they were trying to use EL
>>  >> based off the "var" attribute, whereas I am attempting to use the
>>  >> "rowIndexVar". However, this might be the same issue.
>>  >>
>>  >> That issue is marked "patch available", but there are no files
>> attached.
>>  >> I see that one of your comments on the thread indicates that the
>> patch
>>  >> provided wasn't sufficient... There were also user comments there
>> about
>>  >> it affecting non-facelets, or being fixed in the trunk - both
>> statements
>>  >> which are definately not true for my issue.
>>  >>
>>  >> How involved do you think the fix for this would be? Could it be
>> coded
>>  >> in a couple of hours? Should I attempt to write a patch to fix this?
>>  >>
>>  >> [1] http://issues.apache.org/jira/browse/TOMAHAWK-523
>>  >>
>>  >> Mike Kienenberger wrote:
>>  >> > I think there are already bug reports open on this for Tomahawk,
>> but
>>  >> > you should make sure that this is the case, opening one if
>> necessary.
>>  >> >
>>  >> > My guess it that the jsp tag handler for t:dataTable is not using
>>  >> > standard pass-through code to initialize the rowStyleClass
>> attr

Re: Facelets support for a Tomahawk dataTable trick?

2007-02-21 Thread Mike Kienenberger

Yes, the problem is that JSFAttr.ROW_STYLECLASS_ATTR =
"org.apache.myfaces.dataTable.ROW_STYLECLASS" instead of
"rowStyleClass"

Thus, jsp saves "rowStyleClass" tag values under
"org.apache.myfaces.dataTable.ROW_STYLECLASS" while facelets stores
them under "rowStyleClass".

http://issues.apache.org/jira/browse/TOMAHAWK-523

Again, if the tag file were calling the concrete getters and setters,
there'd be no problem.  But it's storing this value as a generic
attribute.

Note also that your patch will have to provide backward compatiblity
as per my comment at the end of this issue:

http://issues.apache.org/jira/browse/TOMAHAWK-47



On 2/21/07, Jeff Bischoff <[EMAIL PROTECTED]> wrote:

I have found the difference in behaviour between Facelets and JSP to
stem from different results in code from the following class:

org.apache.myfaces.component.html.ext.HtmlDataTable

In the method getRowStyleClass(), the following line is called:

ValueBinding vb = getValueBinding(JSFAttr.ROW_STYLECLASS_ATTR);


In JSP, this results in a valuebinding with the String that I set (e.g.
#{tableData.selectedRowIndex == rowIndex ? 'highlightRow' : null}).

In JSP, this valuebinding correctly returns either 'highlightRow' or
'null' as the value.

In Facelets, this valuebinding is null.

Okay, why would this valuebinding be null in Facelets? I could have
understood it failing to properly evaluate the valuebinding due to some
missing variable like "rowIndex", but to have the entire expression null?

Anybody got any ideas? I'm guessing this has something to do with
Facelets having a different EL implementation?

Regards,

Jeff Bischoff
Kenneth L Kurz & Associates, Inc.

Jeff Bischoff wrote:
> I'll resume looking at this next week.
>
> I have some clues from putting debugging output into the source and
> building locally. I need more time to assess it.
>
> So far, I don't see evidence to support your hunch. The tag handler
> really isn't doing anything special, just a simple:
>
> setStringProperty(component, JSFAttr.ROW_STYLECLASS_ATTR, _rowStyleClass);
>
> We'll see, I need to look at it more. I think though, my problem may be
> that "rowIndexVar" doesn't get set in time.
>
> Regards,
>
> Jeff Bischoff
> Kenneth L Kurz & Associates, Inc.
>
> Jeff Bischoff wrote:
>> Thanks for the assessment Mike. Fortunately I did just finish
>> converting the last few pages of my application to facelets, so
>> hopefully I'll have time to give it a shot next week. I'm going to
>> spend the next half hour or so looking into this issue, for starters.
>>
>> This is not a huge thing, but it's really the only thing that "broke"
>> when switching to facelets. So I'd really like to knock it off.
>>
>> Mike Kienenberger wrote:
>>  > Jeff,
>>  >
>>  > This is really straight-forward stuff.   Two hours should be more than
>>  > sufficient.
>>  > I'd guess it'd take about 5 minutes to cut&paste a similar
>>  > getter/setter pair, then replace the attribute name with the new
>>  > attribute name.
>>  >
>>  > The less-obvious part is going to be going into the renderer and
>>  > changing the references to the generic attribute (map entry) into a
>>  > concrete method call.
>>  >
>>  > The longest part is going to be testing the changes.
>>  >
>>  > On 2/15/07, Jeff Bischoff <[EMAIL PROTECTED]> wrote:
>>  >> (I've moved this thread to the myfaces-users list, due to it being
>>  >> identified as a Tomahawk bug)
>>  >>
>>  >> Heh, Mike do you ever get tired of answering my questions? ;)
>>  >>
>>  >> I looked through MyFaces JIRA, and the closest issue I found was
>>  >> TOMAHAWK-523. The only difference is that they were trying to use EL
>>  >> based off the "var" attribute, whereas I am attempting to use the
>>  >> "rowIndexVar". However, this might be the same issue.
>>  >>
>>  >> That issue is marked "patch available", but there are no files
>> attached.
>>  >> I see that one of your comments on the thread indicates that the
>> patch
>>  >> provided wasn't sufficient... There were also user comments there
>> about
>>  >> it affecting non-facelets, or being fixed in the trunk - both
>> statements
>>  >> which are definately not true for my issue.
>>  >>
>>  >> How involved do you think the fix for this would be? Could it be
>> coded
>>  >> in a couple of hours? Should I attempt to write a patch to fix this?
>>  >>
>>  >> [1] http://issues.apache.org/jira/browse/TOMAHAWK-523
>>  >>
>>  >> Mike Kienenberger wrote:
>>  >> > I think there are already bug reports open on this for Tomahawk,
>> but
>>  >> > you should make sure that this is the case, opening one if
>> necessary.
>>  >> >
>>  >> > My guess it that the jsp tag handler for t:dataTable is not using
>>  >> > standard pass-through code to initialize the rowStyleClass
>> attribute
>>  >> > on the t:dataTable component.
>>  >> >
>>  >> > The fix would be to rewrite the component and tag handler so
>> that the
>>  >> > tag handler isn't doing anything beyond passing the arguments
>> through
>>  >> > unchanged.
>

Re: MyFaces and valueChangeListener??

2007-02-21 Thread Andrew Robinson

valueChangeListener equates to "public MethodBinding
getValueChangeListener()" and "public void
getValueChangeListener(MethodBinding method)" on the "UIInput" class.
As you can see, it isn't an add/remove. The JSP tag class may be
different, but if you are using facelets, you can only have one value
change listener as an EL expression.

On 2/21/07, Julien Martin <[EMAIL PROTECTED]> wrote:

Hello Andrew,

I know what you mean but please have a look at that:
***
 public void contractCodeChanged(ValueChangeEvent evt){
log.info("contractCodeChanged");
this.contractCode = (String) evt.getNewValue();
}
***

The above code NEVER gets called by that:
*
valueChangeListener="#{
PopulateListsBean.contractCodeChanged}"
*

BECAUSE there are several value change listener methods in my bean.

What I find strange or even "flawed" is that MyFaces won't even find the
second listener method.

Any clue??

Julien.


Re: Facelets support for a Tomahawk dataTable trick?

2007-02-21 Thread Jeff Bischoff
I have found the difference in behaviour between Facelets and JSP to 
stem from different results in code from the following class:


org.apache.myfaces.component.html.ext.HtmlDataTable

In the method getRowStyleClass(), the following line is called:

ValueBinding vb = getValueBinding(JSFAttr.ROW_STYLECLASS_ATTR);


In JSP, this results in a valuebinding with the String that I set (e.g. 
#{tableData.selectedRowIndex == rowIndex ? 'highlightRow' : null}).


In JSP, this valuebinding correctly returns either 'highlightRow' or 
'null' as the value.


In Facelets, this valuebinding is null.

Okay, why would this valuebinding be null in Facelets? I could have 
understood it failing to properly evaluate the valuebinding due to some 
missing variable like "rowIndex", but to have the entire expression null?


Anybody got any ideas? I'm guessing this has something to do with 
Facelets having a different EL implementation?


Regards,

Jeff Bischoff
Kenneth L Kurz & Associates, Inc.

Jeff Bischoff wrote:

I'll resume looking at this next week.

I have some clues from putting debugging output into the source and 
building locally. I need more time to assess it.


So far, I don't see evidence to support your hunch. The tag handler 
really isn't doing anything special, just a simple:


setStringProperty(component, JSFAttr.ROW_STYLECLASS_ATTR, _rowStyleClass);

We'll see, I need to look at it more. I think though, my problem may be 
that "rowIndexVar" doesn't get set in time.


Regards,

Jeff Bischoff
Kenneth L Kurz & Associates, Inc.

Jeff Bischoff wrote:
Thanks for the assessment Mike. Fortunately I did just finish 
converting the last few pages of my application to facelets, so 
hopefully I'll have time to give it a shot next week. I'm going to 
spend the next half hour or so looking into this issue, for starters.


This is not a huge thing, but it's really the only thing that "broke" 
when switching to facelets. So I'd really like to knock it off.


Mike Kienenberger wrote:
 > Jeff,
 >
 > This is really straight-forward stuff.   Two hours should be more than
 > sufficient.
 > I'd guess it'd take about 5 minutes to cut&paste a similar
 > getter/setter pair, then replace the attribute name with the new
 > attribute name.
 >
 > The less-obvious part is going to be going into the renderer and
 > changing the references to the generic attribute (map entry) into a
 > concrete method call.
 >
 > The longest part is going to be testing the changes.
 >
 > On 2/15/07, Jeff Bischoff <[EMAIL PROTECTED]> wrote:
 >> (I've moved this thread to the myfaces-users list, due to it being
 >> identified as a Tomahawk bug)
 >>
 >> Heh, Mike do you ever get tired of answering my questions? ;)
 >>
 >> I looked through MyFaces JIRA, and the closest issue I found was
 >> TOMAHAWK-523. The only difference is that they were trying to use EL
 >> based off the "var" attribute, whereas I am attempting to use the
 >> "rowIndexVar". However, this might be the same issue.
 >>
 >> That issue is marked "patch available", but there are no files 
attached.
 >> I see that one of your comments on the thread indicates that the 
patch
 >> provided wasn't sufficient... There were also user comments there 
about
 >> it affecting non-facelets, or being fixed in the trunk - both 
statements

 >> which are definately not true for my issue.
 >>
 >> How involved do you think the fix for this would be? Could it be 
coded

 >> in a couple of hours? Should I attempt to write a patch to fix this?
 >>
 >> [1] http://issues.apache.org/jira/browse/TOMAHAWK-523
 >>
 >> Mike Kienenberger wrote:
 >> > I think there are already bug reports open on this for Tomahawk, 
but
 >> > you should make sure that this is the case, opening one if 
necessary.

 >> >
 >> > My guess it that the jsp tag handler for t:dataTable is not using
 >> > standard pass-through code to initialize the rowStyleClass 
attribute

 >> > on the t:dataTable component.
 >> >
 >> > The fix would be to rewrite the component and tag handler so 
that the
 >> > tag handler isn't doing anything beyond passing the arguments 
through

 >> > unchanged.
 >> >
 >> > On 2/15/07, Jeff Bischoff <[EMAIL PROTECTED]> wrote:
 >> >> Greetings,
 >> >>
 >> >> There is a CSS trick with the Tomahawk extended dataTable that 
allows
 >> >> the selected row to be highlighted (or some similar things). It 
works

 >> >> great in JSP, and has been passed around on the myfaces mailing
 >> list and
 >> >> wiki for some time. The trick goes something like this:
 >> >>
 >> >> > >> ...
 >> >> rowClasses="oddRow,evenRow"
 >> >> rowStyleClass="#{dataTableBacking.selectedRowIndex == 
rowIndex ?

 >> >> 'highlightRow' : null}"
 >> >> rowIndexVar="rowIndex"
 >> >> .../>
 >> >>
 >> >> Unfortunately, when I recently converted my application from 
JSP to
 >> >> Facelets, this trick no longer works. (Fortunately, this is one 
of the
 >> >> only things that stopped working!) I have heard from other 
users on

 >> the
 >> >> myfaces m

forceID for datatable rows

2007-02-21 Thread kal stevens

I am using a tool Selenium to write automated test cases

It uses the form ID and the ID of a link to navigate through the test case.

That works great with anything that is not in a table, but for table
elements I get something like the following "_idJsp49:_idJsp108:0:_idJsp123"

So I am wondering if there is a way to forceID on a row?

I know that there is "forceIdIndexFormula"  but that created something like
"_idJsp49:_idJsp108:PROFILE2314:_idJsp123", but the rest of the tags might
change.
So that would work great for me if the tag was something like
"${FormName}:PROFILE2314" where I can know in my testing code what the form
ID is exactly.

Is there a way to do this or something equivilent?

Thanks

Kal


Re: f:validateDoubleRange

2007-02-21 Thread Matthias Wessendorf

use a numberConverter

the buildin doubleConverter does
(javax.faces.convert.DoubleCoinverte)

Double.valueOf(string)

the string needs to contain a "." instead of ","

-M

On 2/21/07, Michał 'Gandalf' Stawicki <[EMAIL PROTECTED]> wrote:

Hello,

is there a way to make f:validateDoubleRange validate ',' (comma)
instead of '.' (dot) as decimal separator? I have already set f:view
locale and did

FacesContext fc = FacesContext.getCurrentInstance();
fc.getViewRoot().setLocale(new Locale("pl", "PL"));

am I missing something, or does validator only accept '.'?

Regards,
michael

--
[EMAIL PROTECTED]
http://stawicki.jasliska.pl
GG: 369
JID: [EMAIL PROTECTED]




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

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


f:validateDoubleRange

2007-02-21 Thread Michał 'Gandalf' Stawicki

Hello,

is there a way to make f:validateDoubleRange validate ',' (comma)
instead of '.' (dot) as decimal separator? I have already set f:view
locale and did

FacesContext fc = FacesContext.getCurrentInstance();
fc.getViewRoot().setLocale(new Locale("pl", "PL"));

am I missing something, or does validator only accept '.'?

Regards,
michael

--
[EMAIL PROTECTED]
http://stawicki.jasliska.pl
GG: 369
JID: [EMAIL PROTECTED]


Re: How to make Reusable JSP

2007-02-21 Thread Gary VanMatre
>From: [EMAIL PROTECTED] 
>Hi All,
>
>A) I have a common address JSP which i want to use it in several other Jsps.
>Having the content below and i want to set this address value in a common 
>AddressVO object(POJO).
>
>
>
>
>B) I want to use this data in another jsp in the following manner.
>
> 
> Enter Name : 
> Enter Profession :  value="#{pc_ClaimsDataBean.myVO.profession}" />
> 
> 
> 
> Enter TCN : 
> Enter Status :  /> 
> 
> 
> 
>  action="#{pc_ClaimsManageBean.save}" />
> 
>
>
>C) In my ClaimsManageBean I want to set the data in my ClaimsDataBean in the 
>follwoing manner
>
>ValueBinding bind1 = 
>fc.getApplication().createValueBinding("#{pc_ClaimsDataBean}");
>ClaimsDataBean iniVO = (ClaimsDataBean)bind1.getValue(fc); 
>ValueBinding bind2 = fc.getApplication().createValueBinding("#{pc_AddressVO}");
>AddressVO initVO = (AddressVO)bind2.getValue(fc); 
>iniVO.setAddVO(initVO);
>
>But this will give a problem , the last value set in the AddressVO will be set 
>in the DataBean i lose the previous value.
>Is there a way i can make a reusable jsp which can be used in other JSPs 
>several times.
>What are the other possible design strategies.
>

You can use Shale Clay to achieve this level of reuse [1].  Clay is an 
alternative templating solution that allows you to form JSF page composition 
using something other than JSP.
Clay can also be used within a JSP.  Clay has something called "symbols" that 
are a string substitution layer that is evaluated before a binding expression 
is created.  
There is a similar address example in the shale-clay-usecases [2].  
Consider a fragment from the JSP page [3]:  





   


The managedBeanName JSP tag attribute is a symbol.  Its value will be replaced 
within the binding expression. 
 
For example:

 
  
   
   
  
 
 
  
   
   
  
 
 
  
   
  

Within this set of component definitions, "@managed-bean-name" will be replaced 
with "rolodex.selectedContact.residentialAddress" or 
"rolodex.selectedContact.businessAddress".

Besides the symbol substitution layer, you also have visual inheritance similar 
to tiles.
In the JSP example above, the first use of Clay will include the addressPanel.  
The second includes the foreignAddressPanel.  

Lets first look at the addressPanel.

 
 
  
   
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
 

Next, the "foreignAddressPanel" extends the "addressPanel" adding the province 
and country data elements.

 
 
  
  
  
  
  
  
 


[1] http://shale.apache.org/shale-clay/index.html
[2] 
http://people.apache.org/builds/shale/nightly/examples/shale-clay-usecases-20070221.zip
[3] 
http://svn.apache.org/viewvc/shale/framework/trunk/shale-apps/shale-clay-usecases/src/main/webapp/rolodex/jsprolodex.jsp?view=markup

>Best Regards,
>Pallavi 

Gary

Re: [Tobago] global settings possible?

2007-02-21 Thread Michał 'Gandalf' Stawicki

Hello Udo,


* Write your own tag. Like InExtensionTag in Tobago.


Are there any examples of how it should be done, or should I look at
Tobago's sources? I did some search, but couldn't find anything
usefull.

Thanks,
michael

--
[EMAIL PROTECTED]
http://stawicki.jasliska.pl
GG: 369
JID: [EMAIL PROTECTED]


RE: Re: Re: How to cleanup an application scoped bean

2007-02-21 Thread H. Swaczinna
Ok, looks simple. Thank you.


>contextDestroyed(ServletContextEvent sce)
>{
>
> ServletContext servletCxt = sce.getServletContext()
> MyBean mb = (MyBean) servletCxt.getAttribute("nameOfTheManagedBean");
> mb.doIt();
>
>}
>
>On 2/21/07, H. Swaczinna <[EMAIL PROTECTED]> wrote:
>> Ok, but how can I access (find) the bean from such servletcontext
>> listener? There's no FacesContext at that time I think.
>>
>> Regards
>> Helmut
>>
>>
>> >you can use a servletcontext listener to do some cleanup on shutdown
>> >
>> >-M
>> >
>> >On 2/21/07, H. Swaczinna <[EMAIL PROTECTED]> wrote:
>> >> Hi,
>> >>
>> >> I have an application scoped bean and want to do some cleanup when
>> >> the application is shutdown (undeployed). Is there a way to register
>> >> the bean somehow with the application context like I can register a
>> >> session scoped bean with the session context?
>> >>
>> >> Regards
>> >> Helmut
>> >>
>> >
>> >
>> >--
>> >Matthias Wessendorf
>> >http://tinyurl.com/fmywh
>> >
>> >further stuff:
>> >blog: http://jroller.com/page/mwessendorf
>> >mail: mwessendorf-at-gmail-dot-com
>>
>
>
>-- 
>Matthias Wessendorf
>http://tinyurl.com/fmywh
>
>further stuff:
>blog: http://jroller.com/page/mwessendorf
>mail: mwessendorf-at-gmail-dot-com


Re: [ANNOUNCE] MyFaces Core v1.1.5 Release

2007-02-21 Thread Alexey Kakunin

Thank you! Looking forward for any usefull information.


2007/2/21, Jeff Bischoff <[EMAIL PROTECTED]>:


Alexey Kakunin wrote:
> Great news!
> Are any information about tomahawk & sandbox stable release available?
>

There will never be a "stable" release of sandbox. It is, by its nature,
unstable. Best you can do if you need to use a sandbox component in
production is check out the release branch of tomahawk + sandbox from
svn and build it locally using maven. This is much easier to do than it
sounds!

As for a Tomahawk release, I know that the Core release was blocking the
next Tomahawk release. So now this release clears the way, but the devs
still need to make some decisions such as whether to re-branch Tomahawk
to get newer code, etc. I will be watching the dev list to see if they
focus on pushing out a new release sometime soon. :)

Regards,

Jeff Bischoff
Kenneth L Kurz & Associates, Inc.






--
With Best Regards,
Alexey Kakunin, EmDev Limited

Professional Software Development:
http://www.emdev.ru


Re: Problem using PPR together with a tabbedPanel client side

2007-02-21 Thread Gerald Müllan

Hi,

the responded markup seems to be ok, PanelTabbedPane renders a hidden
input-submit, and on onclick-event it tries to change the tab to
another one on client side.

Normally, if ppr is activated on an element, it hooks into a click and
before doing the form-post it does its own ajax-submit. It seems that
in this case ppr also anticipating in any way, and activates a regular
form-post.

How do you have specified the "partialTriggers" attribute (or
partialTriggerPattern )?
Maybe it also aims the hidden tab-button.

cheers,

Gerald

On 2/21/07, Laurentiu Trica <[EMAIL PROTECTED]> wrote:

Hi Ernst

Sorry for not responding faster, but I had to switch from using tableSuggest
to inputSuggest and I hoped that won't be the same problem.

Unfortunately it is.
I checked the generated HTML and I found this for the tabbed panel.



<
tr class="myFaces_pannelTabbedPane_HeaderRow">
 <
input type="submit" name="ofamMainForm:_id115.0"
value="Details" onclick="return
myFaces_showPanelTab(0,'ofamMainForm:_id115_indexSubmit','ofamMainForm:tab1_headerCell','ofamMainForm:tab1',panelTabbedPane_5FofamMainForm_3A_5Fid115_5FHeadersIDs,panelTabbedPane_5FofamMainForm_3A_5Fid115_5FIDs,null,null,null,null);"
/>
 


  


  
  

  

  
  
  
  

  

And yes, the behaviour is the one you wrote in your reply.

Thank you in advance.


On 2/12/07, Ernst Fastl <[EMAIL PROTECTED]> wrote:
> Hi,
>
> So if I understood you correctly you are using a t:panelTabbedPane
> with serverSideTabSwitch="false" right?
> Inside you have a dropdown-menu which triggers a partial update
> of a contained panel group.
>
> If you do not touch the drop-down and click on a tab it stays on the
> client-side,
> but if you changed the dropdown value and afterwards click on a tab
> the page gets submitted?
>
> if that is the case, could you look into the generated HTML and tell
> what the onclick-Handlers of the Tab-buttons contain?
>
> regards
>
> Ernst
>
> On 2/12/07, Laurentiu Trica <[EMAIL PROTECTED]> wrote:
> > Hi
> >
> > I use a tabbedPanel on the client side and a PPRPanelGroup to update a
> > field.
> > The problem I encountered is when I change a combobox that triggers the
> > update of that field. It works fine. But then, when I want to change the
> > tab, even if it is on client side, the page is refreshed (the new tab is
> > indeed selected).
> >
> > Anyone encountered this problem before? Is it an issue? Or is there
> > something I am doing wrong?
> >
> > Thank you.
> >
> > --
> > Best regards,
> > Laurentiu
>



--
Best regards,
Laurentiu



--
http://www.irian.at

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

Professional Support for Apache MyFaces


Re: MyFaces and valueChangeListener??

2007-02-21 Thread Julien Martin

Hello Andrew,

I know what you mean but please have a look at that:
***
public void contractCodeChanged(ValueChangeEvent evt){
   log.info("contractCodeChanged");
   this.contractCode = (String) evt.getNewValue();
   }
***

The above code NEVER gets called by that:
*
valueChangeListener="#{PopulateListsBean.contractCodeChanged}"
*

BECAUSE there are several value change listener methods in my bean.

What I find strange or even "flawed" is that MyFaces won't even find the
second listener method.

Any clue??

Julien.


Re: MyFaces and valueChangeListener??

2007-02-21 Thread Andrew Robinson

The value change listener fires a change if the submitted value of the
UIInput component is different from the current value. It has nothing
to do with attributes, only the value of the UIInput.

On 2/21/07, Julien Martin <[EMAIL PROTECTED]> wrote:

Hello,

I have several components in my jsf page each having a valuechangelistener
attribute and each attribute having a corresponding methods in my backing
bean.

public void attributeAChanged(ValueChangeEvent evt){

public void attributeBChanged(ValueChangeEvent evt){

in the jsp:

valueChangeListener="#{PopulateListsBean.attributeAChanged}"
valueChangeListener="#{PopulateListsBean.attributeBChanged}"


Does anyone know why the first declared method is always called even if
attributeB is changed??

I was not able to find anywhere in the spec anything related to that.

Can anyone help?

Thanks in advance,


Julien.



MyFaces and valueChangeListener??

2007-02-21 Thread Julien Martin

Hello,

I have several components in my jsf page each having a valuechangelistener
attribute and each attribute having a corresponding  methods in my backing
bean.

public void attributeAChanged(ValueChangeEvent evt){
public void attributeBChanged(ValueChangeEvent evt){

in the jsp:

valueChangeListener="#{PopulateListsBean.attributeAChanged}"
valueChangeListener="#{PopulateListsBean.attributeBChanged}"

Does anyone know why the first declared method is always called even if
attributeB is changed??

I was not able to find anywhere in the spec anything related to that.

Can anyone help?

Thanks in advance,

Julien.


Re: [ANNOUNCE] MyFaces Core v1.1.5 Release

2007-02-21 Thread Jeff Bischoff

Alexey Kakunin wrote:

Great news!
Are any information about tomahawk & sandbox stable release available?



There will never be a "stable" release of sandbox. It is, by its nature, 
unstable. Best you can do if you need to use a sandbox component in 
production is check out the release branch of tomahawk + sandbox from 
svn and build it locally using maven. This is much easier to do than it 
sounds!


As for a Tomahawk release, I know that the Core release was blocking the 
next Tomahawk release. So now this release clears the way, but the devs 
still need to make some decisions such as whether to re-branch Tomahawk 
to get newer code, etc. I will be watching the dev list to see if they 
focus on pushing out a new release sometime soon. :)


Regards,

Jeff Bischoff
Kenneth L Kurz & Associates, Inc.




Re: Problem using PPR together with a tabbedPanel client side

2007-02-21 Thread Laurentiu Trica

Hi Ernst

Sorry for not responding faster, but I had to switch from using tableSuggest
to inputSuggest and I hoped that won't be the same problem.

Unfortunately it is.
I checked the generated HTML and I found this for the tabbed panel.








 


 
 
 

 
 
 
 
 


And yes, the behaviour is the one you wrote in your reply.

Thank you in advance.

On 2/12/07, Ernst Fastl <[EMAIL PROTECTED]> wrote:


Hi,

So if I understood you correctly you are using a t:panelTabbedPane
with serverSideTabSwitch="false" right?
Inside you have a dropdown-menu which triggers a partial update
of a contained panel group.

If you do not touch the drop-down and click on a tab it stays on the
client-side,
but if you changed the dropdown value and afterwards click on a tab
the page gets submitted?

if that is the case, could you look into the generated HTML and tell
what the onclick-Handlers of the Tab-buttons contain?

regards

Ernst

On 2/12/07, Laurentiu Trica <[EMAIL PROTECTED]> wrote:
> Hi
>
> I use a tabbedPanel on the client side and a PPRPanelGroup to update a
> field.
> The problem I encountered is when I change a combobox that triggers the
> update of that field. It works fine. But then, when I want to change the
> tab, even if it is on client side, the page is refreshed (the new tab is
> indeed selected).
>
> Anyone encountered this problem before? Is it an issue? Or is there
> something I am doing wrong?
>
> Thank you.
>
> --
> Best regards,
> Laurentiu





--
Best regards,
Laurentiu


Re: DefaultAddResource logs warning

2007-02-21 Thread Jeff Bischoff
If you are using ajax4jsf, you can use a4j:page tag to ensure all ajax 
requests contain a head and body tag. Then you will not see this error.


Paul Iov wrote:
IMHO, turning off the log4j WARN level is quick'n'dirty approach. The 
second choice after configuring servlet container would be probably to 
provide / tags in every response and rely on some framework, 
which strips out that duplicated tags automaticly, i.e. Ajax4jsf. It 
works fine for me (and such warnings are then really important and usefull)


regards,
paul

Simon Kitching schrieb:

Yes, it's related to the ExtensionsFilter.

Tomahawk provides the ability for components to register text that 
they want to be inserted elsewhere in the page. After the page is 
completely processed, tomahawk's ExtensionsFilter goes back and 
post-processes the page to insert the registered items.


Examples of things that can be registered by components are javascript 
and css in the head block of the page, javascript in the body tag's 
onload attribute etc. The jsCookMenu component uses this for example.


If tomahawk goes to post-process the page but there is no  or 
 tag in the page then obviously it is difficult to insert any 
registered text :-)


It's not normally a problem as pages do have a head and body. However 
in the case of Ajax fragments it's not true.


The really correct solution is probably to somehow configure your 
web.xml so that AJAX requests don't pass through the ExtensionsFilter. 
However turning off the log4j messages is pretty safe; the only 
penalty is that if you have malformed non-ajax responses then Tomahawk 
will fail to insert any registered text but won't warn you.


Regards,

Simon

Jay Balunas wrote:

Are you using the Tomahawk ext filter?

I get this as well, and it is the filter posting a warning that the 
page being returned is not well formatted.  From my own research, and 
looking I have found that simply turning off the warning using log4j 
is the best way.


I was also thinking of a Tomahawk improvement that would allow a 
context param that would turn off format checking.


Hope this helps.
-Jay

On 2/17/07, * Adrian Mitev* <[EMAIL PROTECTED] 
> wrote:


Hi all! I'm doing ajax request and partial response but in the log i
get the following:

WARN  [DefaultAddResource] Response has no  or  tag:
.

Idea where's the problem?















Re: [Tobago] global settings possible?

2007-02-21 Thread Udo Schnurpfeil

Hallo Michał,

its not possible yet.

I think you can use alternativly some technologies:

   * JSP Tag-Files (Has the disadvantage that when you not set an
 attribute the tag file will set it to "" (empty string), which may
 problematic in some cases)
   * Write your own tag. Like InExtensionTag in Tobago.
   * Other template frameworks...

Best regards

Udo


Michał 'Gandalf' Stawicki schrieb:

Hi,

is it possible to set some global (default) settings for ex. for
tc:sheet? I know that I could make a managed-bean and for every sheet
get attributes values from that bean, but this would be troblesome -
setting default values would be much simpler. So, is there a way?

regards,
michael





Re: Re: How to cleanup an application scoped bean

2007-02-21 Thread Matthias Wessendorf

contextDestroyed(ServletContextEvent sce)
{

ServletContext servletCxt = sce.getServletContext()
MyBean mb = (MyBean) servletCxt.getAttribute("nameOfTheManagedBean");
mb.doIt();

}

On 2/21/07, H. Swaczinna <[EMAIL PROTECTED]> wrote:

Ok, but how can I access (find) the bean from such servletcontext
listener? There's no FacesContext at that time I think.

Regards
Helmut


>you can use a servletcontext listener to do some cleanup on shutdown
>
>-M
>
>On 2/21/07, H. Swaczinna <[EMAIL PROTECTED]> wrote:
>> Hi,
>>
>> I have an application scoped bean and want to do some cleanup when
>> the application is shutdown (undeployed). Is there a way to register
>> the bean somehow with the application context like I can register a
>> session scoped bean with the session context?
>>
>> Regards
>> Helmut
>>
>
>
>--
>Matthias Wessendorf
>http://tinyurl.com/fmywh
>
>further stuff:
>blog: http://jroller.com/page/mwessendorf
>mail: mwessendorf-at-gmail-dot-com




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

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


RE: Re: How to cleanup an application scoped bean

2007-02-21 Thread H. Swaczinna
Ok, but how can I access (find) the bean from such servletcontext 
listener? There's no FacesContext at that time I think.

Regards
Helmut


>you can use a servletcontext listener to do some cleanup on shutdown
>
>-M
>
>On 2/21/07, H. Swaczinna <[EMAIL PROTECTED]> wrote:
>> Hi,
>>
>> I have an application scoped bean and want to do some cleanup when
>> the application is shutdown (undeployed). Is there a way to register
>> the bean somehow with the application context like I can register a
>> session scoped bean with the session context?
>>
>> Regards
>> Helmut
>>
>
>
>-- 
>Matthias Wessendorf
>http://tinyurl.com/fmywh
>
>further stuff:
>blog: http://jroller.com/page/mwessendorf
>mail: mwessendorf-at-gmail-dot-com


Re: How to make Reusable JSP

2007-02-21 Thread Cagatay Civici

Hi,

Here's more info;

http://wiki.apache.org/myfaces/Creating_Composite_Components

By use of alias bean you can define any number of composition components
like jspf's in your page.

Cagatay

On 2/21/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:


 Hi Cagatay,

What a marvellous solution.
But can it help me to inlcude the jsp fragment twice in a jsp without
overwriting the previous value.
Please let me know the importance of  in the below
example.


  

<%@ include file="geoLocation.jspf"%>



Best Regards,
Pallavi


 --
*From:* Cagatay Civici [mailto:[EMAIL PROTECTED]
*Sent:* Wednesday, February 21, 2007 2:09 PM
*To:* MyFaces Discussion
*Subject:* Re: How to make Reusable JSP

Hi,

Here's an example;
http://www.jroller.com/page/cagataycivici?entry=jsf_composition_components_with_aliasbean


Regards,

Cagatay

On 2/21/07, [EMAIL PROTECTED] < [EMAIL PROTECTED]> wrote:
>
>  Hi All,
>
> A) I have a common address JSP which i want to use it in several other
> Jsps.
> Having the content below and i want to set this address value in a
> common AddressVO object(POJO).
>
> 
> 
>
> B) I want to use this data in another jsp in the following manner.
> 
>  
>  Enter Name :  value="#{pc_ClaimsDataBean.myVO.name}"/>
>  Enter Profession :  value="#{pc_ClaimsDataBean.myVO.profession}" />
>  *
>  
>  
> * Enter TCN :  />
>  Enter Status :  value="#{pc_ClaimsDataBean.status}" />
>  *
>  
>  *
>   action="#{pc_ClaimsManageBean.save}" />
>  
> 
>
> C) In my ClaimsManageBean I want to set the data in my ClaimsDataBean in
> the follwoing manner
>
> ValueBinding bind1 = fc.getApplication
> ().createValueBinding("#{pc_ClaimsDataBean}");
> ClaimsDataBean iniVO = (ClaimsDataBean)bind1.getValue(fc);
> ValueBinding bind2 = fc.getApplication
> ().createValueBinding("#{pc_AddressVO}");
> AddressVO initVO = (AddressVO)bind2.getValue(fc);
> iniVO.setAddVO(initVO);
>
> But this will give a problem , the last value set in the AddressVO will
> be set in the DataBean i lose the previous value.
> Is there a way i can make a reusable jsp which can be used in other JSPs
> several times.
> What are the other possible design strategies.
>
> Best Regards,
> Pallavi
>
>
>
>
>
>
>
> The information contained in this electronic message and any attachments
> to this message are intended for the exclusive use of the addressee(s) and
> may contain proprietary, confidential or privileged information. If you are
> not the intended recipient, you should not disseminate, distribute or copy
> this e-mail. Please notify the sender immediately and destroy all copies of
> this message and any attachments.
>
> WARNING: Computer viruses can be transmitted via email. The recipient
> should check this email and any attachments for the presence of viruses. The
> company accepts no liability for any damage caused by any virus transmitted
> by this email.
>
> www.wipro.com
>


The information contained in this electronic message and any attachments
to this message are intended for the exclusive use of the addressee(s) and
may contain proprietary, confidential or privileged information. If you are
not the intended recipient, you should not disseminate, distribute or copy
this e-mail. Please notify the sender immediately and destroy all copies of
this message and any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient
should check this email and any attachments for the presence of viruses. The
company accepts no liability for any damage caused by any virus transmitted
by this email.

www.wipro.com



Re: How to cleanup an application scoped bean

2007-02-21 Thread Matthias Wessendorf

you can use a servletcontext listener to do some cleanup on shutdown

-M

On 2/21/07, H. Swaczinna <[EMAIL PROTECTED]> wrote:

Hi,

I have an application scoped bean and want to do some cleanup when
the application is shutdown (undeployed). Is there a way to register
the bean somehow with the application context like I can register a
session scoped bean with the session context?

Regards
Helmut




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

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


Re: How to cleanup an application scoped bean

2007-02-21 Thread Adrian Mitev

you can access it with #{applicationScope.beanName}

2007/2/21, H. Swaczinna <[EMAIL PROTECTED]>:


Hi,

I have an application scoped bean and want to do some cleanup when
the application is shutdown (undeployed). Is there a way to register
the bean somehow with the application context like I can register a
session scoped bean with the session context?

Regards
Helmut



How to cleanup an application scoped bean

2007-02-21 Thread H. Swaczinna
Hi,

I have an application scoped bean and want to do some cleanup when
the application is shutdown (undeployed). Is there a way to register
the bean somehow with the application context like I can register a
session scoped bean with the session context?

Regards
Helmut


"Validation error" "Value is not a valid option" appeared since upgrade to 1.1.5

2007-02-21 Thread CarlHowarth

Hello there,

I have just upgraded to MyFaces 1.1.5 from 1.1.4 and have come across a
problem with the UISelectOne component, using a custom converter. When my
form is submitted I now get a message on screen:

Validation Error Region List: "regionList": Value is not a valid option.

Where 'regionList' is the ID of my http://www.nabble.com/%22Validation-error%22-%22Value-is-not-a-valid-option%22-appeared-since-upgrade-to-1.1.5-tf3266228.html#a9079463
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Several value change listener methods in a backing bean?

2007-02-21 Thread Julien Martin

Hello,

Can I have several value change listener methods in a backing beans as
follows??

bean:

*public* *void* marketCodeChanged(ValueChangeEvent evt){
   log.info("marketCodeChanged");
   this.marketCode = (String) evt.getNewValue();
   this.contractCodeDisabled = *false*;
   }

   *public* *void* contractCodeChanged(ValueChangeEvent evt){
   log.info("contractCodeChanged");
   this.contractCode = (String) evt.getNewValue();
   }



jsp:


   
   

   
   
   
   
   
   
   
   
   <% /*
todo: action */ %>
   

   



It seems that only the marketCodeChanged method is called as if only one
value change listener method could be called

Any help greatly appreciated.

Julien.


RE: How to make Reusable JSP

2007-02-21 Thread pallavi.roy

Hi Cagatay,
 
What a marvellous solution.
But can it help me to inlcude the jsp fragment twice in a jsp without
overwriting the previous value.
Please let me know the importance of  in the below
example.

 

  

<%@ include file="geoLocation.jspf"%>


 
Best Regards,
Pallavi 




From: Cagatay Civici [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 21, 2007 2:09 PM
To: MyFaces Discussion
Subject: Re: How to make Reusable JSP


Hi,

Here's an example;
http://www.jroller.com/page/cagataycivici?entry=jsf_composition_componen
ts_with_aliasbean 

Regards,

Cagatay


On 2/21/07, [EMAIL PROTECTED] < [EMAIL PROTECTED]
 > wrote: 

Hi All,
 
A) I have a common address JSP which i want to use it in several
other Jsps.
Having the content below and i want to set this address value in
a common AddressVO object(POJO).
 


 
B) I want to use this data in another jsp in the following
manner.

 
 Enter Name : 
 Enter Profession : 
 
 
 
 Enter TCN : 
 Enter Status :  
 
 
 
 
 

 
C) In my ClaimsManageBean I want to set the data in my
ClaimsDataBean in the follwoing manner
 
ValueBinding bind1 =
fc.getApplication().createValueBinding("#{pc_ClaimsDataBean}");
ClaimsDataBean iniVO = (ClaimsDataBean)bind1.getValue(fc); 
ValueBinding bind2 =
fc.getApplication().createValueBinding("#{pc_AddressVO}");
AddressVO initVO = (AddressVO)bind2.getValue(fc); 
iniVO.setAddVO(initVO);
 
But this will give a problem , the last value set in the
AddressVO will be set in the DataBean i lose the previous value.
Is there a way i can make a reusable jsp which can be used in
other JSPs several times.
What are the other possible design strategies.
 
Best Regards,
Pallavi 



 
 
 
 
 

The information contained in this electronic message and any attachments
to this message are intended for the exclusive use of the addressee(s)
and may contain proprietary, confidential or privileged information. If
you are not the intended recipient, you should not disseminate,
distribute or copy this e-mail. Please notify the sender immediately and
destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient
should check this email and any attachments for the presence of viruses.
The company accepts no liability for any damage caused by any virus
transmitted by this email. 

www.wipro.com






The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should 
check this email and any attachments for the presence of viruses. The company 
accepts no liability for any damage caused by any virus transmitted by this 
email.
 
www.wipro.com

Re: schedule issue

2007-02-21 Thread David Delbecq
And?

>From the extension filter documentation:


Under what circumstances am I *required* to use the extensions filter?

If you just use standard JSF component, but don't use any MyFaces'
extended component (beginning with t:), then you don't need the
Extensions Filter.
However, if you use some of the MyFaces' extended components like
t:inputFileUpload, t:inputHtml, t:inputCalendar, ... then you most
likely need to have this filter configured in your webapp.

En l'instant précis du 02/21/07 10:36, Bogdan Sava s'exprimait en ces
termes:
> schedule component does not work properly
> if extension filter is disabled.
>



breadcrumb design

2007-02-21 Thread Madhav Bhargava

Hi All,



I am in the process of creating a component for breadcrumb generation
for my project.



I have following in mind:



1.  Create a custom component for breadcrumb, with a renderer and a
tag class.
2.  Create a model bean that will back this component and will
contain the latest breadcrumb links and their navigation outcomes. This
bean will be at the session level
3.  Create a breadcrumb event and queue that event in the decode
method of the renderer. This event will then be broadcasted to all the
interested listeners. In my case it will be the left menu which will
have to reflect where the user is.



Every page which requires a breadcrumb will have a breadcrumb tag
defined in the page.

There will be a hidden field on every page that will store the depth (or
the index of the last link) of the breadcrumb. Using this value the list
of links in the model will be updated.



Following are some problems that I am currently facing:



1.  There can be many links present all over the place which can
result in the page control going to some page else which means that
there will be a change in the breadcrumb as well. How do you capture
such events and make the breadcrumb change?
2.  How do you take care of the browser back button?



Regards,

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***

commandNavigation2 issue

2007-02-21 Thread Bogdan Sava

Using  activeOnViewIds attribute on commandNavigation2
causes children items to be not rendered when should be (parent is clicked)
if parent action points to current page (same with activeOnViewIds)


ex (replaced "go_panelnavigation_1" with "go_panelnavigation_5" on 
panelnavigation_5.jsp tomahawk sample page) :




   
   
   
   
   itemClass="mypage" activeItemClass="selected"

   openItemClass="selected">
   value="#{example_messages['panelnav_products']}"

 action="go_panelnavigation_5">
   action="#{navigationMenu.getAction1}"
 
actionListener="#{navigationMenu.actionListener}">

   › 
   value="#{example_messages['panelnav_serach1']}"/>

   
   actionListener="#{navigationMenu.actionListener}">

   › 
   value="#{example_messages['panelnav_serach_acc1']}"/>

   

actionListener="#{navigationMenu.actionListener}">

   › 
   value="#{example_messages['panelnav_search_adv1']}"/>

   
   
   value="#{example_messages['panelnav_shop']}" action="go_panelnavigation_5"
 
actionListener="#{navigationMenu.actionListener}"/>
   value="#{example_messages['panelnav_corporate']}" target="new"

 action="go_panelnavigation_5"
 
actionListener="#{navigationMenu.actionListener}"
 
activeOnViewIds="/panelnavigation_5.jsp">
   
   › 
   value="#{example_messages['panelnav_news1']}"/>

   

actionListener="#{navigationMenu.actionListener}">

   › 
   value="#{example_messages['panelnav_investor1']}"/>

   
   
   value="#{example_messages['panelnav_contact']}" 
action="go_panelnavigation_5"
 
actionListener="#{navigationMenu.actionListener}"/>

   
   
   styleClass="mypage">
   action="go_panelnavigation_5">

   
   › 
   
   
   
   › 
   
   
   
   
   
   
   

   


<%@ include file="inc/page_footer.jsp" %>






schedule issue

2007-02-21 Thread Bogdan Sava

schedule component does not work properly
if extension filter is disabled.



Re: [Solved] Datatable preserveRowStates and remove row problem

2007-02-21 Thread Maniuc

Hi,

when HtmlDataTableHack restoreDescendantComponentStates use a Iterator so
for example if you have 5 rows and you delete one, it restores only the
first fours rows in order.  I don't think that the implementacion have to
manage that situacion, but it should let to change de _rowStates.


Surapuraju, Vamsi wrote:
> 
>  
> Hi,
>   I tried to remove a row from data table which has preserveRowStates
> set to true and I noticed deleted row data is being shown an the next
> row. Does anyone know How I can keep the modified data on the table with
> out using preserveRowStates. I want to be able to remove the row from
> data table and keep modified data. 
> 
> Thank You very Much
> 
> Vamsi Surapuraju
> 
> 
> 
> 
> **
> "This email and any files transmitted with it are the property of
> Quadrivius, its subsidiaries, affiliates, or related companies, are 
> confidential, and are intended solely for the use of the individual or
> entity to whom this email is addressed. Please notify the 
> sender by return email if you are not the intended recipient. If you are
> not the intended recipient, you may not copy, retain, print,
> disclose, or distribute this message or its contents to any other
> individual or entity. Quadrivius, its subsidiaries, affiliates or 
> related companies, reserves the right to monitor and review the content of
> all messages sent to or from this email address."
> **
> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Datatable-preserveRowStates-and-remove-row-problem-tf2087205.html#a9077551
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Re: How to make Reusable JSP

2007-02-21 Thread Cagatay Civici

Hi,

Here's an example;
http://www.jroller.com/page/cagataycivici?entry=jsf_composition_components_with_aliasbean

Regards,

Cagatay

On 2/21/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:


 Hi All,

A) I have a common address JSP which i want to use it in several other
Jsps.
Having the content below and i want to set this address value in a common
AddressVO object(POJO).




B) I want to use this data in another jsp in the following manner.

 
 Enter Name : 
 Enter Profession : 
 *
 
 
* Enter TCN : 
 Enter Status : 
 *
 
 *
 
 


C) In my ClaimsManageBean I want to set the data in my ClaimsDataBean in
the follwoing manner

ValueBinding bind1 = fc.getApplication
().createValueBinding("#{pc_ClaimsDataBean}");
ClaimsDataBean iniVO = (ClaimsDataBean)bind1.getValue(fc);
ValueBinding bind2 = fc.getApplication
().createValueBinding("#{pc_AddressVO}");
AddressVO initVO = (AddressVO)bind2.getValue(fc);
iniVO.setAddVO(initVO);

But this will give a problem , the last value set in the AddressVO will be
set in the DataBean i lose the previous value.
Is there a way i can make a reusable jsp which can be used in other JSPs
several times.
What are the other possible design strategies.

Best Regards,
Pallavi







The information contained in this electronic message and any attachments
to this message are intended for the exclusive use of the addressee(s) and
may contain proprietary, confidential or privileged information. If you are
not the intended recipient, you should not disseminate, distribute or copy
this e-mail. Please notify the sender immediately and destroy all copies of
this message and any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient
should check this email and any attachments for the presence of viruses. The
company accepts no liability for any damage caused by any virus transmitted
by this email.

www.wipro.com



How to make Reusable JSP

2007-02-21 Thread pallavi.roy

Hi All,
 
A) I have a common address JSP which i want to use it in several other
Jsps.
Having the content below and i want to set this address value in a
common AddressVO object(POJO).
 


 
B) I want to use this data in another jsp in the following manner.

 
 Enter Name : 
 Enter Profession : 
 
 
 
 Enter TCN : 
 Enter Status :  
 
 
 
 
 

 
C) In my ClaimsManageBean I want to set the data in my ClaimsDataBean in
the follwoing manner
 
ValueBinding bind1 =
fc.getApplication().createValueBinding("#{pc_ClaimsDataBean}");
ClaimsDataBean iniVO = (ClaimsDataBean)bind1.getValue(fc); 
ValueBinding bind2 =
fc.getApplication().createValueBinding("#{pc_AddressVO}");
AddressVO initVO = (AddressVO)bind2.getValue(fc); 
iniVO.setAddVO(initVO);
 
But this will give a problem , the last value set in the AddressVO will
be set in the DataBean i lose the previous value.
Is there a way i can make a reusable jsp which can be used in other JSPs
several times.
What are the other possible design strategies.
 
Best Regards,
Pallavi 

 

 
 
 
 



The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should 
check this email and any attachments for the presence of viruses. The company 
accepts no liability for any damage caused by any virus transmitted by this 
email.
 
www.wipro.com