You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by sj...@stradefi.com on 2006/03/03 08:26:12 UTC

Bad credentials

Hi!

 

I guess it is not an error with MyFaces (maybe a problem with my Spring
beans configurations) but maybe you could help me.

I am getting into troubles while doing this: 

List<ChildAssociationRef> childRefs =
nodeService.getChildAssocs(functionRef); 

although my nodeService and functionRef seem correct (good reference): 
functionRef=  <workspace://SpacesStore/e79e7952-a87a-11da-ab9f-0774da8876d0>
workspace://SpacesStore/e79e7952-a87a-11da-ab9f-0774da8876d0 
nodeService= org.alfresco.repo.node.db.DbNodeServiceImpl@1e932fcf 
storeRef=  <workspace://SpacesStore> workspace://SpacesStore 

And I get this error message: 
A system error happened during the operation: Bad credentials presented 

Does somebody know what kind of error it is?

Thanks

Sophie


Re: bean call in jsp

Posted by Mike Kienenberger <mk...@gmail.com>.
It's not possible to call methods with functions in JSF EL, but you
should be able to use #{X.hobbyMethod}

and then use

public void hobbyMethod(ActionEvent e)
{
    b = UsersBean.getUsersRichList().getRowData();
    ...b.username.....
}

in your java code.

UsersBean.getUsersRichList() returns a UIData, not a List, by the way.



I still don't think this will do what you want as this isn't the
correct way to initialize a selectOneMenu.

Instead, you should create a getHobbies() method which returns a
SelectItems[] array.    In it, you'd iterate over your #{Users.users}
list, assigning the b.hobbies value to each label, and b as the
SelectItem value.

You might need or want to create a HobbyConverter (assuming Hobby is
the data type of B).


On 3/3/06, sjarlier@stradefi.com <sj...@stradefi.com> wrote:
> Hi!
>
> I am looking to call a function from my bean into my jsp page.
> For example:
> - Bean class: Users
> - Bean class: X
> - in this class X I have the function: getHobbies(username)
> - in my jsp page I get all users nodes and I want to display each user with
> the list of his hobbies thanks to this function getHobbies, please would you
> mind telling me if it is possible? I was thinking of something like this:
>
> <a:richList id="users-list" binding="#{UsersBean.usersRichList}"
> viewMode="details" pageSize="10"
> styleClass="recordSet" headerStyleClass="recordSetHeader"
> rowStyleClass="recordSetRow" altRowStyleClass="recordSetRowAlt" width="100%"
> value="#{Users.users}" var="b" initialSortColumn="userName"
> initialSortDescending="true">
>
> <h:selectOneMenu id="hobbies" style="width:150px" >
>    <f:selectItems actionListener="#{X.getHobbies(b.username}" />
>                                                 -->how to call the function
> here
> </h:selectOneMenu>
>
> Thanks
> Best
> Sophie
>
>

bean call in jsp

Posted by sj...@stradefi.com.
Hi!

I am looking to call a function from my bean into my jsp page.
For example:
- Bean class: Users
- Bean class: X
- in this class X I have the function: getHobbies(username)
- in my jsp page I get all users nodes and I want to display each user with
the list of his hobbies thanks to this function getHobbies, please would you
mind telling me if it is possible? I was thinking of something like this:

<a:richList id="users-list" binding="#{UsersBean.usersRichList}"
viewMode="details" pageSize="10"
styleClass="recordSet" headerStyleClass="recordSetHeader"
rowStyleClass="recordSetRow" altRowStyleClass="recordSetRowAlt" width="100%"
value="#{Users.users}" var="b" initialSortColumn="userName"
initialSortDescending="true">

<h:selectOneMenu id="hobbies" style="width:150px" >
   <f:selectItems actionListener="#{X.getHobbies(b.username}" />   
						-->how to call the function
here
</h:selectOneMenu>

Thanks
Best
Sophie


RE: Bad credentials

