Only the first of two parameters through URL transition are resolved
Based on the "Bookmarked" tutorial, I created a sinple transition using a bookmarkable URL string. The string I set in the URL is below:
/faces/PersonForm.jsp?tripId=#{currentRow.value['TRIP.TRIPID']}&#{currentRo w.value['TRIP.PERSONID']}
When I execute the transition only the last of the two parameters are resolved. Therefore, the first parm is invalid, and cannot be resolved.
[408 byte] By [
anicewick] at [2007-11-26 10:52:32]

# 1
It seems to me that you're missing the actual declaration of a second parameter....ie.
/faces/PersonForm.jsp?tripId=#{currentRow.value['TRIP.TRIPID']}&#{currentRo w.value['TRIP.PERSONID']}
should be
/faces/PersonForm.jsp?tripId=#{currentRow.value['TRIP.TRIPID']}&personId=#{ currentRow.value['TRIP.PERSONID']}
Make sense?
Message was edited by:
AidanM
# 2
Sorry .. The problem is correct .. I pasted a test version unto the message... TO be more percise ... I copied in the following string in the URL.. Also, I should have said (in my title) that only the SECOND of the two parameters is converted.
Placed the following codein the url proterty:
/faces/PersonForm.jsp?tripId=#{currentRow.value['TRIP.TRIPID']}&personId=#{ currentRow.value['TRIP.PERSONID']}
When it is rendered in in the URL string ... It looks like the following ...
http://localhost:29080/BookMarkableLinks/faces/PersonForm.jsp?tripId=%23%7Bcurr entRow.value%5B'TRIP.TRIPID'%5D%7D&personId=1
If I switch the paramters order ... as follows (To make sure that the syntax of the first paramter is correct):
/faces/PersonForm.jsp?tripId=personId=#{ currentRow.value['TRIP.PERSONID']}&#{currentRow.value['TRIP.TRIPID']}
Then I get the following in the generated URL ..
http://localhost:29080/BookMarkableLinks/faces/PersonForm.jsp?personId=%23%7B%2 0currentRow.value%5B'TRIP.PERSONID'%5D%7D&tripId=199
it seems to consistently ignore the first paramter
# 3
> Sorry .. The problem is correct .. I pasted a test
> version unto the message... TO be more percise ... I
> copied in the following string in the URL.. Also, I
> should have said (in my title) that only the SECOND
> of the two parameters is converted.
>
> Placed the following codein the url proterty:
>
> /faces/PersonForm.jsp?tripId=#{currentRow.value['TRIP.
> TRIPID']}&personId=#{
> currentRow.value['TRIP.PERSONID']}
>
> When it is rendered in in the URL string ... It looks
> like the following ...
>
> http://localhost:29080/BookMarkableLinks/faces/PersonF
> orm.jsp?tripId=%23%7BcurrentRow.value%5B'TRIP.TRIPID'%
> 5D%7D&personId=1
>
> If I switch the paramters order ... as follows (To
> make sure that the syntax of the first paramter is
> correct):
>
> /faces/PersonForm.jsp?tripId=personId=#{
> currentRow.value['TRIP.PERSONID']}&#{currentRow.value[
> 'TRIP.TRIPID']}
The second example above was actually :
/faces/PersonForm.jsp?personId=#{ currentRow.value['TRIP.PERSONID']}&tripId=#{currentRow.value['TRIP.TRIPID'] }
(I had the wrong version in my clipboard when I pasted it)
>
> Then I get the following in the generated URL ..
>
> http://localhost:29080/BookMarkableLinks/faces/PersonF
> orm.jsp?personId=%23%7B%20currentRow.value%5B'TRIP.PER
> SONID'%5D%7D&tripId=199
>
>
> it seems to consistently ignore the first paramter
# 4
Also if I only use one parameter .. things are fine ... /faces/PersonForm.jsp?personId=#{ currentRow.value['TRIP.PERSONID']}begats http://localhost:29080/BookMarkableLinks/faces/PersonForm.jsp?personId=1
# 5
Sounds confusing....to make more sense any chance you could paste the actual code where this url is built or coded....?
# 6
The code above was pasted into the URL property of the Hyperlink component. This is how the BookMark turorial requested it per performed. Not sure how to show Java Code ...
# 7
That is .. I'm not sure where the "url" property is stored in the java code. It is not hardcarded in my page.java file. I just set it on the properties ... Probably in a property file ... I'll look around for it ...
# 8
Here is the setting in the jsp that fails ..
<ui:tableColumn binding="#{Details.tableColumn7}" id="tableColumn7" width="164">
<ui:hyperlink action="#{Details.hyperlink1_action}" binding="#{Details.hyperlink1}" id="hyperlink1" immediate="true"
text="Update" url="/faces/PersonForm.jsp?personId=#{ currentRow.value['TRIP.PERSONID']}"/>
</ui:tableColumn>
# 9
Opps again ... I had to save first, to get the jsp updated .. The code above worked .. I found something interesting ... The code in "pasted" into the URL INSIDE JSC looks like the following...
/faces/PersonForm.jsp?tripId=#{currentRow.value['TRIP.TRIPID']}&personId=#{ currentRow.value['TRIP.PERSONID']}
However, when I look at the same code via textpad in the jsp file, it looks like the following...
</ui:tableColumn>
<ui:tableColumn binding="#{Details.tableColumn7}" id="tableColumn7" width="164">
<ui:hyperlink action="#{Details.hyperlink1_action}" binding="#{Details.hyperlink1}" id="hyperlink1" immediate="true"
text="Update" url="/faces/PersonForm.jsp?tripId=%23%7BcurrentRow.value%5B'TRIP.TRIPID'%5D%7D&personId=#{ currentRow.value['TRIP.PERSONID']}"/>
</ui:tableColumn>
It looks like the formatting is getting messed up on the save command ...
... Let me look somemore
I can try bypassing JSC properties and edit the URL string inside the JSP page ...
# 10
I tried manually setting the JSF property, and I get an error ..
I changed the url property to look like the setting as follows :
<ui:tableColumn binding="#{Details.tableColumn7}" id="tableColumn7" width="164">
<ui:hyperlink action="#{Details.hyperlink1_action}" binding="#{Details.hyperlink1}" id="hyperlink1" immediate="true"
text="Update" url="/faces/PersonForm.jsp?tripId=#{currentRow.value['TRIP.TRIPID']}&personId=#{currentRow.value['TRIP.PERSONID']}"/>
</ui:tableColumn>
However, this fails with the compile error:
Details.jsp:93: The reference to entity "personId" must end with the ';' delimiter.
I tried placing the ';' in numerous places .. and still get the same error ...
# 11
This is getting too messy - with too much info (and misinformation) ... I'm going to trash this, and start over with a fresh question .. I think this is a legitmate bug in JSC, and deserves a clear question.
The new question will be
"Only the Last of mutliple parameters passed through URL property is resolved correctly"