|
parse javascript link wrongly in lookup layer dialog if there's slash '/' in data
--------------------------------------------------------------------------------- Key: OFBIZ-4281 URL: https://issues.apache.org/jira/browse/OFBIZ-4281 Project: OFBiz Issue Type: Bug Components: framework Affects Versions: SVN trunk Reporter: Leon Priority: Trivial Fix For: SVN trunk Attachments: fieldlookup.js.patch e.g. in lookup dialog (in layer mode), one href value of a link is "javascript:set_value('123/ABC');", then the ofbiz framework will parse it to "javascript:lookupAjaxRequest('ABC'');&presentation=layer')". It's wrong. Correct one should be given href itself. to fix: judge whether the link contains "javascript:set_" before split it by slash '/'. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
[ https://issues.apache.org/jira/browse/OFBIZ-4281?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Leon updated OFBIZ-4281: ------------------------ Attachment: fieldlookup.js.patch > parse javascript link wrongly in lookup layer dialog if there's slash '/' in data > --------------------------------------------------------------------------------- > > Key: OFBIZ-4281 > URL: https://issues.apache.org/jira/browse/OFBIZ-4281 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: SVN trunk > Reporter: Leon > Priority: Trivial > Fix For: SVN trunk > > Attachments: fieldlookup.js.patch > > > e.g. in lookup dialog (in layer mode), one href value of a link is "javascript:set_value('123/ABC');", then the ofbiz framework will parse it to "javascript:lookupAjaxRequest('ABC'');&presentation=layer')". It's wrong. Correct one should be given href itself. > to fix: > judge whether the link contains "javascript:set_" before split it by slash '/'. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4281?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sascha Rodekamp reassigned OFBIZ-4281: -------------------------------------- Assignee: Sascha Rodekamp > parse javascript link wrongly in lookup layer dialog if there's slash '/' in data > --------------------------------------------------------------------------------- > > Key: OFBIZ-4281 > URL: https://issues.apache.org/jira/browse/OFBIZ-4281 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: SVN trunk > Reporter: Leon > Assignee: Sascha Rodekamp > Priority: Trivial > Fix For: SVN trunk > > Attachments: fieldlookup.js.patch > > > e.g. in lookup dialog (in layer mode), one href value of a link is "javascript:set_value('123/ABC');", then the ofbiz framework will parse it to "javascript:lookupAjaxRequest('ABC'');&presentation=layer')". It's wrong. Correct one should be given href itself. > to fix: > judge whether the link contains "javascript:set_" before split it by slash '/'. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13032942#comment-13032942 ] Sascha Rodekamp commented on OFBIZ-4281: ---------------------------------------- Hey Leon can you give me an example lookup where i can see the misbehavior? > parse javascript link wrongly in lookup layer dialog if there's slash '/' in data > --------------------------------------------------------------------------------- > > Key: OFBIZ-4281 > URL: https://issues.apache.org/jira/browse/OFBIZ-4281 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: SVN trunk > Reporter: Leon > Assignee: Sascha Rodekamp > Priority: Trivial > Fix For: SVN trunk > > Attachments: fieldlookup.js.patch > > > e.g. in lookup dialog (in layer mode), one href value of a link is "javascript:set_value('123/ABC');", then the ofbiz framework will parse it to "javascript:lookupAjaxRequest('ABC'');&presentation=layer')". It's wrong. Correct one should be given href itself. > to fix: > judge whether the link contains "javascript:set_" before split it by slash '/'. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13033421#comment-13033421 ] Leon commented on OFBIZ-4281: ----------------------------- hi, Sascha, here is an example: in form widget, we defined a lookup field, <field name="testMethodName"> <lookup target-form-name="lookupTestMethod" description-field-name="testMethodId" /> </field> in lookup form, we use set_values to set the target field and description field, <field name="testMethodName" widget-style="smallSubmit"> <hyperlink also-hidden="false" target-type="plain" description="${testMethodName}" target="javascript:set_values('${testMethodName}','${testMethodId}')" /> </field> Unfortunately, almost all "testMethodName" may contains character '/'. Then the link we got from lookup dialog is something like "javascript:lookupAjaxRequest blah blah", not the "javascript:set_values" we wanted. Leon. > parse javascript link wrongly in lookup layer dialog if there's slash '/' in data > --------------------------------------------------------------------------------- > > Key: OFBIZ-4281 > URL: https://issues.apache.org/jira/browse/OFBIZ-4281 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: SVN trunk > Reporter: Leon > Assignee: Sascha Rodekamp > Priority: Trivial > Fix For: SVN trunk > > Attachments: fieldlookup.js.patch > > > e.g. in lookup dialog (in layer mode), one href value of a link is "javascript:set_value('123/ABC');", then the ofbiz framework will parse it to "javascript:lookupAjaxRequest('ABC'');&presentation=layer')". It's wrong. Correct one should be given href itself. > to fix: > judge whether the link contains "javascript:set_" before split it by slash '/'. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13033482#comment-13033482 ] Sascha Rodekamp commented on OFBIZ-4281: ---------------------------------------- Hi Leon, thanks i'll take a look. Anyway i thought of refactoring this parsing mechanism, we can do better :-). Cheers Sascha > parse javascript link wrongly in lookup layer dialog if there's slash '/' in data > --------------------------------------------------------------------------------- > > Key: OFBIZ-4281 > URL: https://issues.apache.org/jira/browse/OFBIZ-4281 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: SVN trunk > Reporter: Leon > Assignee: Sascha Rodekamp > Priority: Trivial > Fix For: SVN trunk > > Attachments: fieldlookup.js.patch > > > e.g. in lookup dialog (in layer mode), one href value of a link is "javascript:set_value('123/ABC');", then the ofbiz framework will parse it to "javascript:lookupAjaxRequest('ABC'');&presentation=layer')". It's wrong. Correct one should be given href itself. > to fix: > judge whether the link contains "javascript:set_" before split it by slash '/'. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13033490#comment-13033490 ] Leon commented on OFBIZ-4281: ----------------------------- Hi, Sascha, Very glad to hear that you're considering parsing mechanism improvement. There's a little assumptions and restriction in current implementation. IMHO, maybe we can use different decorator (to exclude header and tailer of layer mode) and html iframe in div (to avoid ajax replacement) in future version. best, Leon > parse javascript link wrongly in lookup layer dialog if there's slash '/' in data > --------------------------------------------------------------------------------- > > Key: OFBIZ-4281 > URL: https://issues.apache.org/jira/browse/OFBIZ-4281 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: SVN trunk > Reporter: Leon > Assignee: Sascha Rodekamp > Priority: Trivial > Fix For: SVN trunk > > Attachments: fieldlookup.js.patch > > > e.g. in lookup dialog (in layer mode), one href value of a link is "javascript:set_value('123/ABC');", then the ofbiz framework will parse it to "javascript:lookupAjaxRequest('ABC'');&presentation=layer')". It's wrong. Correct one should be given href itself. > to fix: > judge whether the link contains "javascript:set_" before split it by slash '/'. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13033990#comment-13033990 ] Sascha Rodekamp commented on OFBIZ-4281: ---------------------------------------- Hi Leon, the problem with i frames we got problems with the resizable functions. We tried that once but decided to use normal DIVs. The best think would be to remove the complete parsing stuff and directly set the "OnEventUpdateArea" links when the result table is created. The problem is to tell the MacroFormRenderer that he is rendering a (i.e.) Pagination field for a lookup and not for a "normal" table. Currently i looking for a solution until i find one i commit your patch. If you have an idea let me know. Have a good day Sascha > parse javascript link wrongly in lookup layer dialog if there's slash '/' in data > --------------------------------------------------------------------------------- > > Key: OFBIZ-4281 > URL: https://issues.apache.org/jira/browse/OFBIZ-4281 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: SVN trunk > Reporter: Leon > Assignee: Sascha Rodekamp > Priority: Trivial > Fix For: SVN trunk > > Attachments: fieldlookup.js.patch > > > e.g. in lookup dialog (in layer mode), one href value of a link is "javascript:set_value('123/ABC');", then the ofbiz framework will parse it to "javascript:lookupAjaxRequest('ABC'');&presentation=layer')". It's wrong. Correct one should be given href itself. > to fix: > judge whether the link contains "javascript:set_" before split it by slash '/'. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4281?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sascha Rodekamp closed OFBIZ-4281. ---------------------------------- Resolution: Fixed > parse javascript link wrongly in lookup layer dialog if there's slash '/' in data > --------------------------------------------------------------------------------- > > Key: OFBIZ-4281 > URL: https://issues.apache.org/jira/browse/OFBIZ-4281 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: SVN trunk > Reporter: Leon > Assignee: Sascha Rodekamp > Priority: Trivial > Fix For: SVN trunk > > Attachments: fieldlookup.js.patch > > > e.g. in lookup dialog (in layer mode), one href value of a link is "javascript:set_value('123/ABC');", then the ofbiz framework will parse it to "javascript:lookupAjaxRequest('ABC'');&presentation=layer')". It's wrong. Correct one should be given href itself. > to fix: > judge whether the link contains "javascript:set_" before split it by slash '/'. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4281?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Leon reopened OFBIZ-4281: ------------------------- after fieildlookup.js refacoring reacently, this bug occurs again. > parse javascript link wrongly in lookup layer dialog if there's slash '/' in data > --------------------------------------------------------------------------------- > > Key: OFBIZ-4281 > URL: https://issues.apache.org/jira/browse/OFBIZ-4281 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: SVN trunk > Reporter: Leon > Assignee: Sascha Rodekamp > Priority: Trivial > Fix For: SVN trunk > > Attachments: fieldlookup.js.patch > > > e.g. in lookup dialog (in layer mode), one href value of a link is "javascript:set_value('123/ABC');", then the ofbiz framework will parse it to "javascript:lookupAjaxRequest('ABC'');&presentation=layer')". It's wrong. Correct one should be given href itself. > to fix: > judge whether the link contains "javascript:set_" before split it by slash '/'. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4281?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sascha Rodekamp closed OFBIZ-4281. ---------------------------------- Resolution: Fixed Thanks Leon fixed in Trunk @Rev1358988 > parse javascript link wrongly in lookup layer dialog if there's slash '/' in data > --------------------------------------------------------------------------------- > > Key: OFBIZ-4281 > URL: https://issues.apache.org/jira/browse/OFBIZ-4281 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: SVN trunk > Reporter: Leon > Assignee: Sascha Rodekamp > Priority: Trivial > Fix For: SVN trunk > > Attachments: fieldlookup.js.patch > > > e.g. in lookup dialog (in layer mode), one href value of a link is "javascript:set_value('123/ABC');", then the ofbiz framework will parse it to "javascript:lookupAjaxRequest('ABC'');&presentation=layer')". It's wrong. Correct one should be given href itself. > to fix: > judge whether the link contains "javascript:set_" before split it by slash '/'. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
| Free forum by Nabble | Edit this page |
