Costa Basil | 4 Mar 01:27
Picon
Favicon

Is there a solution in myfaces 1.1.1 to the browser back button problem?

I have the same problem described here:

We are still struggling with the back button. I think we’ll reconfigure the app to store all state on the client. Right now, when the user hits Back, none of the links on the page work on the first click. That’s because the RestoreView phase does not find the view in the Session, so it must create a new view. When it creates the new view, it does not bother to process any actions or events…it just skips straight to the rendering phase. From the customer perspective, they hit Back, then have to click twice before the app begins working again.

(from http://stuffthathappens.com/blog/2006/01/22/not-fud-just-experience/)

Enrich your life at Yahoo! Canada Finance
Costa Basil | 4 Mar 01:48
Picon
Favicon

Re: Is there a solution in myfaces 1.1.1 to the browser back button problem?

I meant other than saving the state to the client.

Costa Basil <costa_basil <at> yahoo.ca> wrote:

I have the same problem described here:

We are still struggling with the back button. I think we�ll reconfigure the app to store all state on the client. Right now, when the user hits Back, none of the links on the page work on the first click. That�s because the RestoreView phase does not find the view in the Session, so it must create a new view. When it creates the new view, it does not bother to process any actions or events�it just skips straight to the rendering phase. From the customer perspective, they hit Back, then have to click twice before the app begins working again.

(from http://stuffthathappens.com/blog/2006/01/22/not-fud-j ust-experience/)

Enrich your life at Yahoo! Canada Finance

Make free worldwide PC-to-PC calls. Try the new Yahoo! Canada Messenger with Voice
Yee CN | 4 Mar 03:36

RE: How Does JDeveloper Compare with Java Studio Creator

Is there any supports for Facelets in JDeveloper or JSC? I am using MyEclipse – and I am seriously looking for an alternative.

 

Regards,

Yee

 

From: craigmcc <at> gmail.com [mailto:craigmcc <at> gmail.com] On Behalf Of Craig McClanahan
Sent: Saturday, 4 March 2006 7:44 AM
To: MyFaces Discussion
Subject: Re: How Does JDeveloper Compare with Java Studio Creator

 

 

On 3/3/06, Adam Winer <awiner <at> gmail.com> wrote:

Why can't JSC just run the component and actually let it render
itself by default?  I know that's what JDeveloper does, and
it works well.


Creator does that too, and it definitely works well ... the only *required* additional code is a BeanInfo class (see the JavaBeans API) that lets the component developer describe the component to the tool (for example, declaring that for the "style" property, use the nice CSS Style editor instead of just a string editor on the property sheet).

 

As a component developer (I've never worked on JDeveloper itself
at all, to be explicit), I really dislike the idea of writing a bunch of
extra Java code for all my components.  Supporting optional Java
code when renderers can't render in design time (graphs, etc.) is
a great feature, but you shouldn't force component developers to
write anything for the common case.


Writing dynamic behavior is possible, but not required.  It's up to the component developer to decide if you want to make your component behave in interesting ways at design time or not.  Examples we have implemented in the Creator components include:

* When you drop a Drop Down List component onto the page,
  also create a helper bean for the options and bind the component
  to it.

* When you have a Label component bound to an input component
  via the "for" property, and you change the "id" of the input component,
  respond to a property change event and change the "for" attribute
  on the Label component as well so that it stays in sync.

* Do not allow a parameter (<f:param>) to be dropped except
  in a context where it is relevant (such as inside an output link).

All of this stuff is optional, but provides you a way to improve the life of the users of your compoinents at design time, without messing up how they operate at run time.

By the way, the API we provide to component developers to make this possible has also been submitted to the JCP process (http://jcp.org/en/jsr/detail?id=273), so hopefully we can see a future world where a component developer can write design time behavior like this for more than one tool, instead of having to deal with each tool's individual APIs.

 

-- Adam


Craig

 

sia far | 4 Mar 03:57
Picon

no value for h:message or t:message

Hello Everyone:

I have the following simple code:

I have defined an input text as required. However, I get the following for 
the validation error:

"{0}": Value is required

if I use h:message or t:message, neither the input id nor the label value is 
replaced for {0}. I even tried to deply the simple application put on the 
myfaces homepage, I get the same thing for validation. I am using RAD 6.01.1 
and WAS 6.2.7. I am following everything by the book. Can anyone be kind 
enough to point out what I doing wrong? Here is the code snippet (The first 
input is the on that is required).

I have also tried to replace <t:message ... in the following snippet with

          <h:message id="pmrError" for="form1:pmr" styleClass="red-dark"/>

but of no avail

<h:form id="form1" name="pmrSearch">
   <h:panelGrid columns="3" cellpadding="2" >
	<h:panelGroup>
	   <h:outputLabel for="form1:pmr" value="#{msg['pmrNo']}" />
	   <h:inputText id="pmr" maxlength="6" size="6" 
value="#{searchPmrBean.pmr}" required="true" >
            	<f:validateLength minimum="1" maximum="6" />
           </h:inputText>
           <t:message id="pmrError" for="form1:pmr" styleClass="red-dark" 
replaceIdWithLabel="true"/>
        </h:panelGroup>

	<h:panelGroup>
           <h:outputLabel for="form1:bno" value="#{msg['bno']}:" />
	   <h:inputText id="bno" value="#{searchPmrBean.bno}" maxlength="3" 
size="3" >
             <f:validateLength maximum="3" />
            </h:inputText>
	</h:panelGroup>

	<h:panelGroup>
            <h:outputLabel for="form1:cno" value="#{msg['cno']}:" />
			<h:inputText id="cno" value="#{searchPmrBean.cno}" maxlength="3" size="3" 
 >
               	<f:validateLength maximum="3" />
            </h:inputText>
            <h:commandButton id="searchPmr" styleClass="button-blue" 
value="#{msg['go']}" action="#{searchPmrBean.searchPmr}"/>
	</h:panelGroup>
     </h:panelGrid>
</h:form>

Yee CN | 4 Mar 04:03

Problem with: inputCalender, facelets and <base href=...>

Hi,

 

I am having problem with combinations of inputCalender, facelets and the following:

 

<head>

      <base href="http://localhost/MyWebApp/" />

      …

</head>

 

The symptoms are as follows:

-          the calendar popups OK, and I can select a date

-          but as I make a selection, the browser apparently does a form post and tries to redirect me to a null page: http://localhost/MyWebApp/#

 

Everything was working OK before I moved to facelets. I tested that with facelets the inputCalendar works OK without the <base href= …/> directive.

 

I am wondering whether I am the only one facing the problem and whether there is a way around this.

 

Thanks in advance.

 

Regards,

Yee

 

Anthony Hong | 4 Mar 04:53
Picon

Re: Can I load another jsf page by t:popup?

So  tomahawk is not provide such function.
With tomahawk popup only static data can be loaded. I can not add any
jsf interaction in popup page. right?

--

Anthony Hong

Adam Winer | 4 Mar 05:11
Picon

Re: How Does JDeveloper Compare with Java Studio Creator

On 3/3/06, Craig McClanahan <craigmcc <at> apache.org> wrote:
>
>
>
> On 3/3/06, Adam Winer <awiner <at> gmail.com> wrote:
> > Why can't JSC just run the component and actually let it render
> > itself by default?  I know that's what JDeveloper does, and
> > it works well.
>
>
>  Creator does that too, and it definitely works well ... the only *required*
> additional code is a BeanInfo class (see the JavaBeans API) that lets the
> component developer describe the component to the tool (for example,
> declaring that for the "style" property, use the nice CSS Style editor
> instead of just a string editor on the property sheet).
>
>
> > As a component developer (I've never worked on JDeveloper itself
> > at all, to be explicit), I really dislike the idea of writing a bunch of
> > extra Java code for all my components.  Supporting optional Java
> > code when renderers can't render in design time (graphs, etc.) is
> > a great feature, but you shouldn't force component developers to
> > write anything for the common case.
>
>
>  Writing dynamic behavior is possible, but not required.  It's up to the
> component developer to decide if you want to make your component behave in
> interesting ways at design time or not.  Examples we have implemented in the
> Creator components include:
>
>  * When you drop a Drop Down List component onto the page,
>    also create a helper bean for the options and bind the component
>    to it.
>
>  * When you have a Label component bound to an input component
>    via the "for" property, and you change the "id" of the input component,
>    respond to a property change event and change the "for" attribute
>    on the Label component as well so that it stays in sync.
>
>  * Do not allow a parameter (<f:param>) to be dropped except
>    in a context where it is relevant (such as inside an output link).
>
>  All of this stuff is optional, but provides you a way to improve the life
> of the users of your compoinents at design time, without messing up how they
> operate at run time.
>
>  By the way, the API we provide to component developers to make this
> possible has also been submitted to the JCP process
> (http://jcp.org/en/jsr/detail?id=273), so hopefully we can
> see a future world where a component developer can write design time
> behavior like this for more than one tool, instead of having to deal with
> each tool's individual APIs.

FYI, JSR 276 (http://jcp.org/en/jsr/detail?id=276) is a complimentary
JSR that takes a metadata-driven, JSF-specific approach, instead
of the Java code, generic JavaBean approach of 273.  Both can
work together.  (I kinda like 276 more; I'm guessing Craig likes
273 more.  Just a hunch. ;) )

-- Adam

Adam Winer | 4 Mar 05:13
Picon

Re: How Does JDeveloper Compare with Java Studio Creator

On 3/3/06, Yee CN <yeecn <at> streamyx.com> wrote:
>
>
>
> Is there any supports for Facelets in JDeveloper or JSC? I am using
> MyEclipse – and I am seriously looking for an alternative.

Unfortunately not.  Facelets has come on strong basically at
exactly the wrong point in the development cycle for JDeveloper
(and JSC too, I'd imagine).  I'm certainly pushing Facelets
to anyone in earshot. :)

-- Adam

Dave | 4 Mar 05:14
Picon
Favicon

model update error : hide exception

During model update phase, if a setter method throws an exception,
For example, setUsername(String username)
 
Faces  will display a message:
      Conversion Error "username": Error during model data update
 
and in the meantime display a stack trace on server side console.
 
How to
1. replace the message with  "Invalid user name: xyz"?
2. prevent displaying stack trace on server side since it is a normal error caused by clients ?
& nbsp;
Thanks for help!
 
 
 
 

Yahoo! Mail
Bring photos to life! New PhotoMail makes sharing a breeze.
Stan Silvert | 4 Mar 06:49
Favicon

RE: Portlet support - multiple instances of a portlet.

It doesn’t make any difference.  Just create your JSF app as you would if it were running stand-alone.  MyFacesGenericPortlet and your friendly JSR-168 portlet container will take care of the rest.  Most of the magic is done in the javax.faces.context.ExternalContext.  See the javadoc for details.

 

There have been some reported problems with multiple JSF portlets in LifeRay, but hopefully it is fixed by now.

 

Stan Silvert

JBoss, Inc.

ssilvert <at> jboss.com

callto://stansilvert

From: Marcio E Miranda [mailto:Marcio.E.Miranda <at> fastsearch.com]
Sent: Friday, March 03, 2006 5:13 PM
To: users <at> myfaces.apache.org
Subject: Portlet support - multiple instances of a portlet.

 

Hi,

 

How does MyFaces (or JSF for that matter) handle backing beans in multiple instances of the same portlet? For example, let’s say that I’ve deployed two instances of MyPortlet in the same page of a portal. MyPortlet defines a view which has components binded to a backing bean that must be saved for each portlet instance, because it holds information specific to that portlet instance (in portlet API terms, it should be stored in the Portlet session with portlet scope).

 

Does JSF handle portlet scope in the managed bean creation facility (and in EL)? If not, how would I handle that in JSF? How should I create the backing bean and how should I reference it using EL?

 

Thanks,
Marcio.


Gmane