How to retrive data from Web Panel

Mr Parashar October 4, 2016

Hi Team,

I add a web panel which create a table and show data from database using context provider.

But I not getting the way how to retrieve the data from web panel.

Any help will be appreciated.

Thanks.

 

 

1 answer

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 4, 2016

What does "retrieve data from web panel" mean?  A panel is for display to the user, it's not for giving other bits of code data. 

What are you trying to retrieve and why aren't you asking for the data directly from the appropriate source?

Mr Parashar October 4, 2016

Hi Nic thanks for reply,

Retrive data from web panel mean, i make a table in velocity and add using a web panel and user fill some data in the table row.

There is a save button which save that data. How to do this i have no idea.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 4, 2016

I'm confused now.  Do you have this "web panel" that you want to take data from working or not?

Mr Parashar October 4, 2016

Nic Don't be confused.. Look there is a velocity template that render editable table through web panel plugin module..... and there is a add button on velocity.

What i want when user add data to table and click on button all the value of table stored in db.

Now i am stuck how to get data from table and which class is responsible for handling that event.

 

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 4, 2016

I'm afraid your explanations are not helping.

You keep saying web panel.  Originally you were asking to get data from this panel, now you've said you're trying to save data.

It's totally unclear what you want to do, or what you have working so far.

 

Mr Parashar October 4, 2016

Nic, i want to get data from table which is generated by velocity template using web panel. In this table user fill data rows , when user click on button i want to get table rows data and want to store in db. 

Problem is that, i dont know, how to get table data on button click so that i can save in db.

Hope u can understand.

 

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 5, 2016

I'm really sorry, but repeating things I did not understand before does not add anything.

Could you please just tell us what you have working now (if anything) and what you are trying to get to (So far, all that is clear is that you want to save some table data?  But you haven't said whether this belongs to an issue or not, or how you want to implement it)

Mr Parashar October 5, 2016

There is an issue view that render table through web panel and i want to get that table data from issue.

Is that fine Mr Nic.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 5, 2016

Not really.  It's gone back to the original description, to which I ask again:

What does "retrieve data from web panel" mean?  A panel is for display to the user, it's not for giving other bits of code data.

 

 

Mr Parashar October 5, 2016

Thanks Nic..

I understood web panel is for rendering.

So help me to solve the problem, what i should do to make a table on issue and get their data on button click event without redirect to any other page.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 5, 2016

The last change of goal here now seems to be nothing to do with web-panels or getting data at all.

It seems to be that you want a field that behaves as a table.  Your previous mentions of web-panels, getting data and saving things are utterly irrelevant, you just want a table like field.  Is that right?    (And I have no idea why you've now mentioned "redirect to other page")

Mr Parashar October 5, 2016

Yup you are right, i wana a field that look like a table and also behave like a table user add data to field and i want to fetch that data.

Please help Nic to solve this problem.. I am stuck here..

 

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 5, 2016

Right, so you want a table field.  What does the rest of that mean?  "also behave like a table user add data to field and i want to fetch that data." does not make sense. 

Mr Parashar October 5, 2016

Yup a table field and want to fetch table data that's it nothing else.

How ? Don't know. Help !!

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 5, 2016

What does "fetch table data" mean?

You keep saying it without explaining it.  If it's a field, the data will be in it, in front of the user.  So why do you keep saying "fetch data"?

Mr Parashar October 6, 2016

Ok help me how to do?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 6, 2016

Seriously, I can't help you "fetch data" when you refuse to tell me what you mean.

 

Mr Parashar October 6, 2016

Nic.. i am not refuse to tell you anything .Fetch data is getting data from field(table)

My goal is to implement a table like field in issue through which user add data and their is a button for save that data in db.

I don't know to do implement this.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 6, 2016

Please, please, answer the question.

>Fetch data is getting data from field

What does that mean?  It tells us nothing about what you want. 

What would a "fetch" actually do?  

You have some data in a field.  You "fetch" it.  What happens?

 

Mr Parashar October 6, 2016

Nic.. Fetch data is getting data from field ? Ans is " Yes "

after fetch data from field i want to operate some operation.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 6, 2016

Ok, let me explain the problem with your question this way.

  • You are an expert farmer, and I'm a new one
  • I have a field.
  • It has some crops in it.
  • I want to argfrwangle the crops in the field.

Now, can you please tell me how to argfrwangle it?

Mr Parashar October 6, 2016

My question is simple.....

you are the expert not me..

What you understand tell me i make you clear.... don't stretch the word fetch.

 

I further down my question i want to implement such like this...

1.png

 

 

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 6, 2016

I am not "stretching" the word.  I am asking you to explain what it means in this context.  All I can tell you when you say "I want to fetch my data" is that "you can fetch it". 

When you "fetch" your data, what do you expect to happen? 

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 6, 2016

We've established that you want a table like field. 

You need to explain what your "fetch" is.

Mr Parashar October 6, 2016

Have a look at pic i want to make something like this.

If you are an expert who handle this support then help me.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 6, 2016

I cannot help you when you do not explain what you want to do.

Yes, you want a table field, we got to that in the end.

But you need to explain "fetch".  What does it do?  Think of the end-user - what do they do that does this "fetch" and what do they get back?

Mr Parashar October 6, 2016

fetch is nothing forget about fetch

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 6, 2016

Argh.  <rant>Then why did you waste so much time saying it and then avoiding explaining it?  </end rant>

The answer to the table part of the question is two parts

1) Keeping it simple - just ask your users to fill in a text field with table formatting. (Additionally, you could write a simple validator add-on to check that the data they've entered is in the right format)

2) Probably closer "you'll need code, and quite a lot of it".  It probably should be a field, as it's issue data, and to do that, you'll need to write a set of templates for rendering and accepting inputs, plus back end code to store it somehow (JIRA's custom field storage is simple numbers or strings, or arrays of them, so you'll either need to come up with a way to convert from table to string/array, or implement a new storage format)

On the second point, I'd avoid writing all that code by using https://marketplace.atlassian.com/plugins/com.idalko.jira.plugins.igrid/server/overview instead.

Mr Parashar October 6, 2016

Vola..

Can you explain it more.. how to acheive this..

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 6, 2016

As I already said, I'd get the table add-on.

Mr Parashar October 6, 2016

Thanks Nic for this..

can you solve my one problem..

there is a button on issue page render through web panel..

when user click on the button how can i handle that event..

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 6, 2016

No, because you have not explained the context.  Again.

 

Mr Parashar October 6, 2016

Nic context is this..

1 > I render table using webpanel with a save button.

2 > When user click on save button i want to call a method on any java class with parameters and that parameters contains data from table.

3> Java class method save that data.

 

So help me to achieve this. if it is feasible in jira.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 6, 2016

Yes, you should be able to do it, but I don't recommend it.  Do this as a field instead, then you won't need buttons or complex classes.

 

Mr Parashar October 6, 2016

Don't understand explain it a bit.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 6, 2016

If you do this as a field, then JIRA's edit functionality will do most of the work for you.  You will need to provide a "view" template to show the user the current values, and an "edit" template to allow them to change the data when it's on an edit screen.  You will also need some java to save and retrieve the data if you are translating it between storage and screen (e.g. your templates display a table, but you're actually storing xml).  If you do it that way, then you don't need "save" buttons - the data will be saved by the edit action in JIRA

Mr Parashar October 6, 2016

Ok that sounds good..

but if i click on button how can i handle that event

Fadi Naaji February 14, 2019

I know it's been a while, but have you found a solution @Mr Parashar other than buying the plugin?

Suggest an answer

Log in or Sign up to answer