Skip to main content

Why can't I get a backing bean property from any widget? Etable, Grid,...

3 replies [Last post]
tazmaniac
Offline
Joined: 2007-03-19
Points: 0

Hi,

Briefly, Jmaki works here, as long as I used static data, hardcoded in my pages. I am using all widgets which take Json array of data (Yes, I did try all of them).

BUT As soon as I try to use Jmaki widgets with a property (JSON string) from a backing bean (cf JSF), nothing works: can anyone tell me how to do this?.

configuration:

I am using Jmaki 8.3.2, with a Sun AS 9.1 (meaning GlassFish V2). if anyone cares, I am using NetBeans 5.5.1 and I am trying to make some regular, basic, JSF pages.

I have to say that I believe I read most of the posts of this forum. I am looking for a solution here.

I tried "value", "args for column headers and value for rows", "service". Everytime, I generate the Json string from my backing bean. Everytime I try my generated Json string in a JSF page, displaying it like a static text and using it inside a Jmaki widget (hardcoding it).

Hardcoded JSON string, it works. From backing bean, it doesn't.

I do not have any error message, neither Javascript nor from my Sun AS, and none in my console.

Looking for any reason, I checked the rendered source of my page in my browsers (IE and Mozilla): fact is that my backing bean input is not interpreted : I can read rows:#{MyBean.myProperty}.

PS:

- I display in the same page the string from the backing bean in a h:outputText: it is displayed.

- I test, in the very same page, the same widget with the same declaration, only replacing ${myBean.mochikitInput} by the JSON string from the backing bean : the Jmaki widget works.

- I hope it could be a bug of of jsf/core or jsf/html, so I gave a try with storing my bean property in a variable using JSTL and c:set var="myInput" scope="page" value="#{myBean.myProperty}"... it is not working.

In advance, thanks for any help or advice.

Alfred

Message was edited by: tazmaniac

Message was edited by: tazmaniac

[i]performing more test, no result yet

Message was edited by: tazmaniac

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
tazmaniac
Offline
Joined: 2007-03-19
Points: 0

Thank you to [b]gajanan1[/b] who opened my blind eyes.

Using $ instead # makes it work :-)

Thank you again gajanan1!

Alfred

gajanan1
Offline
Joined: 2006-12-13
Points: 0

hi [b]tazmaniac[/b] if u have any idea about slidding menu?
how can i use slidding menu dynamically
plz tell me that

tazmaniac
Offline
Joined: 2007-03-19
Points: 0

Hello gajanan1,

I'm sorry but I don't think there is any easy way.
I mean, the widget isn't meant for this yet, as Greg Murray pointed it out.

I guess that if you want this sliding menu, you can either wait for the next Jmaki release, or use a variant: sliding menu have been in the web for a while, among javascript sources.

You could maybe use one javascript and dynamically create the menu content from a bean property which you would store in a javascript variable. Menus are usually formatted string, it's just up to you to write a method to format the string in the expected way by the javascript you choose.

I saw a way to do get Bean properties into Javascript variable using a JSONRPCBridge object: (http://blog.dannynet.net/archives/25).

I'll be happy to know if there is any other way.

Best regards,

Alfred