reset password
Author Message
nahmed5
Posts: 57
Posted 14:47 Feb 12, 2015 |

1. Hi! I am passing plan_id from plan.jsp to StageController's Get Method. It then passes the id to stage.jsp. Now, how do I retreive the id from jsp to StageController's Post Method. I am using @Transactional but it's not helping. Please help!

2. For this homework, we don't need to use Validator. Am I correct?

 

cysun
Posts: 2935
Posted 16:31 Feb 12, 2015 |

1. I don't understand the question.

2. Right for HW4.

nahmed5
Posts: 57
Posted 17:10 Feb 12, 2015 |

I need to add something (eg stage, runway) to a specific plan. How do I get the plan_id in the StageController?

I've written plan_id passing method for a adding a stage as public Plan addStage(Stage stage, Long id) in the planDaoImpl.

Also, in stageDaoImpl, I've created public Stage saveStage( Stage stage, Long planId ).

I am passing my plan_id to the StageController's GET method to addStage.jsp. But now, I can not get the plan_id from the jsp to the POST method of StageController. SO, my new stage doesn't get added to a specific plan. (It doesn't get added to anything at all).

We are not allowed to post codes. So, I can not clarify further. But please help! I'm stuck in it since morning.

afetiso
Posts: 84
Posted 18:26 Feb 12, 2015 |

same problem, when I add new stage it create a new stage in DataBase but this stage doesn't connect to plan

afetiso
Posts: 84
Posted 18:29 Feb 12, 2015 |

<a href="plan.html?id=${list1.id}">${list1.name}</a>

for this we use @RequestParam 

but if I want to use hidden type on jsp and use id that i put there, is it possible?:

<input id="${list1.id}" name="id" type="hidden" />

nahmed5
Posts: 57
Posted 18:32 Feb 12, 2015 |

yup! I have tried using hiddentype and it works

afetiso
Posts: 84
Posted 18:34 Feb 12, 2015 |

can you show me you hidden line

afetiso
Posts: 84
Posted 18:34 Feb 12, 2015 |

are you solve problem with add stage to plan?

afetiso
Posts: 84
Posted 18:39 Feb 12, 2015 |

I have <input type='hidden' name='id' value="${list1.id}" />

what I need to write in User Controller to use it?

Not @RequestParam but something else?

nahmed5
Posts: 57
Posted 18:47 Feb 12, 2015 |

 <input type="hidden" name="planId" value="${planId}"/>

afetiso
Posts: 84
Posted 21:52 Feb 12, 2015 |
nahmed5 wrote:

 <input type="hidden" name="planId" value="${planId}"/>

how you add stage to plan? using merge?

nahmed5
Posts: 57
Posted 00:32 Feb 13, 2015 |
Sorry didn't see ur question before. Was trying to do as much of the homework as possible at the last moment. Yes, I have used merge.