Commit Graph
1071 Commits
Author SHA1 Message Date
Jacques Le Roux ab865939f0 A patch from Daniel Riquelme "ignore-if-empty in entity-options throw NPE when env-name is in fact empty" https://issues.apache.org/jira/browse/OFBIZ-4843
When specifying the ignore-if-empty attribute inside an entity-constraint in an entity-options a NPE will be thrown whenever the env-name of this entity-constraint is empty.

The error occurs because a null condition is created for the entity-constraint.
When validateSql get called in

org.ofbiz.entity.condition.EntityJoinOperator.validateSql(EntityJoinOperator.java:178)

there is no null checking so when

condition.checkCondition(modelEntity);

gets called an NPE is thrown.

The patch modifies the code in

framework/widget/src/org/ofbiz/widget/form/ModelFormField.java

to avoid the inclusion of a null condition to the entity-options.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1340826 13f79535-47bb-0310-9956-ffa450edef68
2012-05-20 20:27:23 +00:00
Jacopo Cappellato 748dd94841 Removed unused imports.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1340637 13f79535-47bb-0310-9956-ffa450edef68
2012-05-20 08:21:18 +00:00
Jacopo Cappellato 79ae52492a Refactored code to use the default BeansWrapper defined by FreemarkerWorker; this is important according to comment from one of the Freemarker committers:
"As of creating new BeansWrapper, be sure you create it only once during the application life-cycle and then reuse the same instance, or else it will have to rebuild the class introspection cache again and again."

Thanks to Adam Heath for the comment.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1340631 13f79535-47bb-0310-9956-ffa450edef68
2012-05-20 07:49:45 +00:00
Jacques Le Roux 1255c1e116 A patch from Harsha Chadhar for "Can not add "Question Options" within the Survey section of the Content application." https://issues.apache.org/jira/browse/OFBIZ-2959
Reported by Brant Levinson 19/Sep/09 : When editing a question in Content --> Survey which has a "Selected Option" Question Type, the page does not allow for the creation of a Question Option. 