Posted by Juergen Melzer <my...@hotmail.de>.
Seems there is a configuration that the nodeservice is protected for you :-(

Regards,
Juergen


>From: <sj...@stradefi.com>
>Reply-To: <sj...@stradefi.com>
>To: "'MyFaces Discussion'" 
><us...@mbb-gelma.de>
>Subject: RE: Bad credentials
>Date: Fri, 3 Mar 2006 14:28:28 +0100
>
>Yes it is used in Alfresco that I am using...
>Best,
>Sophie
>
>-----Message d'origine-----
>De : Juergen Melzer [mailto:myfaces-sub@hotmail.de]
>Envoyé : vendredi 3 mars 2006 14:21
>À : sjarlier@stradefi.com; users@myfaces.apache.org
>Objet : RE: Bad credentials
>
>Do you use spring & acegi?
>Seems to be a acegi error message.
>
>Regards,
>Juergen
>
>
> >From: <sj...@stradefi.com>
> >Reply-To: <sj...@stradefi.com>
> >To: "'MyFaces Discussion'" <us...@myfaces.apache.org>
> >Subject: Bad credentials
> >Date: Fri, 3 Mar 2006 08:26:12 +0100
> >
> >Hi!
> >
> >
> >
> >I guess it is not an error with MyFaces (maybe a problem with my Spring
> >beans configurations) but maybe you could help me.
> >
> >I am getting into troubles while doing this:
> >
> >List<ChildAssociationRef> childRefs =
> >nodeService.getChildAssocs(functionRef);
> >
> >although my nodeService and functionRef seem correct (good reference):
> >functionRef=
> ><workspace://SpacesStore/e79e7952-a87a-11da-ab9f-0774da8876d0>
> >workspace://SpacesStore/e79e7952-a87a-11da-ab9f-0774da8876d0
> >nodeService= org.alfresco.repo.node.db.DbNodeServiceImpl@1e932fcf
> >storeRef=  <workspace://SpacesStore> workspace://SpacesStore
> >
> >And I get this error message:
> >A system error happened during the operation: Bad credentials presented
> >
> >Does somebody know what kind of error it is?
> >
> >Thanks
> >
> >Sophie
> >
>
>_________________________________________________________________
>Haben Spinnen Ohren? Finden Sie es heraus – mit dem MSN Suche Superquiz via
>
>http://www.msn-superquiz.de  Jetzt mitmachen und gewinnen!
>
>
>__________ NOD32 1.1427 (20060303) Information __________
>
>This message was checked by NOD32 antivirus system.
>http://www.eset.com
>
>

_________________________________________________________________
Die neue MSN Suche Toolbar mit Windows-Desktopsuche. Suchen Sie gleichzeitig 
im Web, Ihren E-Mails und auf Ihrem PC! Jetzt neu! http://desktop.msn.de/ 
Jetzt gratis downloaden!


RE: Bad credentials

Posted by sj...@stradefi.com.
Yes it is used in Alfresco that I am using...
Best,
Sophie

-----Message d'origine-----
De : Juergen Melzer [mailto:myfaces-sub@hotmail.de] 
Envoyé : vendredi 3 mars 2006 14:21
À : sjarlier@stradefi.com; users@myfaces.apache.org
Objet : RE: Bad credentials

Do you use spring & acegi?
Seems to be a acegi error message.

Regards,
Juergen


>From: <sj...@stradefi.com>
>Reply-To: <sj...@stradefi.com>
>To: "'MyFaces Discussion'" <us...@myfaces.apache.org>
>Subject: Bad credentials
>Date: Fri, 3 Mar 2006 08:26:12 +0100
>
>Hi!
>
>
>
>I guess it is not an error with MyFaces (maybe a problem with my Spring
>beans configurations) but maybe you could help me.
>
>I am getting into troubles while doing this:
>
>List<ChildAssociationRef> childRefs =
>nodeService.getChildAssocs(functionRef);
>
>although my nodeService and functionRef seem correct (good reference):
>functionRef=  
><workspace://SpacesStore/e79e7952-a87a-11da-ab9f-0774da8876d0>
>workspace://SpacesStore/e79e7952-a87a-11da-ab9f-0774da8876d0
>nodeService= org.alfresco.repo.node.db.DbNodeServiceImpl@1e932fcf
>storeRef=  <workspace://SpacesStore> workspace://SpacesStore
>
>And I get this error message:
>A system error happened during the operation: Bad credentials presented
>
>Does somebody know what kind of error it is?
>
>Thanks
>
>Sophie
>

_________________________________________________________________
Haben Spinnen Ohren? Finden Sie es heraus – mit dem MSN Suche Superquiz via

http://www.msn-superquiz.de  Jetzt mitmachen und gewinnen!


__________ NOD32 1.1427 (20060303) Information __________

This message was checked by NOD32 antivirus system.
http://www.eset.com



RE: Bad credentials

Posted by Juergen Melzer <my...@hotmail.de>.
Do you use spring & acegi?
Seems to be a acegi error message.

Regards,
Juergen


>From: <sj...@stradefi.com>
>Reply-To: <sj...@stradefi.com>
>To: "'MyFaces Discussion'" <us...@myfaces.apache.org>
>Subject: Bad credentials
>Date: Fri, 3 Mar 2006 08:26:12 +0100
>
>Hi!
>
>
>
>I guess it is not an error with MyFaces (maybe a problem with my Spring
>beans configurations) but maybe you could help me.
>
>I am getting into troubles while doing this:
>
>List<ChildAssociationRef> childRefs =
>nodeService.getChildAssocs(functionRef);
>
>although my nodeService and functionRef seem correct (good reference):
>functionRef=  
><workspace://SpacesStore/e79e7952-a87a-11da-ab9f-0774da8876d0>
>workspace://SpacesStore/e79e7952-a87a-11da-ab9f-0774da8876d0
>nodeService= org.alfresco.repo.node.db.DbNodeServiceImpl@1e932fcf
>storeRef=  <workspace://SpacesStore> workspace://SpacesStore
>
>And I get this error message:
>A system error happened during the operation: Bad credentials presented
>
>Does somebody know what kind of error it is?
>
>Thanks
>
>Sophie
>

_________________________________________________________________
Haben Spinnen Ohren? Finden Sie es heraus – mit dem MSN Suche Superquiz via  
http://www.msn-superquiz.de  Jetzt mitmachen und gewinnen!