Re: Getting data from DB with engineMap

"The Programmer: Revolution" <[email protected]>
Newsgroups gmane.comp.cms.jahia.template
Message-ID <[email protected]>
"Puts!(in portuguese)
So easy! I just put:

String a = user.getProperty("id_any_field");

to change the field:
user.setProperty("id_any_field", "other_id_or_any");

the user object(not necessary):
JahiaUser user = jData.params().getUser();


2005/8/31, The Programmer <[email protected]>:
> hello people!
> 
> How to get a data from DB using the engineMap (HashMap)
> look:
> (in jsp file)
> 
> ------------------------8<------------------------
> <%@ page import="org.jahia.engines.mysettings.MySettingsEngine"%>
> 
> <%!
> public String getUserProp(Map engineMap, String propName) {
>         String propValue = (String)
> engineMap.get(MySettingsEngine.USER_PROPERTY_PREFIX + propName);
>         if (propValue == null) {
>             return "";
>         } else {
>             return propValue;
>         }
> }
> %>
> 
> <%=getUserProp(engineMap, "id_any_field")%>
> ------------------------>8------------------------
> 
> from mysettings.jsp the value is correct but from home.jsp the value
> is null. I want get the values correct in any page. Somebody
> saaaaveeee me!!
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.