[JBoss JIRA] (RF-12860) Overriding 'Array.prototype.remove' causes JS error when rich:accordion is used
by Brian Leathem (JIRA)
[ https://issues.jboss.org/browse/RF-12860?page=com.atlassian.jira.plugin.s... ]
Brian Leathem commented on RF-12860:
------------------------------------
Thanks for looking at this [~dlee606]!
To re-iterate, the steps are:
# Forked the appropriate RichFaces repository into your account
# Clone your fork to your local machine
# Make your changes and commit them
# Push your changes back to your fork
At that point you should see the button to initialte the pull request on the github page of your fork.
> Overriding 'Array.prototype.remove' causes JS error when rich:accordion is used
> -------------------------------------------------------------------------------
>
> Key: RF-12860
> URL: https://issues.jboss.org/browse/RF-12860
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-output
> Affects Versions: 4.3.0.Final
> Environment: JBOSS7/JSF2/FirefoxESR10 or Chrome25.0.1
> Reporter: David Lee
> Assignee: Brian Leathem
> Labels: javascript, rich:accordionItem
> Fix For: 4.3.2
>
> Attachments: richfaces-sanbox.zip
>
>
> Put the rich:accordionItem and rich:extendedDataTable on same page,
> and just click on any column for sort.
> The firebug will show an error:
> items[i].__header is not a function
> [Break On This Error]
> h -= items[i].__header().outerHeight();
> Looks like accordionItem.js line48 been triggered when sort:
> $(document).one("javascriptServiceComplete", function () {
> item.__fitToHeight(item.getTogglePanel());
> });
> And after this happened, my whole thing crashed.
> Now more sortable or click for any action.
> ----
> *from QA:*
> When the following code is insterted to the page:
> {code}
> <script type="text/javascript">
> //<![CDATA[
> Array.prototype.remove = function(s) {
> for (var i = 0; i < this.length; i++) {
> if (s == this[i]) {
> this.splice(i, 1);
> }
> }
> };
> //]]>
> </script>
> {code}
> and rich:accordion is present, clicking on rich:accordionItem causes the following JS error (from firebug):
> {code}
> items[i].__header is not a function
> [Break On This Error]
> h -= items[i].__header().outerHeight();
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 8 months
[JBoss JIRA] (RF-12874) Cyclic dependencies in RF5 build
by Lukáš Fryč (JIRA)
[ https://issues.jboss.org/browse/RF-12874?page=com.atlassian.jira.plugin.s... ]
Lukáš Fryč reassigned RF-12874:
-------------------------------
Assignee: Lukáš Fryč
> Cyclic dependencies in RF5 build
> --------------------------------
>
> Key: RF-12874
> URL: https://issues.jboss.org/browse/RF-12874
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: build/distribution
> Affects Versions: 5.0.0.Alpha1
> Reporter: Pavol Pitonak
> Assignee: Lukáš Fryč
> Priority: Blocker
> Fix For: 5.0.0.Alpha1
>
> Original Estimate: 1 hour
> Remaining Estimate: 1 hour
>
> 1. git clone git://github.com/richfaces/richfaces5.git
> 2. mvn clean verify -D integration=jbossas
> result:
> {quote}
> [INFO] Scanning for projects...
> [ERROR] The projects in the reactor contain a cyclic reference: Edge between 'Vertex\{label='org.richfaces:richfaces-parent:5.0.0-SNAPSHOT'\}' and 'Vertex\{label='org.richfaces:richfaces-build-resources:5.0.0-SNAPSHOT'\}' introduces to cycle in the graph org.richfaces:richfaces-build-resources:5.0.0-SNAPSHOT --> org.richfaces:richfaces-parent:5.0.0-SNAPSHOT --> org.richfaces:richfaces-build-resources:5.0.0-SNAPSHOT -> [Help 1]
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions, please read the following articles:
> [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectCycleException
> {quote}
> This is what we agreed on community meeting on 26 Mar 2013:
> {quote}
> #agreed The simplest resolution to the cyclic dep is to make richfaces-build-resources parent-less
> {quote}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 8 months
[JBoss JIRA] (RF-12860) Overriding 'Array.prototype.remove' causes JS error when rich:accordion is used
by David Lee (JIRA)
[ https://issues.jboss.org/browse/RF-12860?page=com.atlassian.jira.plugin.s... ]
David Lee commented on RF-12860:
--------------------------------
Hi Brian,
Seems the Pull request Submit Button never render for me...even I been logged in for GitHub.
Any more tips for that?
> Overriding 'Array.prototype.remove' causes JS error when rich:accordion is used
> -------------------------------------------------------------------------------
>
> Key: RF-12860
> URL: https://issues.jboss.org/browse/RF-12860
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-output
> Affects Versions: 4.3.0.Final
> Environment: JBOSS7/JSF2/FirefoxESR10 or Chrome25.0.1
> Reporter: David Lee
> Assignee: Brian Leathem
> Labels: javascript, rich:accordionItem
> Fix For: 4.3.2
>
> Attachments: richfaces-sanbox.zip
>
>
> Put the rich:accordionItem and rich:extendedDataTable on same page,
> and just click on any column for sort.
> The firebug will show an error:
> items[i].__header is not a function
> [Break On This Error]
> h -= items[i].__header().outerHeight();
> Looks like accordionItem.js line48 been triggered when sort:
> $(document).one("javascriptServiceComplete", function () {
> item.__fitToHeight(item.getTogglePanel());
> });
> And after this happened, my whole thing crashed.
> Now more sortable or click for any action.
> ----
> *from QA:*
> When the following code is insterted to the page:
> {code}
> <script type="text/javascript">
> //<![CDATA[
> Array.prototype.remove = function(s) {
> for (var i = 0; i < this.length; i++) {
> if (s == this[i]) {
> this.splice(i, 1);
> }
> }
> };
> //]]>
> </script>
> {code}
> and rich:accordion is present, clicking on rich:accordionItem causes the following JS error (from firebug):
> {code}
> items[i].__header is not a function
> [Break On This Error]
> h -= items[i].__header().outerHeight();
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 8 months
[JBoss JIRA] (RF-12876) Add "for" attribute to rich:focus
by Bernard Labno (JIRA)
Bernard Labno created RF-12876:
----------------------------------
Summary: Add "for" attribute to rich:focus
Key: RF-12876
URL: https://issues.jboss.org/browse/RF-12876
Project: RichFaces
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: component-misc
Affects Versions: 4.3.1
Reporter: Bernard Labno
Sandbox version of focus component allowed to specify "focus"
for particular component. I'm missing this very much.
If we have single form with 2 popup panels each with single input then with rich:focus we cannot specify which input should be focused.
And when we open popup A then we want to have input in that popup to be focused, not the one in popup B.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 8 months
[JBoss JIRA] (RF-12831) <rich:validator/> performs ajax validation without updating underlying model field
by Kamil Roman (JIRA)
[ https://issues.jboss.org/browse/RF-12831?page=com.atlassian.jira.plugin.s... ]
Kamil Roman updated RF-12831:
-----------------------------
Attachment: rf-12831.zip
Hi Juraj,
I am attaching a maven project illustrating and reproducing the issue. The validation method fragment with the comment is the best explanation
{code}
public void validateField1(FacesContext context, UIComponent toValidate, Object value) {
System.out.println("argument value: " + value);
System.out.println("model value: " + model.getField1());
//my expectation is that value is equal to associated model field - validation should be performed after applying request values.
//If it is not the code will throw RuntimeException
if (!model.getField1().equals(value)) {
throw new RuntimeException("value passed to the validation method should be equal to the associated model field!");
}
//this would be a workaround to the bug
model.setField1((String) value);
//validation logic omitted
}
{code}
To reproduce the issue with the code attached:
# Unzip the file attached.
# run maven install
# deploy manually the resulting target/rf-12831.war to JBoss server.
# navigate to http://localhost:8080/rf-12831/app/pages/addModel.xhtml (assuming your JBoss listens on localhost:8080)
# Change value in field1 textbox.
# Click on field2 textbox.
# RuntimeException is thrown (manually from the validation method, see code and comment above).
> <rich:validator/> performs ajax validation without updating underlying model field
> ----------------------------------------------------------------------------------
>
> Key: RF-12831
> URL: https://issues.jboss.org/browse/RF-12831
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 4.3.0.Final
> Environment: JBoss eap 6.0.0, Win 7
> Reporter: Kamil Roman
> Assignee: Juraj Húska
> Priority: Minor
> Labels: waiting_on_user
> Attachments: rf-12831.zip
>
>
> Not sure if it's a bug or a feature, but field annotated with {code}<rich:validator/>{code} with a validation method set with {code}validator{code} attribute gets validated without updating the underlying model field. My code is something like this:
> {code:title=Model.java}
> public class Model {
> //...
> public Date getValidFrom() {/*...*/}
> public Date getValidTo() {/*...*/}
> }
> {code}
> {code:title=ModelValidator.java}
> public class ModelValidator{
> private Model model;
> public boolean isValidToAfterValidFrom() {
> return model.getValidTo().after(model.getValidFrom());
> }
> }
> {code}
> {code:title=model_form.xml}
> <c:set var="model" value="#{ModelBean.model}"/>
> <h:outputLabel value="#{labels.getLabel('valid_from')}" for="validFrom" />
> <rich:calendar value="#{model.validFrom}" id="validFrom" >
> <rich:validator/>
> </rich:calendar>
> <rich:message for="validFrom"/>
>
> <h:outputLabel value="#{labels.getLabel('valid_to')}" for="validTo" />
> <rich:calendar value="#{model.validTo}" id="validTo" validator="#{modelBean.validateValidTo}">
> <rich:validator event="inputblur"/>
> </rich:calendar>
> <rich:message for="validTo"/>
> {code}
> {code:title=ModelBean.java}
> public class ModelBean {
> public Model getModel() {/*..*/}
> private ModelValidator validator;
> //...
> public validateValidTo(FacesContext context, UIComponent toValidate, Object value) {
> if(!validator.isValidToAfterValidFrom()) {
> FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_ERROR, labelBean.getLabel("valid.to.not.after.valid.from.error"), null);
> throw new ValidatorException(message);
> }
> }
> {code}
> The getModel() method returns the same Model instance as is used by the ModelValidator in ModelBean.
> Now, the testcase is:
> 1. User selects validTo earlier than ValidFrom (on a valid Model instance)
> 2. Validation passes as the underlying model value is not updated (validator refers to the same Model instance as ModelBean)
> 3. User submits the form.
> 4. System displays error message as server-side validation on submit is performed after applying request values.
> 5. User corrects the value in validTo field.
> 6. System still displays error message as validation fails, because the new value is not applied to the model (model holds the invalid value applied during failed submit).
> If this is not a bug, but a feature, it would be great if you included this behaviour in the docs!
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 8 months