Detailed Notes
We are continuing a series of tutorials focused on Spring Boot. The crux of the project is to convert/migrate an old JSP/Tomcat application to a modern Spring Boot application and Java 7/8 to a current version. We are working on a complex form for entering data. This episode focuses on getting our data to pass to and from the web page for saving it.
You can learn more through our online classes at https://school.develpreneur.com and register for free. Registration will add you to our email list, and you will periodically receive coupons for courses and notifications of the latest releases.
Transcript Text
[Music] well hello and welcome back we are continuing working on on our application conversion uh last time around we were starting to fill out a form we're working on some drop downs and some selects uh we're going to continue that so we're going to go check this one out here that prior descriptions I bet we do not have our options built out right so if we go down to our prior descriptions uh there correct we do not have that set up so we've got our uh everything set up sort of uh but we've got an option here for we just want to build a regular option and then we you want to come in and based off of description list whoops descriptions list and then this one we don't even need the feel because this is actually just going to be um I'll give it an ID and we're going to call it descriptions list because we probably need that somewhere so we have an ID for it uh we don't need form options and so here we're going to have a description and it's going to be probably uh we can probably just let it be I and I I bet let's go look at our descriptions list uh if we go look here and our hello controller if we look at descriptions list somewhere in here descriptions list is description list which comes from the Dao get past so if we go here project Dao get past get past uh get past descriptions it's just select descriptions so that's going to be a straight up text so that's easy enough to fix let's go ahead and get this uh earnings and agent cost thing here that we did not pick up last time so these are going to be uh your standard th values which we just had some formatting around those uh where did those go they're down here aren't they I keep going by them okay yeah agent cost and earnings there we go so this we're just going to come in and this is going to be a div and we're going to do a th value and we can probably pull that out completely and make that let's do this and let's do that for our div and and we're going to do the same thing for our uh the other one we're just going to change a couple values though because now it's going to be this is going to be our value let's see how that works for us uh div div there we go so let's see if this works and that should allow us to step into our next section of filling out uh fixing another series of our uh little Loop and there we go look at that we got a bunch of descriptions not sure why we have an equal but that's okay uh then we come in here let's see those are not getting their values so let's go check those again those are oops [Music] um yeah because those need to be instead of the th value that probably needs to be the star I think that may get it for us so if we do those as a star then let's run those and if we run that and we come over here oh it blew up didn't like that probably got something in there that is not right uh project cost cannot be found okay so one project cost oh I wonder if we sent that as a single value so we probably did project cost is an object so what we need this is good we we get a little bit wh this where it gets a little interesting because now we if I can get that fixed back there we go go so what we have here is Project cost is actually not the same as this star project so we almost need it probably need it to be like this is we need to say dollar project cost times uh that should actually work let's do it this way let's just check this first um let's do him like three times and then I'll just give us so here we'll put a little pipe between them so if we do project cost here and then we do project agent percent let's see how that works let's see how those work and we come over here probably still going to blow up but at least we can see something maybe no and it is BEC oh because it's going to blow up there or not uh let's see there's still more data in the expression oh that's why let's do that and then let's get rid of this one for now so that doesn't blow up oh actually it'll be okay because we can put it there so okay so we should be okay doing that and if we run through here we go to our project boom and we're getting nothing so it's not coming across so project cost it doesn't like at all why doesn't it like that at all oh I wonder if it is actually zero um if I go back did it have it listed here no but that's probably because let's see if we've got one here we go okay so he has some stuff but he does not have earnings nor agent cost so that's not coming across right so let's go look at this so what we had um project cost and then the agent percent and so agent percent is going to be that should be oh it's whoa It's not th shoot that's problem it's not th value it's th text because we're in a dip that can cause some problems so if we do that that let's just save it here as well because this is actually just a straight it's not really as much a form thing so now let's look at it um yeah we'll just keep all of those three and then we'll clean it up in a minute clean it up next time around log in and now we've got zeros coming across which is what we wanted so we're going to take uh these and get rid of those and yeah we'll do that and [Music] then uh we've got a break and then we have the agent cost because so we wanted that there okay and then uh we've got its value I don't think we need another break do we that seems like a lot let's uh we'll see how that looks in a minute so let's fix so if we got those now we got that we've got our descriptions let's go down here look at our tasks and our actually specifically our overhead requirements actually probably both of them are broken so let's look at our tasks first and so we have an if uh we're coming in here we have an if so let's get take a look at that we're going to copy that because we're basically going to rebuild that down here uh so he's going to say select task but he doesn't have any but we do have apparently some maybe some overhead requirements for this one well let's see let me go look um let's see if we have one there we go so this one does have tasks so tasks is set up correctly but of course we're going to add some more here because this is going to do an onclick so let's go and get our overhead requirements get that one fixed and that is here we can see that we've got our old demesis the C4 each so let's just take him and it's going to be 21126 21126 oh good he is the same size and here he's instead going to be from list overhead and we want him to be uh let's see let's call him over and so it's going to be instead of Select task it's going to be select overhead and it's going to be uh over. project ID most likely uh yes project ID but it also has over. ID uh comma wh did I get that right no there we go that over ID and then why is that oh that's probably a typo up here that's probably supposed to be a comma that could cause US problems and then here uh let's see so this is going to be uh it's not be it's going to be status I'm sorry over and over ID uh status is going to be great we'll keep that and then here we're going to be we're just going to take these and put those here and those are going to be let's get rid of that and then these are each going to be we're just going to do th uh text equals and then throw it there throw it there close it so we get to take that um we'll go there uh over. scription there we go th text this is do it that way yep so that's going to be a div actually we'll just go to this part and that brings him across and we're going do that uh we'll do it like that so now there's the div close the div div div div div div div uh this one is oh I see why we had that before th text equals oh quotes and quotes close the div there we go and then this one's going to be let's close that div there and do the th text equals that and close the PRS or the yeah the double PRS which I had so that should cover it and then at the bottom we've got that which we want to have a get the filter in [Music] there I think we just called it footer let's go go check that real quick so if we go look at basically any other page oops I want that let's just kill it there we go and then come in here let's make sure we got that right we did okay so now let's run this see how we do so I think we now have a working form to some extent and now the next thing is going to be trying to change so let's pick this uh let's do this guy he's probably got both okay so he doesn't have that but now let's go take one of these and let's see because I bet we have to actually hook it up so let's change this to a bit amount of let's just say 500 and if we do save or update then we've got an issue because we got an error and that error is all the way up [Music] here uh project ID cannot be found on overhead okay so somewhere in overhead we had a project ID oh here it is a project ID but it's project project ID let's go look at our overheads that's a user oh it's in a model we want overhead model let's do it over here so it's easier to see did we have a project ID wh uh we have a project ID but it's with uh I don't think it's going to like this wants the capital I most likely so let's try that uh is that right oh here we go cannot render airor p oh as a response has already been committed double check make sure I didn't run over that latest error and okay so I think that is it so let's try that again so I kind like to send so it's going to log me in and if I come in here and I set a bit amount for 500 do a save then I'm getting an issue and it is not telling me what it is because here that save project is probably not even if we go to Hello that's probably what we're going to do next is uh go find save so it is not there what is that saor update that saver update was for register user we need to have a save project so next time around that's what we're going to pick up and we'll just pick up right where we left off and uh we're going to actually get some form saving finally and starting to get some actual uh crud you know create retrieve update delete kind of functionality into our app uh as always sh any questions you have to info at developer.com we happy to help you out point you in the right direction anywhere uh we need to or if there's some additional stuff and some examples you'd like this to do happy to do so until the next time go out there and have yourself a great day a great week and we'll see you next [Music] time
Transcript Segments
[Music]
well hello and welcome back we are
continuing working on on our application
conversion uh last time around we were
starting to fill out a form we're
working on some drop downs and some
selects uh we're going to continue that
so we're going to go check this one out
here that prior descriptions I bet we do
not have our options built out right so
if we go down to our prior
descriptions uh there correct we do not
have that set up so we've got our uh
everything set up sort of uh but we've
got an option
here for we just want to build a regular
option and then we you want to come
in and based off of description
list whoops
descriptions
list and then this one we don't even
need the feel because this is actually
just going to
be
um I'll give it an
ID and we're going to call it
descriptions list because we probably
need that somewhere so we have an ID for
it uh we don't need form options and so
here we're going to have a description
and it's going to be
probably uh we can probably just let it
be I and I I bet let's go look at our
descriptions list uh if we go look
here and our hello controller if we look
at descriptions list somewhere in here
descriptions list is description list
which comes from the Dao get
past so if we go here project
Dao get past get past uh get past
descriptions it's just select
descriptions so that's going to be a
straight up
text so that's easy enough to fix let's
go ahead and get this uh earnings and
agent cost thing here that we did not
pick up last time so these are going to
be uh your standard th values which we
just had some formatting around
those uh where did those go they're down
here aren't they I keep going by them
okay yeah agent cost and earnings there
we go so this we're just going to come
in and this is going to be a
div and we're going to do a th
value and we can probably pull that out
completely and make
that let's do
this
and let's do that for our div and and
we're going to do the same thing for our
uh the other one we're just going to
change a couple values though because
now it's going to be this is going to be
our
value let's see how that works for
us uh div div there we go so let's see
if this works and that should allow us
to step into our next section of filling
out uh fixing another series
of our uh little
Loop and there we go look at that we got
a bunch of descriptions not sure why we
have an equal but that's okay uh then we
come in here let's see those are not
getting their values so let's go check
those
again those are oops
[Music]
um yeah because those need to be
instead of the th value that probably
needs to be the
star I think that may get it for us so
if we do those as a
star then let's run
those and if we run
that and we come over here oh it blew up
didn't like
that probably got something in there
that is not
right uh project cost cannot be found
okay
so one project cost oh I wonder if we
sent that as a single value so we
probably
did project cost is an object so what we
need this is good we we get a little bit
wh this where it gets a little
interesting because now we if I can get
that fixed back there we go go so what
we have here is Project cost is
actually not the same as this star
project so we almost need it probably
need it to be like this is we need to
say
dollar project cost
times uh that should
actually work let's do it this way let's
just check this
first
um let's do him like three
times and then I'll just give us so
here we'll put a little pipe between
them so if we do project
cost here and then we do
project agent percent let's see how that
works let's see how those
work
and we come over
here probably still going to blow up but
at least we can see something maybe
no and it is BEC oh because it's going
to blow up there or not uh let's
see there's still more data in the
expression oh that's why let's do that
and then let's get rid of this
one for now so that doesn't
blow up oh actually it'll be okay
because we can put it there so
okay so we should be okay doing
that and if we run through here we go to
our project boom and we're getting
nothing so it's not coming
across so project cost it doesn't like
at all why doesn't it like that at all
oh I wonder if it is actually zero
um if I go back did it have it listed
here
no
but that's probably because let's see if
we've got one here we
go okay so he has some stuff but he does
not have earnings nor agent cost so
that's not coming across
right so let's go look at this so what
we
had
um project cost and then the agent
percent and so agent percent is going to
be that should
be oh it's whoa It's not th shoot that's
problem it's not th value it's th
text because we're in a dip that can
cause some
problems so if we do that that let's
just save it here as well because this
is actually just a straight it's not
really as much a form thing so now let's
look at it um yeah we'll just keep all
of those three and then we'll clean it
up in a
minute clean it up next time
around log
in and now we've got zeros coming across
which is what we wanted so we're going
to take uh these and get rid of those
and yeah we'll do that and
[Music]
then uh we've got a break and then we
have the agent cost because so we wanted
that there okay and then uh we've got
its value I don't think we need another
break do we that seems like a lot let's
uh we'll see how that looks in a minute
so let's fix so if we got those now we
got that we've got our descriptions
let's go down here look at our tasks and
our actually specifically our overhead
requirements actually probably both of
them are broken so let's look at our
tasks
first and so we have an if uh we're
coming in here we have an if so let's
get take a look at that we're going to
copy that because we're basically going
to rebuild that down here uh so he's
going to say select task but he doesn't
have any but we do have apparently some
maybe some overhead requirements for
this one well let's see let me go look
um let's see if we have one there we go
so this one does have tasks so tasks is
set up correctly but of course we're
going to add some more here because this
is going to do an onclick so let's go
and get our overhead requirements get
that one
fixed and that is here we can see that
we've got our old demesis the C4 each so
let's just take him and it's going to be
21126 21126 oh good he is the same size
and here he's instead going to be from
list
overhead and we want him to
be uh let's
see let's call him
over and so it's going to be instead of
Select task it's going to be select
overhead and it's going to be
uh over. project ID most
likely uh yes project ID but it also has
over.
ID uh
comma wh did I get that right no there
we go that over
ID and
then
why is
that oh that's probably a typo up
here that's probably supposed to be a
comma that could cause US
problems and then here uh let's see so
this is going to be uh it's not be it's
going to be status I'm sorry over and
over
ID uh status is going to be great we'll
keep that and then
here we're going to
be we're just going to take
these and put those
here and those are going to be let's get
rid of that and then these are each
going to
be we're just going to do
th uh text equals and then throw it
there throw it there close it so we get
to take
that um we'll go
there uh over.
scription there we
go th text
this
is do it that way yep so that's going to
be a
div actually we'll just go to this
part and that brings him
across and we're going do that uh we'll
do it like that so now there's the div
close the div div div div div div
div uh this one is oh I see why we had
that
before th text
equals oh quotes and quotes close the
div there we go and then this one's
going to be let's close that div
there and do the th text equals that
and close the PRS or the yeah the double
PRS which I had so that
should cover
it and then at the bottom we've got that
which we want to have
a get the filter in
[Music]
there I think we just called it
footer let's go go check that real quick
so if we go look at basically any other
page oops I want
that let's just kill it there we go and
then come in here let's make sure we got
that right we did okay so now let's run
this see how we
do so I think we now have a working
form to some extent
and now the next thing is going to be
trying to change so let's pick this uh
let's do this guy he's probably got both
okay so he doesn't have that but now
let's go take one of these and let's see
because I bet we have to actually hook
it up so let's change this to a bit
amount of let's just say 500 and if we
do save or update then we've got an
issue
because we got an error and that error
is all the way up
[Music]
here
uh project ID cannot be
found on overhead okay so somewhere in
overhead we had a project ID oh here it
is a project ID but it's project project
ID let's go look at our
overheads that's a user oh it's in a
model we want overhead
model let's do it over here so it's
easier to see did we have a project ID
wh uh we have a project ID but it's
with uh I don't think it's going to like
this wants the capital
I most
likely so let's try
that
uh is that
right oh here we go cannot render airor
p oh as a response has already been
committed double check make sure I
didn't run
over that latest
error
and okay so I think that is it so let's
try that
again so I kind like to send so it's
going to log me
in and if I come in here and I set a bit
amount for 500 do a save then I'm
getting an issue and it is not telling
me what it is because
here that save project is probably not
even if we go to Hello that's probably
what we're going to do next
is uh go
find
save so it is not there what is that
saor update that saver update was for
register user we need to have a save
project so next time around that's what
we're going to pick up and we'll just
pick up right where we left off and uh
we're going to actually get some form
saving finally and starting to get some
actual uh crud you know create retrieve
update delete kind of functionality into
our app uh as always sh any questions
you have to info at developer.com we
happy to help you out point you in the
right direction anywhere uh we need to
or if there's some additional stuff and
some examples you'd like this to do
happy to do so until the next time go
out there and have yourself a great day
a great week and we'll see you next
[Music]
time