You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Jacques Le Roux (JIRA)" <ji...@apache.org> on 2007/12/11 08:50:43 UTC
[jira] Closed: (OFBIZ-1393) Need a better way to specify the
default item configuration
[ https://issues.apache.org/jira/browse/OFBIZ-1393?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jacques Le Roux closed OFBIZ-1393.
----------------------------------
Resolution: Fixed
Fix Version/s: SVN trunk
Assignee: Jacques Le Roux (was: Jacopo Cappellato)
Thanks Chris,
Your patch is in trunk revision: 603164
> Need a better way to specify the default item configuration
> -----------------------------------------------------------
>
> Key: OFBIZ-1393
> URL: https://issues.apache.org/jira/browse/OFBIZ-1393
> Project: OFBiz
> Issue Type: Improvement
> Components: product
> Affects Versions: SVN trunk, Release Branch 4.0
> Reporter: Chris Lombardi
> Assignee: Jacques Le Roux
> Priority: Minor
> Fix For: SVN trunk
>
> Attachments: ofbiz-1393-2.patch, ofbiz-1393-3.patch
>
>
> Currently, setDefaultConfig in ProductConfigWrapper assumes the default is the first ProductConfigOption. I would like to be able to set up different products that shared a set of ProductConfigOptions yet allow for a different default ProductConfigOption.
> I don't yet have an opinion on how I can best implement this and my Data Model Resource Book is in the mail. Does anyone have any thoughts or preferences?
> Here's how it's currently implemented:
> public void setDefaultConfig() {
> resetConfig();
> for (int i = 0; i < questions.size(); i++) {
> ConfigItem ci = (ConfigItem)questions.get(i);
> if (ci.isMandatory()) {
> if (ci.getOptions().size() > 0) {
> ConfigOption co = (ConfigOption)ci.getOptions().get(0); // default is first option
> co.setSelected(true);
> }
> }
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.