Adrian,
I am trying to simplify the VisualTheme selection form but unfortunately I
need still to learn...
Using this form:
<form name="VisualTheme" type="single"
target="setUserPreference?userPrefTypeId=VISUAL_THEME&userPrefGroupId=GLOBAL_PREFERENCES&userPrefValue=${myTheme}">
<actions>
<service service-name="getUserPreference">
<field-map field-name="userPrefTypeId"
value="VISUAL_THEME"/>
</service>
<set field="myTheme" from-field="userPrefValue"
default-value="DEFAULT"/>
</actions>
<field name="myTheme" title="${uiLabelMap.SelectedVisualTheme}">
<drop-down allow-empty="false">
<entity-options description="${description}"
entity-name="VisualTheme" key-field-name="visualThemeId"/>
</drop-down>
</field>
<field name="updateButton"><submit/></field>
</form>
i effectively do not need to define a new service in the Events.xml. The
actual selected theme is displayied correctly but when i submit the form i
get the following error:
The Following Errors Occurred:
Error calling event: org.ofbiz.webapp.event.EventHandlerException: Problems
processing event: java.lang.NoSuchMethodException:
org.ofbiz.common.preferences.PreferenceServices.setUserPreference(javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse)
(org.ofbiz.common.preferences.PreferenceServices.setUserPreference(javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse))
Could someone help me? Sorry if it is (as I suppose) a basic question.
Thanks,
-Bruno
2008/7/31 David E Jones <[EMAIL PROTECTED]>
>
> On Jul 30, 2008, at 11:36 PM, Bruno Busco wrote:
>
> Adrian,
>> I agree that it could be simplyfied using the setUserPreferences request,
>> thanks for the hint, I was also trying to understand how to rewrite it.
>> In any case, if we consider that in the Visual Theme form additional
>> fields
>> could be added later like for example:
>> - Default number of rows to display in the FindScreens
>> - Specific colors for themes that allow the user to change them
>>
>
> These sounds more like things that would go directly into the
> UserPreference stuff, and wouldn't have so much to do with the themes.
>
> -David
>
>
>