Sumit Pandint tested:
It can be reproduced in following steps -
1) Go to : https://demo-trunk.ofbiz.apache.org:8443/content/control/EditSurveyQuestions?surveyId=1000
OR
https://demo-trunk.ofbiz.apache.org:8443/content/control/EditSurveyQuestions?surveyId=1000&surveyQuestionId=10000&surveyQuestionCategoryId=1000#edit
2) Create New Question with "Survey Question Type Id" = "Selected Option"
3) ERROR
4) Question starts appearing in list.
5) Page rendering exception is coming in create question option section.
6) Apply patch and observe screen : OK

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1340357 13f79535-47bb-0310-9956-ffa450edef68
2012-05-19 06:53:58 +00:00
Jacopo Cappellato 4aebe81b8f Based on suggestion from Daniel Dekany (committer/maintainer of the Freemarker's project):
"Since BeansWrapper.getDefaultInstance() returns an instance that is
 shared in the scope of the class-loader that defined the FreeMarker
 classes, and since possibly multiple independently developed
 components in your system use FreeMarker and thus getDefaultInstance
 (and you may don't even know about it), and since the returned
 BeanWrapper can be configured (not read-only), you never know how the
 returned BeanWrapper is configured. So you add a 3rd party component,
 and if you are unlucky, suddenly your other component is broken.
 As of creating new BeansWrapper, be sure you create it only once
 during the application life-cycle and then reuse the same instance, or
 else it will have to rebuild the class introspection cache again and
 again."
 
 I have replaced the usage of the static instance of the BeansWrapper with a newly created object. 


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1339504 13f79535-47bb-0310-9956-ffa450edef68
2012-05-17 07:25:13 +00:00
Adam Heath 9e5f405a4d DEPRECATION: framework: findByAnd variants replaced with findByAnd that takes a boolean useCache parameter.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1338403 13f79535-47bb-0310-9956-ffa450edef68
2012-05-14 20:59:54 +00:00
Adam Heath 64a9662c25 DEPRECATION: framework: findByPrimaryKey variants replaced with findOne
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1337662 13f79535-47bb-0310-9956-ffa450edef68
2012-05-12 21:17:55 +00:00
Jacques Le Roux 289837001e Fixes "View Calendar Broken in Party Manager > Relationships" https://issues.apache.org/jira/browse/OFBIZ-4739
This was due to MacroScreenRenderer.renderScreenletSubWidget() calling HtmlFormRenderer instead of MacroFormRenderer. So there was still a call to the old, now inexistent, call_cal js function.

So this not only fixes this case but also all other similar cases, when a navigation-form-name screenlet attribute was used and a date field used in the related form.

I have also checked there are no other uses of HtmlFormRenderer in MacroScreenRenderer. So I think w are safe from other side effects...



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1331898 13f79535-47bb-0310-9956-ffa450edef68
2012-04-29 12:07:08 +00:00
Sascha Rodekamp 83a3e0f6f4 Revert 1327835: accidently committed file WidgetWorker.java
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1327839 13f79535-47bb-0310-9956-ffa450edef68
2012-04-19 06:30:36 +00:00
Sascha Rodekamp 94889bae2d Fix jackrabbit unit testing.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1327835 13f79535-47bb-0310-9956-ffa450edef68
2012-04-19 05:58:29 +00:00
Sascha Rodekamp de21687576 Form-Widget : Error in rendering Reset field. (https://issues.apache.org/jira/browse/OFBIZ-4821) A patch from Sumit Pandit. MacroFormRenderer.renderResetField contains a missing entry when appending title to renderResetField's StringWritter.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1327409 13f79535-47bb-0310-9956-ffa450edef68
2012-04-18 07:51:49 +00:00
Jacques Le Roux 93ae3a7fe1 The conditionals are unnecessary - FSE will return the original string if the string is null or empty, said Adrian
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1311195 13f79535-47bb-0310-9956-ffa450edef68
2012-04-09 10:44:05 +00:00
Jacques Le Roux 2d30831040 A patch from Nicolas Malin "Use flexibleStringRenderer for alt-target element on form" https://issues.apache.org/jira/browse/OFBIZ-4588
At this time the alt-target element value is only parse on bsh interpreter. To resynchronise with the rest of framework, convert with a flexibleStringRenderer.

jleroux: re-adding after reverting r1311082

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1311109 13f79535-47bb-0310-9956-ffa450edef68
2012-04-08 21:38:17 +00:00
Jacques Le Roux bf2feb63bd A patch from Nicolas Malin "add possibility to sort field at the end form on widget form" https://issues.apache.org/jira/browse/OFBIZ-4518
When you use sort-field, you reorder only the form begin or you need list all file if you want reordered the end form.

Example

    <form>
    <field name="a"/>
    <field name="b"/>
    <field name="c"/>
    <field name="d"/>
    </form>

If you want put c at the end :

    <form>
    <field name="a"/>
    <field name="b"/>
    <field name="c"/>
    <field name="d"/>
    <sort-order>
    <sort-field name="a"/>
    <sort-field name="b"/>
    <sort-field name="d"/>
    <sort-field name="c"/>
    </sort-order>
    </form>

with the patch

    <form>
    <field name="a"/>
    <field name="b"/>
    <field name="c"/>
    <field name="d"/>
    <sort-order>
    <last-field name="c"/>
    </sort-order>
    </form>

It's really useful for inherited forms when you adding new fields, you just use last-field for instance for submit button.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1307784 13f79535-47bb-0310-9956-ffa450edef68
2012-03-31 12:10:07 +00:00
Scott Gray 1e3d9b9f55 CVE-2012-1621: Ensure that collections (except for maps) are properly encoded for html when rendered using toString() e.g.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1303145 13f79535-47bb-0310-9956-ffa450edef68
2012-03-20 20:54:06 +00:00
Hans Bakker 0d802c0385 OFBIZ-4730 make <property-to-field/> in widget firstly lookup up the SystemProperty entity and then the properties file, contribution of Leon
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1302320 13f79535-47bb-0310-9956-ffa450edef68
2012-03-19 08:25:06 +00:00
Sascha Rodekamp deced8bce4 No Url encoding for get parameters (https://issues.apache.org/jira/browse/OFBIZ-2628) using the URLEncoder to encode and render URLs with special Chars. The encoding is always UTF-8. Fixed Patch without the HTTPS redirect bug.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1298454 13f79535-47bb-0310-9956-ffa450edef68
2012-03-08 16:15:25 +00:00
Sascha Rodekamp b3e7f4fb32 Revert r1297006 because the encoding makes a problem with redirecting from HTTP to HTTPS
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1297443 13f79535-47bb-0310-9956-ffa450edef68
2012-03-06 12:24:12 +00:00
Sascha Rodekamp e1b53e3d50 No Url encoding for get parameters (https://issues.apache.org/jira/browse/OFBIZ-2628) using the URLEncoder to encode and render URLs with special Chars. The encoding is always UTF-8
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1297006 13f79535-47bb-0310-9956-ffa450edef68
2012-03-05 11:13:29 +00:00
Jacques Le Roux c6288f1d46 A patch from Wai "widget <image> tag to use css for resizing" https://issues.apache.org/jira/browse/OFBIZ-4678
Summary: The purpose of this patch is to address the following:
1. Provide a standardized set of image width and height specs for page layout in ofbiz. This gives ofbiz a uniform look throughout as it applies to image display.
2. Preserve the aspect ratio of the image when using these standardized image sizes.
3. One place to make styling modifications (eg. css file).
4. Decouple styling from code (eg. java,ftl,xml,html,jsp,etc).

Regarding including the real image size, the width/height attributes in <img> specifies the boundary of the image when shown on the page. If you need to specify the real size of the image, the server code would have to perform the determination. Afterwards, you can include the actual dimensions of the image in the title attribute of <img>

Details:
Manually specifying the image width and height does help with preserving the layout of a page regardless of the image size to be shown. The challenge with this method is that the image shown on the page in question may be distorted if the aspect ratio of the image differed from that of the width and height attributes of <img>. This basically forces the person uploading the image to be more vigilant about image aspect ratios.
The purpose is to harmonize on the display size of images with a standardized set of width/height constraints in which an image must fit and preserve the aspect ratio of images.

Currently the source files (eg. ftl, xml) either manually specifies the width or height of a displayed image (ie widget <image> and html <img> tag). The problem with specifying only one constraint is that an image can affect the layout of the page if the user uploads an image where the aspect ratio could be large.

Some ftl and xml files specify both the width and the height. The problem with this is that if the aspect ratio of the image in question does not match that of the width and height of the <img> tag, the image would be displayed distorted.

The solution was to create a standardized set of CSS styles that both configure the displayed image size and preserve the image aspect ratio (eg. thumbnail size, medium size and large size). Of course, the developers can further define or modify the styles to suit their need.

By using CSS, one can change the size of displayed images without having to tamper with the ftl and/or xml files. This helps to reduce potential bugs that come with modifying the ftl and xml files. The existing way of doing things is to go through each ftl or xml file in question and manually modify the width and/or height of the <image> and/or <img> tag.

The question about the "border" around images. If you do not wish to have a border around the image, just remove it from the CSS style. It's that easy No need to change anything else. Ie. configuration to the image is done on the CSS style and not on the <image>, <img> tag.

NB: The current patch does not apply to all displayed images. I have only made appropriate modifications to widget <image> and html <img> tags that have either specified the width and/or height. There are numerous <image> and <img> tags spread all over the project that do not specify dimensions. I would have to modify them as I encountered them when I could see where and how they are displayed on the screen. Note that these images would not be affect by this patch.

jleroux: despite my efforts I was not able to check all screens. But I think it's ok

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1296782 13f79535-47bb-0310-9956-ffa450edef68
2012-03-04 11:54:13 +00:00
Jacopo Cappellato f18d49458f First pass in the direction of the implementation of a more flexible mechanism to plugin different scripting technologies and in the same time being able to get rid of a lot of framework related custom code to support them.
In particular these chenges should make it easier to implement JSR-223 (even if I think that we should still treat Groovy in a special way).


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1296762 13f79535-47bb-0310-9956-ffa450edef68
2012-03-04 07:24:47 +00:00
Jacques Le Roux 0acaefd402 A patch from Nicolas Malin "On extend form, use call-parent-actions element to run the herited form action" https://issues.apache.org/jira/browse/OFBIZ-2889
On widget form at this time the actions on parents form is not executed if child form contains also actions.
A solution is to implement a new element call-parent-actions on <actions> and <row-actions> element.
for more info see : http://markmail.org/message/hy3puy3fhpzqo7fd

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1293565 13f79535-47bb-0310-9956-ffa450edef68
2012-02-25 10:00:43 +00:00
Sascha Rodekamp 0b01894ec1 BUGFIX: return value of String.replace(CharSequence, CharSequence) ignored in org.ofbiz.widget.form.[Macro/Html]FormRenderer.appendExternalLoginKey(String) (https://issues.apache.org/jira/browse/OFBIZ-4694): A patch from Michael Brohl Same error in both Classes MacroFormRenderer and HtmlFormRenderer.
Will provide a patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1244401 13f79535-47bb-0310-9956-ffa450edef68
2012-02-15 08:53:07 +00:00
Erwan de Ferrieres 05c9bae6e5 tabs to spaces, no functional changes - java files
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1230478 13f79535-47bb-0310-9956-ffa450edef68
2012-01-12 10:37:35 +00:00
Erwan de Ferrieres c011b5e9cd OFBIZ-4614 - property auto-field-map in services in actions in forms, not working as describe in xsd description, name of map is not used - A patch from Olivier Heintz
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1227365 13f79535-47bb-0310-9956-ffa450edef68
2012-01-04 22:34:47 +00:00
Erwan de Ferrieres b41313ca26 OFBIZ-4641 - in Form.xml, special characters are not manage correctly in description if text-size is used in drop-down - a patch from Olivier Heintz
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1227340 13f79535-47bb-0310-9956-ffa450edef68
2012-01-04 21:46:53 +00:00
Jacques Le Roux 97d79c74f4 A patch from Leila Mekika "Use-when not working on multi-forms submit button" https://issues.apache.org/jira/browse/OFBIZ-4605
The submit button of a form multi is rendered even if we add a use-when condition

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1221913 13f79535-47bb-0310-9956-ffa450edef68
2011-12-21 22:24:58 +00:00
Erwan de Ferrieres 10f612c5e9 OFBIZ-4487 - enable definition for position on sortfield - patch from Youssef Khaye and Olivier Heintz
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1220927 13f79535-47bb-0310-9956-ffa450edef68
2011-12-19 20:16:01 +00:00
Adrian Crum a90a7cb45b Changed the behavior of screenlet title bar: Do not hide title bar controls when screenlet is collapsed.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1206013 13f79535-47bb-0310-9956-ffa450edef68
2011-11-24 23:01:31 +00:00
Hans Bakker 62b4f44ab3 update the form renderer. when a content url starts with http, do not prefix the url with the website url
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1202081 13f79535-47bb-0310-9956-ffa450edef68
2011-11-15 07:41:50 +00:00
Adrian Crum 68cb7f39d8 Added some comments to broken section of code in MacroFormRenderer.java. No time to fix it right now.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1197028 13f79535-47bb-0310-9956-ffa450edef68
2011-11-03 09:43:43 +00:00
Jacques Le Roux 087262557c * Uses rather minified css for elrte Editor
In last commits (1178141, 1178111) I put wrong paths for:
* elrteEditor for css pathes is now elrte-1.3
* missed js in elrte-1.3/js/i18n for i18n files



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1178166 13f79535-47bb-0310-9956-ffa450edef68
2011-10-02 09:48:05 +00:00
Jacques Le Roux 70902dcb86 Missed a change in HtmlFormRenderer.java
Removes useless/redundant jQuery files
Adds a elrte translation file for Ukraine file which was provided in a patch from Sascha related to 1.2 but is missing in 1.3

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1178151 13f79535-47bb-0310-9956-ffa450edef68
2011-10-02 08:49:58 +00:00
Adrian Crum e341923a6a Small JavaDoc fixup for my last commit - no functional change.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1173047 13f79535-47bb-0310-9956-ffa450edef68
2011-09-20 09:26:27 +00:00
Adrian Crum 4b7cd7434a Changed the screen widget boundary comment behavior per a discussion on the dev mailing list. Setting the widget.properties file widget.verbose property to false now acts like a "master switch" to turn off all widget boundary comments - it ignores all other settings. If the property is set to true, then the setting can be overridden in web.xml or in the screen context.
This commit also removes the demonstration widgetVerbose setting in the Example component's web.xml file - which caused some confusion, and it comments out the setting in the web.xml file that is used for creating new components.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1172954 13f79535-47bb-0310-9956-ffa450edef68
2011-09-20 02:55:44 +00:00
Sascha Rodekamp 16607bb1ac UPDATE: Some improvements with Map iterations (https://issues.apache.org/jira/browse/OFBIZ-4415) A patch from Dimitri Unruh which improves some Map Iterations.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1170525 13f79535-47bb-0310-9956-ffa450edef68
2011-09-14 10:52:01 +00:00
Jacques Le Roux 617330e6d5 Continued refactoring (WIP...)
* UtilValidate.is(Not)Empty wherever possible
* Remove useless boiler plate code which makes things harder to read
 * if on one line w/out {}, it avoid future errors: you can't miss the block if you need to add a line
 * else on one line w/out {}, it avoid future errors: you can't miss the block if you need to add a line
 * no else when return in previous if
 The result is a much easier code to read. I'd recommend to use this style everywhere in OFBiz. Of course this suppose a screen with larger width than in 2000 years...


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1170442 13f79535-47bb-0310-9956-ffa450edef68
2011-09-14 06:18:26 +00:00
Jacques Le Roux e844e0dff1 Revert to r1169754, will see later: FlexibleStringExpander issues: UtilValidate.is(No)tEmpty() can't be used...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1170109 13f79535-47bb-0310-9956-ffa450edef68
2011-09-13 10:50:53 +00:00
Jacques Le Roux 065f14810c Related to the recent UtilValidate.is(Not)Empty() effort. I found the reason, you can't safely pass a FlexibleStringExpander to UtilValidate.is(Not)Empty. All other cases were all right. Lesson learned the hard way, I put comments about that...
I also refactored, I prefer if/else with only one short expression to be on the same line, notably when return is used (then else is useless)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1169917 13f79535-47bb-0310-9956-ffa450edef68
2011-09-12 20:48:10 +00:00
Jacques Le Roux 0305d6560d Related to the recent UtilValidate.is(Not)Empty() effort. This part is OK and I prefer this style, easier to read and check (sorry not for the 1st review). I will continue on the rest, if I don't read myself blind on it...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1169891 13f79535-47bb-0310-9956-ffa450edef68
2011-09-12 19:35:20 +00:00
Jacques Le Roux e497883d62 VCard.java: replaec an UtilValidate.isNotEmpty() by a simple isEmpty()
ShoppingCart.java: a tabs has been automatically replaced by 8 spaces, fixes it
UtilValidate.java: removes useless parentheses
GeneriDao.java: fixes a wrong UtilValidate.isNotEmpty
ModelFormField.java: revert all UtilValidate.is(Not)Empty() changes though I ddid not find an error there, it must be one because https://localhost:8443/humanres/control/EditResponsibilityTypes is not rendered correctly. I will check again

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1169754 13f79535-47bb-0310-9956-ffa450edef68
2011-09-12 14:13:17 +00:00
Jacques Le Roux 2b712efb98 No functional changes, simple code refactoring around UtilValidate.is(Not)Empty()
Changes implementation of UtilValidate.isEmpty() for Collection and Map by using isEmpty() instead of c.size() == 0). It's more clear and as efficient. Removes also useless parentheses there.

Makes use of UtilValidate.is(Not)Empty() everywhere it makes senses. This for 2 reasons:
* Make the code more readable by replacing the (!)null/isEmpty pattern.
* Avoid possible NPEs when only isEmpty() was used (after Entity.find... for instance). I found a lot of cases (242 today) where isEmpty() could perhaps be replaced in Framework. But I guess no NPE checks were missing there and anyway it was too much for me to check them all... So I only did the relevant changes in Applications...



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1169478 13f79535-47bb-0310-9956-ffa450edef68
2011-09-11 17:06:11 +00:00
Adrian Crum 642c6383e5 Fix NPE I introduced in my previous commit. Reported by Chatree Srichart.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1165233 13f79535-47bb-0310-9956-ffa450edef68
2011-09-05 10:47:32 +00:00
Adrian Crum b891086624 Fixed a ModelFormField bug introduced in rev 1075322 - date and date-time form fields were throwing exceptions because the description Strings were HTML encoded before being converted to other types. I moved the HTML encoding to post-conversion.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1165011 13f79535-47bb-0310-9956-ffa450edef68
2011-09-04 13:26:57 +00:00
Hans Bakker 9b17664d42 add the viewsize and viewindex parameters to the buttons on a list form to remember the paage and pagesize automatically
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1160539 13f79535-47bb-0310-9956-ffa450edef68
2011-08-23 04:26:06 +00:00
Adrian Crum dfb1eac36f Fixed a screen widget bug where non-existent hyperlink parameter values were rendered as "null" - https://issues.apache.org/jira/browse/OFBIZ-4358.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1153752 13f79535-47bb-0310-9956-ffa450edef68
2011-08-04 04:51:19 +00:00
Erwan de Ferrieres 968819599e Forgot modification in HtmlFormRenderer.java at rev 1145293 when using a time-dropdown
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1148033 13f79535-47bb-0310-9956-ffa450edef68
2011-07-18 20:07:25 +00:00
Adam Heath de833d793f FIX: Fix rendering of forms that have no fields defined.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139855 13f79535-47bb-0310-9956-ffa450edef68
2011-06-26 18:07:38 +00:00
Jacques Le Roux 4853449c25 A patch from Nicolas Malin <<Display dateTime field with input method time-dropdown not use context value to display hour and minutes>> https://issues.apache.org/jira/browse/OFBIZ-4319
If you define a dateTime field like that :

<field name="estimatedStartDate"><date-time input-method="time-dropdown" step="10"/></field>
and pass in context : estimatedStartDate = "2011-06-016 20:30:00"
when you edit the form, estimatedStartDate takes the good value 2011-06-016 on date, but takes nowTimestamps.hour for dropdown hour instead of 20 and nowTimestamps.minutes for dropdown minutes instead of 30

To test the patch :

    go to ofbiz example component with given date : "https://localhost:8443/example/control/FormWidgetExamples?field4=2001-01-01 02:21:000"
    the field 4 must have hour to 02 and minutes to 21

The patch also corrects multiple definition : sr.append("\" value=\"");
and removes unneeded escape at end line : if (UtilValidate.isEmpty(requiredStyle)) requiredStyle = "required";



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139385 13f79535-47bb-0310-9956-ffa450edef68
2011-06-24 17:33:25 +00:00
Jacques Le Roux dd7e1be1c1 A patch from Leon <<"setUserPreference" goes to main page instead last view if current form includes any lookup field>> https://issues.apache.org/jira/browse/OFBIZ-4313
When I open a form which include lookup field and then click the expand/collapse button around the upper right corner in the the header, the page will go to "main" after user preference is settled.

The cause is the requests initiated by lookup field does not remember the last view name. It simply use "main" instead.

Patch to make lookup requests remember the LAST_VIEW_NAME correctly.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1137433 13f79535-47bb-0310-9956-ffa450edef68
2011-06-19 20:59:35 +00:00