I am dynamically adding inputs of type text to a vuex collection. It adds the input at specific index. It works good, no problem with that. The issue happens when I write some value in the input and then try to add a new one. The input value jumps to the newly added input.
Here is a simple code example: https://codesandbox.io/s/0yrzrw6120
Steps to reproduce:
There is a default input. You can add inputs below that, so:
Add a new input.
Write some value in the newly added input.
Add a new input again from the default button.
What I am expecting is a new input below default with no value in it, and it works but the value of the last input jumps to the newly added.
I understand is not a problem with the additions of items but the value in the inputs.
Related
I created a formular where the user can fill out one to infinite Forumlars, for this i made a state were the formular data is stored as an array of objects. One forumluar is a object and when the user creates a new Formular a new object is pushed in the array.
Each Formular beginns with one field which after filled out gets checked if it already exists if not it should open up the other field underneath it.
<template v-if="$store.state.Zell_Open[$store.state.PAGENUMBER]===true">
The Checked state is a array of booleans for each Formular one Bool.
If the Users Checks the state gets Updated correctly and the Zell_Open state is turned to true
Heres my whole state after checking
The Problem is that rest of the formular that should be shown after checking and putting the Zell_Open state on true isnt shown.
If i change the PAGENUMBER state manually (with vue dev tools) one up and down then its shown correctly.
Before i added the [$store.state.PAGENUMBER] part and when the Zell_Open state wasnt a array but instead a single bool (at first it should be just one formular not one to infinite) it worked perfectly fine.
Also i should mention that its always just one Formula shown the one that has the array place of Pagenumber.
use v-show instead of v-if if you mean toogling
or sometimes vue templates will not accept condition inside of it
I created a variable vAverageSalary and an input box which serves as a place to change the value of the variable (variable is defined as money). The problem is that nothing happens when I enter numbers in the input box for the variable. Additionaly when I check the value in the 'Variable Overview' for that varable, I see nothing. Even if I try to define here any value for the variable, nothing changes. And the third option I tried was to define any value by going to the 'Properties' of the input box and entering any value in the 'Settings for the Selected Value' (Tab - 'Constraints'). Even when I enter a value here, nothing happes - the system simply ignores everything I enter.
How can I make an input box to take the value I enter in it?
UPDATE: It seems that the problem is when I define the variable inside the input box as 'Money' - I can only set velue when I type for example '121,00 €'. However if I make a text box and try to write out the value of the variable, I get the message "Error: Garbage after expression ','". The input box takes the values in that format, but the output is garbage. And if I type for example any number without '€' sign, than input box ignores my input and gives me the previous value... Why?
I made a simple query to return 1 field. One of the fields is the user's input.
Item (input)
Description (return value)
I now want to use the returned value in a simple textbox on the report, but it's giving me a scope error. Makes sense, but how do I tell the textbox which dataset to look in (there are multiple datasets)?
If you right mouse click on the text box you can create a placeholder.
You can then specify the value of this placeholder to be the required value from the dataset.
I need to add a checkbox to an existing pdf. Also I need set the export value of this checkbox. I saw that this should be configurared with appearance dictionary /AP but till now I did evaluate how to set this on a new checkbox.
With export value I mean the value which is marked in the screenshot
Here is my code which creates a checkbox, but the export value is always empty...
case AcroFields.FIELD_TYPE_CHECKBOX:
PdfFormField checkbox = PdfFormField.createCheckBox(stamper.getWriter());
checkbox.setWidget(fieldVO.rect, PdfAnnotation.HIGHLIGHT_NONE);
checkbox.setFieldName(fieldVO.getNewName());
//TODO set export value
log.info("exportValue is " + fieldVO.getExportValue());
stamper.addAnnotation(checkbox, fieldVO.getPageNumber());
break;
First this: you are using PdfFormField to create a check box. That is hard. Why don't you use the RadioCheckField class?
rect = new Rectangle(180, 806, 200, 788);
checkbox = new RadioCheckField(stamper.getWriter(), rect,
"fieldVO.getNewName()", "on");
field = checkbox.getCheckField();
Then you want to define the appearances. Suppose that onOff is an array of PdfAppearance objects, one with the appearance if the box isn't selected (0) and one if the box is selected (1). Note that the name of the off state should be "Off" as defined in ISO-32000-1. As far as I remember, the standard recommends using "Yes" for the on state, but you can use a custom value, such as "MyCustomValue":
field.setAppearance(
PdfAnnotation.APPEARANCE_NORMAL, "Off", onOff[0]);
field.setAppearance(
PdfAnnotation.APPEARANCE_NORMAL, "MyCustomValue", onOff[1]);
In this case, the appearance of the on state will be stored as an entry with key /MyCustomValue. This key is a PDF name object and several restrictions apply. That's why the /Opt key was introduced:
(Taken from ISO-32000-1) Beginning with PDF 1.4, the field dictionary for check boxes and radio buttons may contain an optional Opt entry. If present, the Opt entry shall be an array of text strings representing the export value of each annotation in the field. It may be used for the following purposes:
To represent the export values of check box and radio button fields in non-Latin writing systems. Because name objects in the appearance dictionary are limited to PDFDocEncoding, they cannot represent non-Latin text.
To allow radio buttons or check boxes to be checked independently, even if they have the same export value.
EXAMPLE: a group of check boxes may be duplicated on more than one page such that the desired behavior is that when a user checks a box, the corresponding boxes on each of the other pages are also checked. In this case, each of the corresponding check boxes is a widget in the Kids array of a check box field.
In your case, you'd need something like:
PdfArray options = new PdfArray();
options.add(new PdfString("My Custom Value"));
field.put(PdfName.OPT, options);
I haven't tested if this works, I'm merely interpreting what ISO-32000-1 says and converting the spec into iText code.
Finally, you can add the field.
stamper.addAnnotation(field, 1);
I have a dynpro with several mandatory fields. Now, I want to implement a button that prefills those fields with suggested values. Further, another button should deactive certain input fields.
My problem is that the button actions are stopped by the empty mandatory fields. Is there a way to skip those validations, if a certain button has been pressend and acces the PAI - PBO handling?
You must execute your action before the mandatory checks bloc other changes.
Instead of
MODULE ... INPUT
you can try
MODULE ... AT EXIT-COMMAND
Normally the AT EXIT-COMMAND allows you to leave the screen, even if the values are missing. But you can use it also to fill mandatory fields.
After filling the mandatory field I would call again the screen to process PBO/PAI again. So the user can see the new changed values.
One question: Could you also fill the values during PBO?
Something like:
MODULE ... OUTPUT.
IF field is initial.
field = default_value.
ENDIF.