dynamic-forms

Angular Material Stepper causes mat-formfield to validate for dynamic forms when returning to an older step

半腔热情 提交于 2020-07-06 09:18:17
问题 A problem is occurring with the angular materials mat-stepper when working with dynamic forms. For example I have a stepper with 3 steps each having there own form. The first step however uses a hidden form to determine if it is valid or not as this step can dynamically add more forms so binding all of them to the step is impossible. When you are on the first step you can create multiple forms and everything works as expected without any random validation occurring to the new forms added. The

How to collect submitted values of a List<T> in JSF?

爱⌒轻易说出口 提交于 2020-05-23 17:33:43
问题 I have a bean with a List<T> : @Named @ViewScoped public class Bean { private List<Item> items; private String value; @Inject private ItemService itemService; @PostConstruct public void init() { items = itemService.list(); } public void submit() { System.out.println("Submitted value: " + value); } public List<Item> getItems() { return items; } } And I'd like to edit the value property of every item: <h:form> <ui:repeat value="#{bean.items}" var="item"> <h:inputText value="#{bean.value}" /> <

jQuery .remove() not working for dynamic form

做~自己de王妃 提交于 2020-01-25 13:01:36
问题 I am creating a dynamic form that allows a user to add/remove text fields. While I can add text fields with no problem, I'm having difficulty removing specific text fields. Whenever I add additional text fields (say a total of 5), and try to remove any of them except for the first one (say removing field 3). All of them disappear as if the page reloaded. It's as if my jQuery code doesn't run when "Remove Field" is pressed. <form> ... <div id="answers"> <div class="form-group" id="option1">

jQuery .remove() not working for dynamic form

冷暖自知 提交于 2020-01-25 13:00:11
问题 I am creating a dynamic form that allows a user to add/remove text fields. While I can add text fields with no problem, I'm having difficulty removing specific text fields. Whenever I add additional text fields (say a total of 5), and try to remove any of them except for the first one (say removing field 3). All of them disappear as if the page reloaded. It's as if my jQuery code doesn't run when "Remove Field" is pressed. <form> ... <div id="answers"> <div class="form-group" id="option1">

angular2 dynamic form calculate amount total

余生颓废 提交于 2020-01-21 09:52:51
问题 Trying to calculate a total payOffs.amount (payOffs is a FormArray). Not sure how to do it properly so the total would observe changes to current and new for amounts. Here is a plnkr that I took as a base code: http://plnkr.co/edit/nHSIsciSZNTQzQjxkXsk?p=preview <form (ngSubmit)="onSubmit()" [formGroup]="form"> <label>Name</label> <input type="text" formControlName="name" [(ngModel)]="myModel.name" placeholder="Name"> <p>Pay Offs</p> <table class="simple-table"> <tr> <th>Amount</th> <th>Date<

Rails3 dynamic_form plugin not recognized?

痴心易碎 提交于 2020-01-14 13:14:27
问题 Using Ruby 1.9.2 and Rails 3 - When attempting to use <%= error_messages_for 'story' %> I get this error: DEPRECATION WARNING: error_messages_for was removed from Rails and is now available as a plugin. Please install it with `rails plugin install git://github.com/rails/dynamic_form.git`. (called from _app_views_stories_new_html_erb__1042605186_33967248__100840187 at C:/Ruby192/shovell/app/views/stories/new.html.erb:1) So I did what it said and ran the plugin install. However now I have an

How to create dynamic JSF form fields

…衆ロ難τιáo~ 提交于 2019-12-27 08:18:29
问题 I have found some similar questions like this one, however there are so many ways this can be done that it made me more confused. We are getting an XML file that we are reading. This XML contains information on some form fields that needs to be presented. So I created this custom DynamicField.java that has all the information we need: public class DynamicField { private String label; // label of the field private String fieldKey; // some key to identify the field private String fieldValue; //

How to obtain the record ID of the selected item in a dropdown list in google app-maker

╄→гoц情女王★ 提交于 2019-12-24 07:36:19
问题 Summary Obtaining the record ID of the selected item in a drop-down list or radio-button UI appears to be a common question, but I have not found the answer for Google AppMaker despite months of searching. The example use case: is I wish to edit a product that belongs to a family: Product - (N:1) --> Family Product - (M:N) --> FeatureValues Example The product belongs to the family Credit Card . The credit-card family has the following features: |Contactles |Near field |Rates |Chip & Pin| In

Dynamically generated form field loses value when new field is added

眉间皱痕 提交于 2019-12-24 04:44:10
问题 I am generating a dynamic fieldset with javascript. For adding fields, I use the following function (this function actually adds more than one field) //add test function addTest() { var location = document.getElementById('addTestLocation'); var num = document.getElementById('addTestCount'); var newnum = (document.getElementById('addTestCount').value -1)+ 2; num.value = newnum; location.innerHTML += "<div id='testContainer_"+newnum+"'><label for='test_"+newnum+"'>Test name: </label><input type

JSF 2 dynamic form and bean validation JSR 303

徘徊边缘 提交于 2019-12-24 02:21:35
问题 I generate a dynamic form starting from annotated bean. The same bean is annotated for validation using Hibernate Validator. The form is correctly rendered but when the form is submitted the validation step it's not executed. If I write the same form with jsf tag the validation works properly. Any idea? The form page: <body> <ui:composition template="/template/basetheme_one_col.xhtml"> <ui:define name="title">#{__g4cController.entityClassName}</ui:define> <ui:define name="main_area"> <h2>#{_