当前位置:网站首页>How to implicitly pass values when transferring forms
How to implicitly pass values when transferring forms
2022-07-04 16:45:00 【Struggling young man】
When the form is transferred , How to implicitly pass the value .
Case description
- When modifying form elements , When you click the Modify button , Need to send out get request , So that it can be displayed in the form that pops up later ( Good user experience ).
- The request from the foreground to the backend is get request , And pass it to a value id Used to query the corresponding tables in the database ,id For all fields of this value and return to the foreground , The foreground will render the required fields to the page .
- When the user makes modifications in the pop-up box , Then submit the data to the background interface , After the background interface receives the data , Execute database statement , Complete data update .
difficulty
The problem to be solved appears in the second step , That is, data modification , And send the data back to the background . And here comes the question , How does the database know which data you want to modify ? Your pop-up box form What the form submits is only the modified value , Not given id ah .
This is the time , In the first step , We have found all the attributes in the data , Why not send a message id
Well ?
what ? You said you didn't want users to modify id( Primary key )? Oh , It's easy to do . We can add another label to the form , And the value is preset , That is, you need to modify the database corresponding to that data id( Primary key ), But we don't show it to users , We hide it . Ah , Just play !
When submitting data at this time , There is id( Primary key ) 了 , Problem solving .
Here is a solution for you , If there is a better way , Welcome to leave a message .
边栏推荐
- System. Currenttimemillis() and system Nanotime (), which is faster? Don't use it wrong!
- Model fusion -- stacking principle and Implementation
- 散列表
- Actual combat | use composite material 3 in application
- Understand asp Net core - Authentication Based on jwtbearer
- APOC custom functions and procedures
- Review of Weibo hot search in 2021 and analysis of hot search in the beginning of the year
- Oracle监听器Server端与Client端配置实例
- .Net 应用考虑x64生成
- Statistical learning: logistic regression and cross entropy loss (pytoch Implementation)
猜你喜欢
What should ABAP do when it calls a third-party API and encounters garbled code?
Hidden communication tunnel technology: intranet penetration tool NPS
Function test - knowledge points and common interview questions
How to decrypt worksheet protection password in Excel file
[Previous line repeated 995 more times]RecursionError: maximum recursion depth exceeded
时钟轮在 RPC 中的应用
Opencv learning -- geometric transformation of image processing
A trap used by combinelatest and a debouncetime based solution
Web components series - detailed slides
Anta is actually a technology company? These operations fool netizens
随机推荐
Task state rollback and data blocking tasks based on check point mechanism
实战:fabric 用户证书吊销操作流程
Principle and general steps of SQL injection
Statistical learning: logistic regression and cross entropy loss (pytoch Implementation)
Daily notes~
Summary of database 2
After the eruption of Tonga volcano, we analyzed the global volcanic distribution and found that the area with the most volcanoes is here!
Accounting regulations and professional ethics [6]
基于check-point实现图数据构建任务
How to decrypt worksheet protection password in Excel file
Application and Optimization Practice of redis in vivo push platform
Oracle监听器Server端与Client端配置实例
Statistical learning: logistic regression and cross entropy loss (pytoch Implementation)
L1-072 scratch lottery
Accounting regulations and professional ethics [11]
C # realizes FFT forward and inverse transformation and frequency domain filtering
Accounting regulations and professional ethics [10]
@EnableAspectAutoJAutoProxy_ Exposeproxy property
Research Report on market supply and demand and strategy of China's four sided flat bag industry
[North Asia data recovery] a database data recovery case where the disk on which the database is located is unrecognized due to the RAID disk failure of HP DL380 server