Reputation: 4358
Suppose I have two pages A.jsp
and B.jsp
. I have few elements on both the pages which has been generated through GWT
code. Now I want to get the value of a element which is there on A.jsp
while I'm sending a request through B.jsp
and I want to pass that value into the request header.
I'm generating a request with:
RequestBuilder rb = new RequestBuilder(RequestBuilder.GET, queryUrl);
I have tried using getElement()
getElement however it is giving the elements which are there on that.
I want to access elements from other pages. Is it possible?
Upvotes: 0
Views: 222
Reputation: 41089
If this was possible, than theoretically any website would be able to get any data from any other page open in a browser, including credit card numbers, passwords, etc. Fortunately, it's not possible.
If you need to share data between different apps/pages that you control, you need to use a browser cookie, a server session, or a database/datastore to store this data. In other words, when something happens on page B, store this data somewhere where an app running in page A can access it.
Upvotes: 2