Selected Files can not display in FileChooser in JavaFX - filechooser

I have problem with my code where i want to know selected file in file chooser, i try with system.print.ln can respon selected file but with text take result null.
Where error happen?

If you want someone to look at your issue quickly, DONT put your code as screenshot. Anyway I think your issue is at declaring actionStatus field using #FXML. Remove the "static" keyword.

Related

Yiidoc yoi2-redactor and kartik fileInput

I would need a little help ^^ i have a form with several file upload ( kartik/file/fileInput) and several rich textareas ( yikdoc/yii2-redactor)
And my problem is that if i don’t have the redactor, everything works, but if i have the redactors, no files are uploaded, and with a var_dump i see the variables empty…
Any idea what is the problem?
You can see my form here
code is to long so see it in codeshare. https://codeshare.io/qPbovR
and you can see my conroller here
code too long too. https://codeshare.io/RbVj34
you will see in the form that i had to duplicate fields for descriptions and use jquery to add the "redactor" content to a hidden field, other wise iit's not working, but if i don't use redactor, i don't need those.
Thank's for your help :)

How can I store an XPath as a variable in Python Selenium?

I want to be able to select text on a website, store it, and then turn that stored information into a variable. More specifically as seen in the picutre below, my goal is for the selected name, in this case, John J. John, somehow be copied, turned into a variable, and then printed, all without emulating any key binds.
HTML Inspect element photo
The code I have tried to use to get the information is this:
selectedName = browser.find_element_by_xpath('//*[#id="sign_in_box"]/div/div[2]/div/div[1]/div').get_attribute("div")
print (selectedName)
The return I am getting is this:
None
I know that the problem almost definetly lies somewhere in the path, but I can't figure it out.
Assuming your xpath is correct, you should put .text instead of .get_attribute("div") since it will not return the text you want, but the div itself.
How to get text with Selenium WebDriver in Python
Try
selectedName = browser.find_element_by_xpath('//*[#id="sign_in_box"]/div/div[2]/div/div[1]/div').text

i have a simple question about file directory in html and how to show the results of a file search

i have a piece of code that let's the user see find a file how do i get it to display where it is save eg desktop/folder/file.
my current code is a basic file input that goes like
<input type="file"/>
i want my page to display where the file is saved also on a side not is there a way to display search file results. I look up programing work and my page will show everything that is programing work in its name.
i have not tried anything as i am unsure where to start.
I'm pretty sure you want to get the full file path of a file uploaded via an HTML input element, if not, let me know.
If so, such behavior is intentionally blocked by most browsers, except for firefox. See How to get full path of selected file on change of <input type=‘file’> using javascript, jquery-ajax?. If you want to raed the file, you can use the FileReader class. Alternatively, you can make an object URL to the file object, on the onchange event, simply
var url = URL.createObjectURL(event.target.files[0]);
to use for reading purposes.

Changing number of a web page (in the URL), change the display but not the Html source code

I am facing a behavior that I really don't understand.
If you go on the webpage: https://www.edel-optics.fr/Lunettes-de-soleil.html#ful_iPageNumber=1 and inspect the code you will realize that it's the same html content as on https://www.edel-optics.fr/Lunettes-de-soleil.html#ful_iPageNumber=7
=> to test it, try to search "ERIKA - 710/T5" on both source codes and you will find it (but you should only find on the ful_iPageNumber=1).
Why is it behaving like this ?
Secondary question: how to I get the real content of https://www.edel-optics.fr/Lunettes-de-soleil.html#ful_iPageNumber=7 ?
Thank you for your help
John
Problem
You have explained that when you perform a search, you get the same results as with your pagination (page 1)
Issue
You are not getting the value your searching for placed into the URL
https://www.edel-optics.fr/Recherche.html?time=1519871844737#query=
the #query is = to nothing
You would be needing something like:
https://www.edel-optics.fr/Recherche.html?time=1519871844737#query=ERIKA%20-%20710/T5
Without seing your code its hard to say where the issue lays. it could well be that the search box is not inside the Form or it could be that the submit button is on another form to the search box, or maybe an issue with backend scripts not grabbing the get values as a result of case differences in the value name.
Without seing your script its hard to diagnose
Ok I found a solution to solve this strange problem, replace the # in the URL with a ? and you will have the actual html content (corresponding to the display)...

Input type= 'files', add value, which will be visible only for admin

How to make that input type='file' will show the file that was added previously? So when admin open post page and want to make some changes he doesn't have to add file twice, i tried few things but input is always empty? It is possible to do it? That input will show file that was added previously? I mean the name of the file or path?
I dont think that is even possible because of security reasons.