Retaining field value for thtmlb:fileUpload
Hi,
I have created a input file field using tag thtmlb:fileUpload. When user selects a file using browse and then navigate to some other views and come back to the view which has file field, then I need to set the value of this field with the file user had previously selected.
Any help on this would be highly appreciated.
Regards,
Vimal
Hi NewLitus,
thank you for your answer.
I know how to check if a file exists. The problem is that I don�t have the opportunity to do this. I have to handle a user input but when the input is somjething like this "kdbfksdbksb", the fileUpload seems to "notice" that this is not a correct file path and the upload action method is not called (I debugged it several times).
here is my code (that�s just a test of course):
public String btUpload_action() {
info("Button Upload pressed");
logger.entering(getClass().getName(), "***btUpload_action()");
UploadedFile uploadedFile = (UploadedFile)getFileUpload1().getUploadedFile();
if(uploadedFile != null) { // or check here if the file exists....
String uploadedFileName = uploadedFile.getOriginalName();
// Some browsers return complete path name, some don't
// Make sure we only have the file name
// First, try forward slash
int index = uploadedFileName.lastIndexOf('/');
String justFileName;
if ( index >= 0) {
justFileName = uploadedFileName.substring( index + 1 );
} else {
// Try backslash
index = uploadedFileName.lastIndexOf('\\');
if (index >= 0) {
justFileName = uploadedFileName.substring( index + 1 );
} else {
// No forward or back slashes
justFileName = uploadedFileName;
Long uploadedFileSize = new Long(uploadedFile.getSize());
String uploadedFileType = uploadedFile.getContentType();
//.....and so on
return null;
the problem is that I cannot do any check because of this strange behavior!
Similar Messages
-
How to get item field values for old versions?
I need to be able to query old field values from previous versions of items in a SharePoint list. I can't execute code on the server (it needs to work with SharePoint Online/O365 for a start).
So far the ONLY API I've that lets me do this is the lists.asmx GetVersionCollection SOAP call.
This lets me specify a single field name and returns an XML structure with the values for the various versions, along with the modification time and who made the change - but NO reliable way of actually identifying *which* version (i.e. an ID or label). That
is, if I know I need to fetch the Title value from version 512 ("1.0") of item 1 in list "Documents", I don't see how to reliably parse the results to determine which entry is version 512. While they may be returned in order, in many cases
the entries are actually missing when there was no field value present (or perhaps when the field hadn't been created yet). I've tried comparing the Modified date to the Created date of the corresponding FileVersion item (which I can get via CSOM or REST),
and while it works some of the time, it's not reliable. I've also looked at the output from the lists.asmx GetVersion API but I don't see how that's useful either, as the Created property for all versions always seems to be just the date the file was originally
created.
It does seem odd to me that there's not a neat way of doing this - if I need to return information for several fields but just for a single version, I have to make a whole lot of requests that return far more info than I need, and then I need to figure out
how to parse the returned text in the case of, say, multiple-value taxonomy fields etc.
Anyone tried doing anything similar here?
Thanks
Dylantry these links:
https://support.office.microsoft.com/en-us/article/Track-and-view-version-information-for-SharePoint-list-items-2d69d936-fb0b-4c84-830e-11708e6ec317?CorrelationId=f87cf6ea-8cbf-446a-a4a0-e2c3a86b3425&ui=en-US&rs=en-US&ad=US
https://social.technet.microsoft.com/Forums/en-US/e48ff216-7ed1-4b20-9f21-d496b1583eea/how-to-get-item-field-values-for-old-versions?forum=sharepointdevelopment
http://sharepoint.stackexchange.com/questions/20019/get-meta-data-from-a-previous-version-of-a-document-through-webservice-in-moss-2
http://sharepoint.stackexchange.com/questions/121594/getting-information-from-previous-versions-of-a-sp-list-using-csom
Please mark answer as correct if it is correct else vote for it if you find it useful Happy SharePointing -
Immediate postback does not retain field values under a dataTable
A fairly common input dialog requirement is allowing the user to enter a variable number of rows of data -- as a concrete example say the form has one <h:inputText/> for a subject followed by a <h:dataTable/> initially with one <h:inputText/> for a URL, with a <h:commandButton immediate="true"/> called "Add Row". The user fills in subject, enters a URL, and then pushes "Add Row" to allow the entry of a second URL. This is an "immediate" button, and the action just adds a new element to the backing bean property which is a list of URL's.
This almost+ does what the developer wants -- the form is redisplayed with a new empty URL row, the subject field remains filled in with what the user already entered, but the problem is the already filled in URL field is reset to blank.
So it appears that input fields inside of a <h:dataTable/> do not retain user input if the form is submitted in immediate mode, but fields outside of <h:dataTable/> are preserved.
I am using Sun's RI JSF 1.2, and it is not clear if this is just a bug, or some fundamental limitation. Given that the input fields in a data table have unique names that include the row index it seems possible that the posted parameters for the rows in a data table that remain after the action method adds or removes a row can be applied to the new view, just like for fields outside of the data table, and furthermore, this is what the user and developer would expect.
The questions are:
<ol><li>Is this a bug?</li>
<li>If it is not a bug, what is another way to achieve the desired behavior?</li>
</ol>EEG wrote:
Hello.
I'm using Apex 4.1.0 on Oracle 10.2.0.5 and Oracle app server (mod_plsq).
Unfortunately, whenever I change this field to "InActive" in an existing row and then click my "Add Row" button, the tabular form re-appears with a new row but the modified row still has "Active" as the setting.
I checked the values in my COL_CHOICES collection to be sure that the "active_status" field actually changed from "Active" to "InActive" for the existing/modified row. And it did. The modified row in the collection shows "InActive" as the value, even though the page displays "Active" for the value.
How then can I make this drop down show the actual modified value?
I've looked at the APEX_ITEM docs and have tried various combinations of the parameters but nothing works.The second parameter to <tt>apex_item.select_list</tt> is the value for the control. Your code has
apex_item.select_list(16, null, 'Active;Y,InActive;N', 'style="color:darkred;"', 'NO', '%NULL%', '%', 'f16_' || '#ROWNUM#', NULL, 'NO') active_statusThis will always have the value NULL and thus default to the first option "Active". You need to use the appropriate column from the collection here instead of NULL:
apex_item.select_list(16, c021, 'Active;Y,InActive;N', 'style="color:darkred;"', 'NO', '%NULL%', '%', 'f16_' || '#ROWNUM#', NULL -
Setting default field values for multi-line text fields in lists?
For the multiple lines of text field in a list, I'm using SharePoint Designer 2013 to set a default
value for the field, but I need that default value to include rich text formatting (the default value includes a formatted table). Is this possible without having to delve into JavaScript? And if so, how?Yes, we can :)
You can do it with powershell
$web = get-spweb <yourweb>
$list = $web.lists["<yourList>"]
$field = $list.fields["<yourField>"]
$field.DefaultValue = "place your html code here"
$field.update()
hope that helps -
Retaining Variable Value for Scenario Restart
I have a slave-package where i use many variables for JDBC connection/url/login/passwd and Target File Path - all have been defined as type HISTORIZE
My packages are as follows
(1) There are many odiSqlUnload steps in the slave-package which uses the connection information & file path from the variables which have been declared in it.
(2) I just have declare variable steps in the slave-package, and have created a master-package which calls this slave-package's scenario using the command[i] "odiStartScen -GLOBAL.var_name=<var_value>"
so that all variables get their values from the master-package's call with variable values sent thru it
(3) Now, the problem occurs when I have to re-start my slave-package's scenario. Say for eg, the first step in my slave-package works fine, but errors out on the next step;
But when I re-start it for the next step, ODI doesn't seem to pick up values from the variables even though they are of type HISTORIZE, and I get an error with empty values for JDBC, URL & file path which I had specified as variables.
Why is it that the variables are not able to retain their values.
Any help would be greatly appreciated!finally I get it. I have to use #varname instead of :varname, otherwise it won't get error but just cannot get value. and I find out this #varname cannot be defined anywhere, otherwise the value will get lost also.
-
Key Field Value for File Adapter Sender Wildcard
Hello everybody, is there a way to use a wildcard for the property of NamA.keyFieldValue in the cc for a Fils Sender????, here's an example why, I need to take some Files via PI 7.0 and my key filed can change according to the file an example is that in a file can be HF28 and in another file can be HF29, the only character that is going to be constant is the H, I would really appreciate any suggestions, thanks in advance.
Regards,
Julio CesarHi Julio
File sender adapter will read the file using FCC
Key Field Value entry is mandatory if the key field name is set. Otherwise, the entry can be ignored
http://help.sap.com/saphelp_nw70/helpdata/EN/34/393071e9b998438ddb8ce97cd617a1/frameset.htm
Content Conversion ( The Key Field Problem )
Thanks
Gaurav Bhargava -
Is there a place where I can find all the field values for RH_STRUC_GET
Hello Gurus,
I there a place or maybe some documentation that will explain or give the different values for the FM RH_STRUC_GET fields ?
Thank you,
JZHi Jorge
In this link you have an example .
RH_STRUC_GET Performance
Now when I needed that for crm I used to a class
'CL_CRM_PPM_UM_TOOLKIT.
In sdn you can find examples about used the FM or class -
Updating EBAN table with custom field values for BAPI_PR_CREATE
Hi all,
My requirement is PR creation by BAPI_PR_CREATE Function Module .
for pr item level customer added 10 fields in the EBAN table append structure CI_EBANDB. .
i am creating PR by using Funcation module BAPI_PR_CREATE.
In this Function Module I have to pass the structure name and field values in the EXTENTIONIN .
what is the structure name I have to pass and how populate data in to the EBAN table.
after that i have to create PR and updating 10 two custom field values in the EBAN Table.
how to proceed for updating the customer field values in the eban table.
thanks in advance.
sriHi
First you need to append a structure in EBAN table, The values you need to pass to the
BAPIPAREX - Ref. structure for BAPI parameter ExtensionIn/ExtensionOut
Structure will be the appen strucre created in EBAN.
You can pass the values of the 10 fileds to the VALUEPART1, VALUEPART2 fileds in the structure with 240 charcters each.
Hope this helps.
Thanks & Regards
Kishore -
Maximum number of field values for an Authorization object
Hello Experts,
What is the maximum number of field values can be put into the role, Is there any restriction for number of values in any authorization field?
I have put 326 values for field OBJTYPE in authorization object S_DEVELOP but not able to generate the role it is showing error.
I know I can split the values in two or more instance but wanted to know if there any other way out for this (without creating more instances)
Thanks
DKIf the values for OBJTYPE are not uniquely the same, then the system will not merge them - so nothing will be lost.
Here is another trick for you: Choose one of the transactions in the role (or create a "symbolic" one for it") where you want to have the OBJTYPE proposed automatically from. Now maintain one or two of them in SU24 and then download it to your PC. Now from the F4 value range of the OBJTYPE, add all of those values you want via copy&paste into the file and then upload into SU24 again. A read old / merge new in PFCG will then swing all the values in for you.
Single values are always better, as you do not know what else is hidden in the range or might be added in future. It is however common to see FROM / TO ranging around values such as DEBUG and FUGR although all aspects of S_DEVELOP are dangerous - even in display mode.
Cheers,
Julius -
ProvisionConfig field value for SPWeb
We want to get the value of ProvisionConfig field present in the AllWebs table of SharePoint Content Database. Can someone please let us know how can we get this value? Also we would like to what does a value of -1 in this field imply?
Is querying the AllWebs table to get the Provisionconfig field value advisable?
Any help on this is highly appreciatedHi You can get this value by directly querying the webs table in contentDB
But changing its value is highly not recommended
Best Regards, Ashutosh | SharePoint World -
Key field values for file content conversion at sender communicationchannel
Hi all,
I am working on scenario File to Idoc.In this scenario at the sender side we configure the file content conversion for .CSV file.
In the flat file i am having more than one orders, XI will pick the file and creates a separate Idoc for each sales order at r/3.
We have similar fields "Order Item Number" both header and item.
If we got '00000' on the Header item then it should create a new idoc at the r/3 side other wise it will create line item.
Order item number will be 00000 for header but it will differ from order item to item.
source structure
Order Header
Order type
Sold-to-code
PO number
Order item number
Order date
AdresName1
AdresName2
Street and House number
Postal Code
City
Country Code
Filler
Order Item
Order type
Sold-to-code
PO number
Order item number
Order date
Product code
Order quantity
Item text
Filler
Now I have some questions....
I don't have standard filed values to give the key fileds at source structure.
I need to create the Idoc at r/3 system for each individual record.
Is it possible to create new idoc with out using the Key filed value?
If it is possible then how can i proceed with fcc?
please give me your valuable suggestions
Best Regards,
satya
Edited by: satyatanuku on Mar 3, 2010 1:41 PM
Edited by: satyatanuku on Mar 3, 2010 1:42 PM
Edited by: satyatanuku on Mar 3, 2010 1:44 PMHi,
Just check the Content Conversion Parameters- Recordset Structure.
If you have filled in this parameter with
Header,1,Item,1
then change it to
Header,1,Item,3
Regards
Chandra -
Multiple select list not retaining the value for the first time
Hi,
I have a 3 select list depends on each other. select_list1 -- > select_list2 --> multiselect3. I have use denes example to create them.
For the first time when I select values from 1,2,3 and runs a report based on it, it works fine but *does not retain the selected value in multiselect3.
for the second time submit the process, it retails value in multiselect3. Please tell me if you came across this issue before
Here is the code.
function get_select_list_xml_VL(pThis,pSelect,pSelect1,pSelect2){
var l_Return = null;
var l_Select = html_GetElement(pSelect);
var l_Select1 = html_GetElement(pSelect1);
var l_Select2 = html_GetElement(pSelect2);
var get = new htmldb_Get(null,html_GetElement('pFlowId').value,
'APPLICATION_PROCESS=Cascading_Select_List_VL',0);
get.add('F660_CASCADING_TEST',l_Select1.value + '_' + pThis.value + '_' + l_Select2.value);
alert(l_Select1.value + '_' + pThis.value + '_' + l_Select2.value);
// alert(document.getElementById("F660_CASCADING_TEST").value);
gReturn = get.get('XML');
if(gReturn && l_Select ){
var l_Count = gReturn.getElementsByTagName("option").length;
l_Select.length = 0;
for(var i=0;i<l_Count;i++){
var l_Opt_Xml = gReturn.getElementsByTagName("option");
appendToSelect(l_Select, l_Opt_Xml.getAttribute('value'),
l_Opt_Xml.firstChild.nodeValue)
get = null;
function appendToSelect(pSelect, pValue, pContent) {
var l_Opt = document.createElement("option");
l_Opt.value = pValue;
if(document.all){
pSelect.options.add(l_Opt);
l_Opt.innerText = pContent;
}else{
l_Opt.appendChild(document.createTextNode(pContent));
pSelect.appendChild(l_Opt);Please ask any question if you dont understand about the problem.
Thanks -
Referencing UDF's with field values for approvals
Hi there,
Apologies for the weird output I'm getting here - the forum engine is trying to markup my syntax. eg. of what it should look like " $[$38.11.0]"
I have created a generic approval template (due to sheer number of approvals required) for use with Marketing documents in SAP B1.
To explain what I'm on about - I'm not sure exactly what we call these fields in SAP B1, but as an example, the quantity field on the lines of a marketing document is $[$38.11.0]. This enables you to create a generic template across all marketing docs.
I have a UDF on the header which I need to reference in this approval query, but I need a generic reference to it. At the moment, the only way I can get it to work is to directly reference the table of the actual document e.g. $[ORDR.U_APPROVAL.0]. This makes it impossible to make the template generic.
I tried the following code, but I got an internal error 1004:
DECLARE @PROCEED VARCHAR(10)
SET @PROCEED = case when (SELECT ISNULL($[ordr.U_APPROVAL.1],'N')) = 'Y' then 'Y'
case when (SELECT ISNULL($[oinv.U_APPROVAL.1],'N')) = 'Y' then 'Y'
case when (SELECT ISNULL($[oign.U_APPROVAL.1],'N')) = 'Y' then 'Y'
case when (SELECT ISNULL($[oige.U_APPROVAL.1],'N')) = 'Y' then 'Y'
case when (SELECT ISNULL($[orin.U_APPROVAL.1],'N')) = 'Y' then 'Y' end
Select Result from (select case when isnull($[$38.30.0],'')='210' and @PROCEED = 'Y' then 'TRUE' else '' end as Result
union
select case when isnull($[$13.10001004.0],'')='210' and @PROCEED = 'Y' then 'TRUE' else '' end as Result) as T1 where result <> '' order by 1 DESC
If this worked, it would solve my problem, however, I don't think SAP likes referencing variables that are not on the current open form.
Is there some other way of doing this? SAP gurus out there - please come to my rescue!
Edited by: Simon Carolin on Jan 26, 2010 9:44 AMHi Suda,
I'm unfortunately still getting internal error 1004 with the following code:
DECLARE @PROCEED VARCHAR(10)
DECLARE @OBJECT NUMERIC(19,6)
SET @OBJECT = (SELECT ObjectCode FROM NNM1 WHERE Series = $[$88.0.Number])
SET @PROCEED = (select case when @OBJECT = 17 THEN (SELECT $[ordr.U_APPROVAL.1])
when @OBJECT = 13 THEN (SELECT $[oinv.U_APPROVAL.1])
when @OBJECT = 59 THEN (SELECT $[oign.U_APPROVAL.1])
when @OBJECT = 60 THEN (SELECT $[oige.U_APPROVAL.1])
when @OBJECT = 14 THEN (SELECT $[orin.U_APPROVAL.1]) end)
Select Result from (select case when isnull($[$38.30.0],'')='210' and @PROCEED = 'Y' then 'TRUE' else '' end as Result
union
select case when isnull($[$13.10001004.0],'')='210' and @PROCEED = 'Y' then 'TRUE' else '' end as Result) as T1 where result <> '' order by 1 DESC
Am I on the right track or did you have a different idea?
Thanks.
Regards,
Simon -
Getting form field values for radio button
Hello to the forum.
I have a form in which I want to control the value selected in a radio buttons field on whether to allow access to another field.
I can't find info neither here nor in the examples.
Anybody know how to do?
Thank in advance.Hi,
You can use the change event of the radio button list.
Select the readio button list exclusion group, in script editor select the "change" event. As an example if we have two selections "aa" and "bb" which have values 1 and 2 respectively.
You can write this Javascript code to change event.
if(this.rawValue == 1)
xfa.host.messageBox("aa");
else if(this.rawValue == 2)
xfa.host.messageBox("bb");
Hope helps,
Asiye -
Get ZTABLE Old - New Field Values for Change Document History Log
I have done all necessary log configuration for ZTABLE and able to see change document log via SCU3. My problem is that I have to write FM which returns Log History for a specific period. As I have gone throught the Report RSVTPROT. But not able to get how the log data is displayed.
Hi,
Try checking the FMs..Sorry I am not sure which one gives the log....These are the FMs called in the program RSVTPROT.
DBLOG_READ
DBLOG_READ_WITH_STATISTIC
Thanks,
Naren
Maybe you are looking for
-
Can I get rid of Exchange with the new Server just released?
Hi, I saw the new 8 core machine and all the programs. I also recieved an email from Apple telling me about all the calendaring it has. I want to get rid of Exchange. I have Outlook on 99.9% the clients, however, and they're not going to get rid of W
-
Hi, we are a small business company and have 7 computers at different locations from which the salespersons would have to log on to SharePoint services and to collaborate on Excel documents (using just the browser). I would have to be the "admin" and
-
Jgoodies form layout creates screens that look different
Hi, I am creating GUI screens using FormLayout. These look great on my laptop-15". The minute this goes to a desktop 17" monitor or to a 14" laptop some of the screen content is not displayed. I am forced to use a scroll pane and bring in horizontal
-
My other web browser is working and I am able to surf the internet with it. I have an iMac.
-
I want to download the GL account field status info from SAP table in the following path:IMG -> Financial Accounting(New) -> Financial Accounting Global Settings(New) -> Ledgers -> Fields -> Define Field Status Variants.I need each field status info(